Package com.logicaldoc.workflow.template
Class HibernateWorkflowPersistenceTemplateDAO
- java.lang.Object
-
- com.logicaldoc.core.HibernatePersistentObjectDAO<WorkflowPersistenceTemplate>
-
- com.logicaldoc.workflow.template.HibernateWorkflowPersistenceTemplateDAO
-
- All Implemented Interfaces:
com.logicaldoc.core.PersistentObjectDAO<WorkflowPersistenceTemplate>,WorkflowPersistenceTemplateDAO
public class HibernateWorkflowPersistenceTemplateDAO extends com.logicaldoc.core.HibernatePersistentObjectDAO<WorkflowPersistenceTemplate> implements WorkflowPersistenceTemplateDAO
Hibernate implementation of the WorkflowPersistenceTemplateDAO.- Since:
- 5.0
- Author:
- Sebastian Wenzky, Matteo Caruso - LogicalDOC
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.logicaldoc.workflow.template.WorkflowPersistenceTemplateDAO
WorkflowPersistenceTemplateDAO.WORKFLOW_STAGE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandelete(WorkflowPersistenceTemplate persistenceTemplate)This method deletes the given persistence workflow template.booleandeploy(WorkflowPersistenceTemplate persistenceTemplate)This method stores the given persistence workflow templateList<WorkflowPersistenceTemplate>findAllDeployed(Long tenantId)This method loads all the workflow already deployedWorkflowPersistenceTemplatefindByName(long tenantId, String name)This method finds a workflow template by nameWorkflowPersistenceTemplateload(long tenantId, String name, WorkflowPersistenceTemplateDAO.WORKFLOW_STAGE workflow_stage)This method loads the persistence workflow template with the given name and with the given workflow stage.WorkflowPersistenceTemplateload(WorkflowPersistenceTemplate workflowTemplate, WorkflowPersistenceTemplateDAO.WORKFLOW_STAGE workflow_stage)This method loads the given persistence workflow template with the given workflow stage.WorkflowPersistenceTemplateload(Long id, WorkflowPersistenceTemplateDAO.WORKFLOW_STAGE stage)This method loads the persistence workflow template with the given id and the given workflow stage.WorkflowPersistenceTemplateread(File file)De-serialize a template from a filebooleansave(WorkflowPersistenceTemplate persistenceTemplate, WorkflowPersistenceTemplateDAO.WORKFLOW_STAGE stage)This method saves the persistence workflow template with the given workflow stage.-
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
-
save
public boolean save(WorkflowPersistenceTemplate persistenceTemplate, WorkflowPersistenceTemplateDAO.WORKFLOW_STAGE stage)
Description copied from interface:WorkflowPersistenceTemplateDAOThis method saves the persistence workflow template with the given workflow stage.- Specified by:
savein interfaceWorkflowPersistenceTemplateDAO- Parameters:
persistenceTemplate- The persistence workflow template to be savedstage- The workflow stage- Returns:
- true if the template has been correctly saved
-
delete
public boolean delete(WorkflowPersistenceTemplate persistenceTemplate)
Description copied from interface:WorkflowPersistenceTemplateDAOThis method deletes the given persistence workflow template.- Specified by:
deletein interfaceWorkflowPersistenceTemplateDAO- Parameters:
persistenceTemplate- The persistence workflow template to be deleted- Returns:
- true if the template has been correctly deleted
-
read
public WorkflowPersistenceTemplate read(File file)
Description copied from interface:WorkflowPersistenceTemplateDAODe-serialize a template from a file- Specified by:
readin interfaceWorkflowPersistenceTemplateDAO- Parameters:
file- the file storing the template- Returns:
- object representation of the template
-
load
public WorkflowPersistenceTemplate load(Long id, WorkflowPersistenceTemplateDAO.WORKFLOW_STAGE stage)
Description copied from interface:WorkflowPersistenceTemplateDAOThis method loads the persistence workflow template with the given id and the given workflow stage.- Specified by:
loadin interfaceWorkflowPersistenceTemplateDAO- Parameters:
id- The persistence workflow template idstage- The workflow stage- Returns:
- The persistence workflow template
-
load
public WorkflowPersistenceTemplate load(WorkflowPersistenceTemplate workflowTemplate, WorkflowPersistenceTemplateDAO.WORKFLOW_STAGE workflow_stage)
Description copied from interface:WorkflowPersistenceTemplateDAOThis method loads the given persistence workflow template with the given workflow stage.- Specified by:
loadin interfaceWorkflowPersistenceTemplateDAO- Parameters:
workflowTemplate- The persistence workflow templateworkflow_stage- The workflow stage- Returns:
- The persistence workflow template instance
-
deploy
public boolean deploy(WorkflowPersistenceTemplate persistenceTemplate) throws com.logicaldoc.core.PersistenceException
Description copied from interface:WorkflowPersistenceTemplateDAOThis method stores the given persistence workflow template- Specified by:
deployin interfaceWorkflowPersistenceTemplateDAO- Parameters:
persistenceTemplate- The persistence workflow template- Returns:
- true if the template has been correctly deployed
- Throws:
com.logicaldoc.core.PersistenceException- error in the database
-
findAllDeployed
public List<WorkflowPersistenceTemplate> findAllDeployed(Long tenantId)
Description copied from interface:WorkflowPersistenceTemplateDAOThis method loads all the workflow already deployed- Specified by:
findAllDeployedin interfaceWorkflowPersistenceTemplateDAO- Parameters:
tenantId- optional tenant specification- Returns:
- list of persistence workflow template
-
load
public WorkflowPersistenceTemplate load(long tenantId, String name, WorkflowPersistenceTemplateDAO.WORKFLOW_STAGE workflow_stage)
Description copied from interface:WorkflowPersistenceTemplateDAOThis method loads the persistence workflow template with the given name and with the given workflow stage.- Specified by:
loadin interfaceWorkflowPersistenceTemplateDAO- Parameters:
tenantId- The persistence workflow template tenantname- The persistence workflow template nameworkflow_stage- The workflow stage- Returns:
- The persistence workflow template
-
findByName
public WorkflowPersistenceTemplate findByName(long tenantId, String name)
Description copied from interface:WorkflowPersistenceTemplateDAOThis method finds a workflow template by name- Specified by:
findByNamein interfaceWorkflowPersistenceTemplateDAO- Parameters:
tenantId- identifier of the tenantname- name of the workflow template- Returns:
- WorkflowPersistenceTemplate with given name
-
-