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 boolean
delete(WorkflowPersistenceTemplate persistenceTemplate)
This method deletes the given persistence workflow template.boolean
deploy(WorkflowPersistenceTemplate persistenceTemplate)
This method stores the given persistence workflow templateList<WorkflowPersistenceTemplate>
findAllDeployed(Long tenantId)
This method loads all the workflow already deployedWorkflowPersistenceTemplate
findByName(long tenantId, String name)
This method finds a workflow template by nameWorkflowPersistenceTemplate
load(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.WorkflowPersistenceTemplate
load(WorkflowPersistenceTemplate workflowTemplate, WorkflowPersistenceTemplateDAO.WORKFLOW_STAGE workflow_stage)
This method loads the given persistence workflow template with the given workflow stage.WorkflowPersistenceTemplate
load(Long id, WorkflowPersistenceTemplateDAO.WORKFLOW_STAGE stage)
This method loads the persistence workflow template with the given id and the given workflow stage.WorkflowPersistenceTemplate
read(File file)
De-serialize a template from a fileboolean
save(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:WorkflowPersistenceTemplateDAO
This method saves the persistence workflow template with the given workflow stage.- Specified by:
save
in 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:WorkflowPersistenceTemplateDAO
This method deletes the given persistence workflow template.- Specified by:
delete
in 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:WorkflowPersistenceTemplateDAO
De-serialize a template from a file- Specified by:
read
in 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:WorkflowPersistenceTemplateDAO
This method loads the persistence workflow template with the given id and the given workflow stage.- Specified by:
load
in 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:WorkflowPersistenceTemplateDAO
This method loads the given persistence workflow template with the given workflow stage.- Specified by:
load
in 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:WorkflowPersistenceTemplateDAO
This method stores the given persistence workflow template- Specified by:
deploy
in 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:WorkflowPersistenceTemplateDAO
This method loads all the workflow already deployed- Specified by:
findAllDeployed
in 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:WorkflowPersistenceTemplateDAO
This method loads the persistence workflow template with the given name and with the given workflow stage.- Specified by:
load
in 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:WorkflowPersistenceTemplateDAO
This method finds a workflow template by name- Specified by:
findByName
in interfaceWorkflowPersistenceTemplateDAO
- Parameters:
tenantId
- identifier of the tenantname
- name of the workflow template- Returns:
- WorkflowPersistenceTemplate with given name
-
-