Class HibernateAutomationTriggerDAO
- java.lang.Object
-
- com.logicaldoc.core.HibernatePersistentObjectDAO<AutomationTrigger>
-
- com.logicaldoc.enterprise.automation.HibernateAutomationTriggerDAO
-
- All Implemented Interfaces:
com.logicaldoc.core.PersistentObjectDAO<AutomationTrigger>
,AutomationTriggerDAO
public class HibernateAutomationTriggerDAO extends com.logicaldoc.core.HibernatePersistentObjectDAO<AutomationTrigger> implements AutomationTriggerDAO
Implements the DAO for automation triggers- Since:
- 8.1
- Author:
- Marco Meschieri - LogicalDOC
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
applyTriggersToTree(long rootId)
AutomationTrigger
findByAK(String event, Long folderId, long tenantId)
List<AutomationTrigger>
findByEvent(String event, long tenantId)
List<AutomationTrigger>
findByFolder(long folderId)
AutomationRoutine
getAutomation(String event, Long folderId, long tenantId)
Retrieves the registered automation script for a given event and foldervoid
setFolderDao(com.logicaldoc.core.folder.FolderDAO folderDao)
void
setRoutineDao(AutomationRoutineDAO routineDao)
-
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, initialize, 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, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForObject, queryForRowSet, queryForString, store
-
-
-
-
Method Detail
-
findByAK
public AutomationTrigger findByAK(String event, Long folderId, long tenantId)
- Specified by:
findByAK
in interfaceAutomationTriggerDAO
-
getAutomation
public AutomationRoutine getAutomation(String event, Long folderId, long tenantId) throws com.logicaldoc.core.PersistenceException
Description copied from interface:AutomationTriggerDAO
Retrieves the registered automation script for a given event and folder- Specified by:
getAutomation
in interfaceAutomationTriggerDAO
- Parameters:
event
- the event's codefolderId
- identifier of the folder (optional)tenantId
- identifier of the tenant- Returns:
- the routine containing the automation to run, if the trigger defines the scripts directly a dummy routine is returned
- Throws:
com.logicaldoc.core.PersistenceException
- error in the database
-
findByEvent
public List<AutomationTrigger> findByEvent(String event, long tenantId)
- Specified by:
findByEvent
in interfaceAutomationTriggerDAO
-
setRoutineDao
public void setRoutineDao(AutomationRoutineDAO routineDao)
-
findByFolder
public List<AutomationTrigger> findByFolder(long folderId)
- Specified by:
findByFolder
in interfaceAutomationTriggerDAO
-
setFolderDao
public void setFolderDao(com.logicaldoc.core.folder.FolderDAO folderDao)
-
applyTriggersToTree
public int applyTriggersToTree(long rootId)
- Specified by:
applyTriggersToTree
in interfaceAutomationTriggerDAO
-
-