Class HttpSessionDao
java.lang.Object
ch.colabproject.colab.api.persistence.jpa.user.HttpSessionDao
Http session persistence
Note : Most of database operations are handled by managed entities and cascade.
- Author:
- maxence
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteHttpSession(HttpSession session) Delete a http session.Get list of http session inactive for at least 1 weekfindHttpSession(Long id) Find a persisted HttpSession by idpersistHttpSession(HttpSession session) Persist a brand new http session to database
-
Constructor Details
-
HttpSessionDao
public HttpSessionDao()
-
-
Method Details
-
findHttpSession
Find a persisted HttpSession by id- Parameters:
id- the id of the http session to fetch- Returns:
- the http session with the given id or null if such a http session does not exist
-
findExpiredHttpSessions
Get list of http session inactive for at least 1 week- Returns:
- list of old httpSessions
-
persistHttpSession
Persist a brand new http session to database- Parameters:
session- the new http session to persist- Returns:
- the new persisted and managed http session
-
deleteHttpSession
Delete a http session. This can't be undone- Parameters:
session- the http session to delete
-