Class HttpSessionDao
- java.lang.Object
-
- ch.colabproject.colab.api.persistence.jpa.user.HttpSessionDao
-
public class HttpSessionDao extends Object
Http session persistenceNote : Most of database operations are handled by managed entities and cascade.
- Author:
- maxence
-
-
Constructor Summary
Constructors Constructor Description HttpSessionDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteHttpSession(HttpSession session)Delete a http session.List<HttpSession>findExpiredHttpSessions()Get list of http session inactive for at least 1 weekHttpSessionfindHttpSession(Long id)Find a persisted HttpSession by idHttpSessionpersistHttpSession(HttpSession session)Persist a brand new http session to database
-
-
-
Method Detail
-
findHttpSession
public HttpSession findHttpSession(Long id)
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
public List<HttpSession> findExpiredHttpSessions()
Get list of http session inactive for at least 1 week- Returns:
- list of old httpSessions
-
persistHttpSession
public HttpSession persistHttpSession(HttpSession session)
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
public void deleteHttpSession(HttpSession session)
Delete a http session. This can't be undone- Parameters:
session- the http session to delete
-
-