Class HibernateSessionDAO

java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<Session>
com.logicaldoc.core.security.HibernateSessionDAO
All Implemented Interfaces:
PersistentObjectDAO<Session>, SessionDAO

public class HibernateSessionDAO extends HibernatePersistentObjectDAO<Session> implements SessionDAO
  • Method Details

    • deleteCurrentNodeSessions

      public void deleteCurrentNodeSessions()
      Description copied from interface: SessionDAO
      Removes all the sessions that refers to the current node
      Specified by:
      deleteCurrentNodeSessions in interface SessionDAO
    • countSessions

      public int countSessions(Long tenantId, Integer status)
      Description copied from interface: SessionDAO
      Counts the number of sessions.
      Specified by:
      countSessions in interface SessionDAO
      Parameters:
      tenantId - The tenant (optional)
      status - The current status (optional)
      Returns:
      the number of sessions
    • findBySid

      public Session findBySid(String sid)
      Description copied from interface: SessionDAO
      Retrieves the session of the given SID
      Specified by:
      findBySid in interface SessionDAO
      Parameters:
      sid - identifier of the session
      Returns:
      the session
    • initialize

      public void initialize(Session session)
      Description copied from class: HibernatePersistentObjectDAO
      Doesn't do anything by default
      Specified by:
      initialize in interface PersistentObjectDAO<Session>
      Overrides:
      initialize in class HibernatePersistentObjectDAO<Session>
      Parameters:
      session - The entity to be initialised
    • findByNode

      public List<Session> findByNode(String node)
      Description copied from interface: SessionDAO
      Retrieves the session of the given node
      Specified by:
      findByNode in interface SessionDAO
      Parameters:
      node - the node
      Returns:
      the list of sessions
    • cleanOldSessions

      public void cleanOldSessions(int ttl)
      Description copied from interface: SessionDAO
      This method deletes all the session entries oldest than the given days since now. If ttl is 0 or -1, the deletion is not made.
      Specified by:
      cleanOldSessions in interface SessionDAO
      Parameters:
      ttl - The maximum number of days over which the session is considered old