public interface SubjectDAO
SubjectDAO is responsible for persisting a Subject instance's internal state such that the Subject instance can be recreated at a later time if necessary.
Shiro's default
SecurityManager implementations typically use a
SubjectDAO in conjunction with a
SubjectFactory: after the
SubjectFactory creates a
Subject instance, the
SubjectDAO is used to persist that subject's state such that it can be accessed later if necessary.
SecurityManager implementations to manage Subject state persistence. It does
not make Subject instances accessible to the application (e.g. via
SecurityUtils.getSubject()).
DefaultSubjectDAO
Subjectsave(Subject subject)
Subject, this method updates the existing state to reflect the current state (i.e. an update operation).
subject - the Subject instance for which its state will be created or updated.
void delete(Subjectsubject)
Subject instance. This is a delete operation such that the Subject's state will not be accessible at a later time.
subject - the Subject instance for which any persistent state should be deleted.