Class HttpSessionDao

java.lang.Object
ch.colabproject.colab.api.persistence.jpa.user.HttpSessionDao

public class HttpSessionDao extends Object
Http session persistence

Note : Most of database operations are handled by managed entities and cascade.

Author:
maxence
  • Constructor Details

    • HttpSessionDao

      public HttpSessionDao()
  • Method Details

    • 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