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 ofIWorkflowStateDaothat 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 Deprecated Methods Modifier and Type Method Description List<WorkflowState>createDefaultStates()Deprecated.List<WorkflowState>createDefaultStates(Locale locale)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.WorkflowStategetByUuid(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)Returns a set of entities that reference the given entity and depend on it.WorkflowStategetOrCreateSystemState(IEntityContext ec, WorkflowVersion workflowVersion, EWorkflowStateType type)Finds the given built-in workflow state.protected IFCDaoActionHook<WorkflowState>getPreActionHook()protected static voidinitLazy(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
count, findAll, findSingle, 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
-
getPreActionHook
protected IFCDaoActionHook<WorkflowState> getPreActionHook()
- Overrides:
getPreActionHookin classGenericDao<WorkflowState>
-
createDefaultStates
@Deprecated public List<WorkflowState> createDefaultStates()
Deprecated.Description copied from interface:IWorkflowStateDaoCreates the system default workflow states- Specified by:
createDefaultStatesin interfaceIWorkflowStateDao- Returns:
- list of system default states
-
createDefaultStates
public List<WorkflowState> createDefaultStates(Locale locale)
Description copied from interface:IWorkflowStateDaoCreates the system default workflow states- Specified by:
createDefaultStatesin interfaceIWorkflowStateDao- Parameters:
locale- the current locale- Returns:
- list of system default states
-
getAllByWorkflowVersion
public List<WorkflowState> getAllByWorkflowVersion(IEntityContext ec, Projekt project, long versionNumber)
Description copied from interface:IWorkflowStateDaoFinds all states of the given workflow version.- Specified by:
getAllByWorkflowVersionin 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
WorkflowStatecontained in the given workflow version.
-
getAllByWorkflowVersion
public List<WorkflowState> getAllByWorkflowVersion(IEntityContext ec, WorkflowVersion workflowVersion)
Description copied from interface:IWorkflowStateDaoFinds all states of the given workflow version.- Specified by:
getAllByWorkflowVersionin interfaceIWorkflowStateDao- Parameters:
ec- Entity context for accessing the database.workflowVersion- Workflow version for which to retrieve the states.- Returns:
- A list of all
WorkflowStatecontained in the given workflow version.
-
getAllForActiveVersion
public List<WorkflowState> getAllForActiveVersion(IEntityContext ec, Projekt project)
Description copied from interface:IWorkflowStateDaoFinds all states of the active workflow version of the given project.- Specified by:
getAllForActiveVersionin interfaceIWorkflowStateDao- Parameters:
ec- Entity context for accessing the database.project- Project which contains the workflow version.- Returns:
- A list of all
WorkflowStatecontained in the active workflow version of the given project.
-
getByUuid
public WorkflowState getByUuid(IEntityContext ec, WorkflowVersion workflowVersion, UUID uuid)
Description copied from interface:IWorkflowStateDaoFinds 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:
getByUuidin 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
nullif no such state exists.
-
getEntityRefs
public Set<de.xima.cmn.dao.interfaces.IEntity<Long>> getEntityRefs(IEntityContext ec, WorkflowState state)
Description copied from interface:IGenericDaoReturns a set of entities that reference the given entity and depend on it. An entity can usually not be deleted if it is still being referenced by and depended on by other entities.- Specified by:
getEntityRefsin interfaceIGenericDao<WorkflowState>- Overrides:
getEntityRefsin classGenericDao<WorkflowState>- Parameters:
ec- entity context for database transactions.state- to get references for.- Returns:
- a set of entities that reference the given entity and depend on it.
-
getOrCreateSystemState
public WorkflowState getOrCreateSystemState(IEntityContext ec, WorkflowVersion workflowVersion, EWorkflowStateType type)
Description copied from interface:IWorkflowStateDaoFinds the given built-in workflow state. Creates it if it does not exist yet.- Specified by:
getOrCreateSystemStatein 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.
-
initLazy
protected static void initLazy(WorkflowState state)
-
-