Class HibernateAutomationRoutineDAO
java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<AutomationRoutine>
com.logicaldoc.enterprise.automation.HibernateAutomationRoutineDAO
- All Implemented Interfaces:
com.logicaldoc.core.PersistentObjectDAO<AutomationRoutine>,AutomationRoutineDAO
public class HibernateAutomationRoutineDAO
extends com.logicaldoc.core.HibernatePersistentObjectDAO<AutomationRoutine>
implements AutomationRoutineDAO
Implements the DAO for automation routines
- Since:
- 8.1
- Author:
- Marco Meschieri - LogicalDOC
-
Field Summary
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO
ENTITY -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(long id, int code) findByName(String name, long tenantId) findByUser(long userId) This method loads all the routines accessible by the given userSet<com.logicaldoc.core.security.Permission>getEnabledPermissions(long routineId, long userId) Finds all permissions of a user enabled on the specified routinevoidinitialize(AutomationRoutine routine) booleanisReadEnable(long routineId, long userId) This method is looking up for read rights for a routine and an userbooleanisWriteEnable(long routineId, long userId) Returns if a routine is writable for a uservoidsetUserDao(com.logicaldoc.core.security.dao.UserDAO userDao) Methods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAO
bulkUpdate, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, getSessionFactory, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForRowSet, queryForString, setSessionFactory, storeMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.logicaldoc.core.PersistentObjectDAO
bulkUpdate, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForRowSet, queryForString, store
-
Method Details
-
findByName
- Specified by:
findByNamein interfaceAutomationRoutineDAO
-
initialize
- Specified by:
initializein interfacecom.logicaldoc.core.PersistentObjectDAO<AutomationRoutine>- Overrides:
initializein classcom.logicaldoc.core.HibernatePersistentObjectDAO<AutomationRoutine>
-
delete
public void delete(long id, int code) throws com.logicaldoc.core.PersistenceException - Specified by:
deletein interfacecom.logicaldoc.core.PersistentObjectDAO<AutomationRoutine>- Overrides:
deletein classcom.logicaldoc.core.HibernatePersistentObjectDAO<AutomationRoutine>- Throws:
com.logicaldoc.core.PersistenceException
-
getEnabledPermissions
public Set<com.logicaldoc.core.security.Permission> getEnabledPermissions(long routineId, long userId) Description copied from interface:AutomationRoutineDAOFinds all permissions of a user enabled on the specified routine- Specified by:
getEnabledPermissionsin interfaceAutomationRoutineDAO- Parameters:
routineId- ID of the routineuserId- ID of the user- Returns:
- Collection of enabled permissions
-
isWriteEnable
public boolean isWriteEnable(long routineId, long userId) Description copied from interface:AutomationRoutineDAOReturns if a routine is writable for a user- Specified by:
isWriteEnablein interfaceAutomationRoutineDAO- Parameters:
routineId- check this routineuserId- privileges for this should be checked- Returns:
- if the user can edit the routine
-
isReadEnable
public boolean isReadEnable(long routineId, long userId) Description copied from interface:AutomationRoutineDAOThis method is looking up for read rights for a routine and an user- Specified by:
isReadEnablein interfaceAutomationRoutineDAO- Parameters:
routineId- ID of the routineuserId- ID of the user- Returns:
- if the user can access the routine
-
findByUser
Description copied from interface:AutomationRoutineDAOThis method loads all the routines accessible by the given user- Specified by:
findByUserin interfaceAutomationRoutineDAO- Parameters:
userId- optional user specification- Returns:
- list of automation routines with read permission for the user
-
setUserDao
public void setUserDao(com.logicaldoc.core.security.dao.UserDAO userDao)
-