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 TypeMethodDescriptionvoid
delete
(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 routinevoid
initialize
(AutomationRoutine routine) boolean
isReadEnable
(long routineId, long userId) This method is looking up for read rights for a routine and an userboolean
isWriteEnable
(long routineId, long userId) Returns if a routine is writable for a uservoid
setUserDao
(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, 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, 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:
findByName
in interfaceAutomationRoutineDAO
-
initialize
- Specified by:
initialize
in interfacecom.logicaldoc.core.PersistentObjectDAO<AutomationRoutine>
- Overrides:
initialize
in classcom.logicaldoc.core.HibernatePersistentObjectDAO<AutomationRoutine>
-
delete
public void delete(long id, int code) throws com.logicaldoc.core.PersistenceException - Specified by:
delete
in interfacecom.logicaldoc.core.PersistentObjectDAO<AutomationRoutine>
- Overrides:
delete
in 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:AutomationRoutineDAO
Finds all permissions of a user enabled on the specified routine- Specified by:
getEnabledPermissions
in 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:AutomationRoutineDAO
Returns if a routine is writable for a user- Specified by:
isWriteEnable
in 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:AutomationRoutineDAO
This method is looking up for read rights for a routine and an user- Specified by:
isReadEnable
in interfaceAutomationRoutineDAO
- Parameters:
routineId
- ID of the routineuserId
- ID of the user- Returns:
- if the user can access the routine
-
findByUser
Description copied from interface:AutomationRoutineDAO
This method loads all the routines accessible by the given user- Specified by:
findByUser
in 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)
-