S - the Session typepublic interface SessionRepository<S extends Session>
Session instances.| Modifier and Type | Method and Description |
|---|---|
S |
createSession()
Creates a new
Session that is capable of being persisted by this
SessionRepository. |
void |
delete(String id)
|
S |
getSession(String id)
|
void |
save(S session)
Ensures the
Session created by
createSession() is saved. |
S createSession()
Session that is capable of being persisted by this
SessionRepository.
This allows optimizations and customizations in how the Session is
persisted. For example, the implementation returned might keep track of the changes
ensuring that only the delta needs to be persisted on a save.
Session that is capable of being persisted by this
SessionRepositoryvoid save(S session)
Session created by
createSession() is saved.
Some implementations may choose to save as the Session is updated by
returning a Session that immediately persists any changes. In this case,
this method may not actually do anything.
session - the Session to saveS getSession(String id)
id - the Session.getId() to lookupSession by the Session.getId() or null if no
Session is found.void delete(String id)
id - the Session.getId() to delete