Package de.xima.fc.dao.impl
Class WorkflowStateDao
- java.lang.Object
-
- de.xima.cmn.dao.AbstractDao<T,Long,IEntityContext>
-
- de.xima.fc.dao.impl.GenericDao<WorkflowState>
-
- de.xima.fc.dao.impl.WorkflowStateDao
-
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<WorkflowState,Long,IEntityContext>
,IGenericDao<WorkflowState>
,IWorkflowStateDao
public class WorkflowStateDao extends GenericDao<WorkflowState> implements IWorkflowStateDao
The default implementation ofIWorkflowStateDao
that can be accessed viaDaoProvider
.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description WorkflowStateDao()
Creates a new instance of this DAO.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<WorkflowState>
createDefaultStates()
Creates the system default workflow statesList<WorkflowState>
getAllByWorkflowVersion(IEntityContext ec, Projekt project, long versionNumber)
Finds all states of the given workflow version.List<WorkflowState>
getAllByWorkflowVersion(IEntityContext ec, WorkflowVersion workflowVersion)
Finds all states of the given workflow version.List<WorkflowState>
getAllForActiveVersion(IEntityContext ec, Projekt project)
Finds all states of the active workflow version of the given project.WorkflowState
getByUuid(IEntityContext ec, WorkflowVersion workflowVersion, UUID uuid)
Finds the state with the given UUID contained in the given workflow version.Set<de.xima.cmn.dao.interfaces.IEntity<Long>>
getEntityRefs(IEntityContext ec, WorkflowState state)
WorkflowState
getOrCreateSystemState(IEntityContext ec, WorkflowVersion workflowVersion, EWorkflowStateType type)
Finds the given built-in workflow state.protected IFCDaoActionHook<WorkflowState>
getPreActionHook()
protected static void
initLazy(WorkflowState state)
-
Methods inherited from class de.xima.fc.dao.impl.GenericDao
getPostActionHook, read
-
Methods inherited from class de.xima.cmn.dao.AbstractDao
all, bulkDelete, bulkUpdate, cb, checkLockingVersion, cq, create, create, delete, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, notifyListener, notifyListener, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.xima.cmn.dao.interfaces.IAbstractDao
all, bulkDelete, bulkUpdate, checkLockingVersion, create, create, delete, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, update
-
Methods inherited from interface de.xima.fc.dao.interfaces.IGenericDao
read
-
-
-
-
Constructor Detail
-
WorkflowStateDao
public WorkflowStateDao()
Creates a new instance of this DAO. Normally you should use the singleton instance provided byDaoProvider.WORKFLOWSTATE_DAO
.
-
-
Method Detail
-
createDefaultStates
public List<WorkflowState> createDefaultStates()
Description copied from interface:IWorkflowStateDao
Creates the system default workflow states- Specified by:
createDefaultStates
in interfaceIWorkflowStateDao
- Returns:
- list of system default states
-
getAllByWorkflowVersion
public List<WorkflowState> getAllByWorkflowVersion(IEntityContext ec, Projekt project, long versionNumber)
Description copied from interface:IWorkflowStateDao
Finds all states of the given workflow version.- Specified by:
getAllByWorkflowVersion
in interfaceIWorkflowStateDao
- Parameters:
ec
- Entity context for accessing the database.project
- Project which contains the workflow version.versionNumber
- Version number of the workflow version, must belong to the given project.- Returns:
- A list of all
WorkflowState
contained in the given workflow version.
-
getAllByWorkflowVersion
public List<WorkflowState> getAllByWorkflowVersion(IEntityContext ec, WorkflowVersion workflowVersion)
Description copied from interface:IWorkflowStateDao
Finds all states of the given workflow version.- Specified by:
getAllByWorkflowVersion
in interfaceIWorkflowStateDao
- Parameters:
ec
- Entity context for accessing the database.workflowVersion
- Workflow version for which to retrieve the states.- Returns:
- A list of all
WorkflowState
contained in the given workflow version.
-
getAllForActiveVersion
public List<WorkflowState> getAllForActiveVersion(IEntityContext ec, Projekt project)
Description copied from interface:IWorkflowStateDao
Finds all states of the active workflow version of the given project.- Specified by:
getAllForActiveVersion
in interfaceIWorkflowStateDao
- Parameters:
ec
- Entity context for accessing the database.project
- Project which contains the workflow version.- Returns:
- A list of all
WorkflowState
contained in the active workflow version of the given project.
-
getByUuid
public WorkflowState getByUuid(IEntityContext ec, WorkflowVersion workflowVersion, UUID uuid)
Description copied from interface:IWorkflowStateDao
Finds the state with the given UUID contained in the given workflow version. Note that theWorkflowState.getUuid()
is unique only within all states of a certain workflow version.- Specified by:
getByUuid
in interfaceIWorkflowStateDao
- Parameters:
ec
- Entity context for accessing the database.workflowVersion
- The workflow version for which to retrieve the state.uuid
- The UUID of the workflow state to retrieve.- Returns:
- A workflow state with the given UUID that is contained in the given workflow version, or
null
if no such state exists.
-
getEntityRefs
public Set<de.xima.cmn.dao.interfaces.IEntity<Long>> getEntityRefs(IEntityContext ec, WorkflowState state)
- Specified by:
getEntityRefs
in interfaceIGenericDao<WorkflowState>
- Overrides:
getEntityRefs
in classGenericDao<WorkflowState>
-
getOrCreateSystemState
public WorkflowState getOrCreateSystemState(IEntityContext ec, WorkflowVersion workflowVersion, EWorkflowStateType type)
Description copied from interface:IWorkflowStateDao
Finds the given built-in workflow state. Creates it if it does not exist yet.- Specified by:
getOrCreateSystemState
in interfaceIWorkflowStateDao
- Parameters:
ec
- Entity context for accessing the database.workflowVersion
- Workflow version with states to search.type
- Workflow state type to find.- Returns:
- The state with the given type.
-
getPreActionHook
protected IFCDaoActionHook<WorkflowState> getPreActionHook()
- Overrides:
getPreActionHook
in classGenericDao<WorkflowState>
-
initLazy
protected static void initLazy(WorkflowState state)
-
-