Package com.logicaldoc.core.security.dao
Class HibernateSessionDAO
- java.lang.Object
-
- com.logicaldoc.core.HibernatePersistentObjectDAO<Session>
-
- com.logicaldoc.core.security.dao.HibernateSessionDAO
-
- All Implemented Interfaces:
PersistentObjectDAO<Session>,SessionDAO
public class HibernateSessionDAO extends HibernatePersistentObjectDAO<Session> implements SessionDAO
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanOldSessions(int ttl)This method deletes all the session entries oldest than the given days since now.intcountSessions(Long tenantId, Integer status)Counts the number of sessions.voiddeleteCurrentNodeSessions()Removes all the sessions that refers to the current nodeList<Session>findByNode(String node)Retrieves the session of the given nodeSessionfindBySid(String sid)Retrieves the session of the given SIDvoidinitialize(Session session)Doesn't do anything by default-
Methods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAO
bulkUpdate, delete, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, getSessionFactory, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForObject, queryForRowSet, queryForString, setSessionFactory, store
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.logicaldoc.core.PersistentObjectDAO
bulkUpdate, delete, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForObject, queryForRowSet, queryForString, store
-
-
-
-
Method Detail
-
deleteCurrentNodeSessions
public void deleteCurrentNodeSessions()
Description copied from interface:SessionDAORemoves all the sessions that refers to the current node- Specified by:
deleteCurrentNodeSessionsin interfaceSessionDAO
-
countSessions
public int countSessions(Long tenantId, Integer status)
Description copied from interface:SessionDAOCounts the number of sessions.- Specified by:
countSessionsin interfaceSessionDAO- 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:SessionDAORetrieves the session of the given SID- Specified by:
findBySidin interfaceSessionDAO- Parameters:
sid- identifier of the session- Returns:
- the session
-
initialize
public void initialize(Session session)
Description copied from class:HibernatePersistentObjectDAODoesn't do anything by default- Specified by:
initializein interfacePersistentObjectDAO<Session>- Overrides:
initializein classHibernatePersistentObjectDAO<Session>- Parameters:
session- The entity to be initialised
-
findByNode
public List<Session> findByNode(String node)
Description copied from interface:SessionDAORetrieves the session of the given node- Specified by:
findByNodein interfaceSessionDAO- Parameters:
node- the node- Returns:
- the list of sessions
-
cleanOldSessions
public void cleanOldSessions(int ttl)
Description copied from interface:SessionDAOThis method deletes all the session entries oldest than the given days since now. Ifttlis 0 or -1, the deletion is not made.- Specified by:
cleanOldSessionsin interfaceSessionDAO- Parameters:
ttl- The maximum number of days over which the session is considered old
-
-