org.enhydra.shark.instancepersistence
Class DODSPersistentManager

java.lang.Object
  extended by org.enhydra.shark.instancepersistence.DODSPersistentManager
All Implemented Interfaces:
PersistentManagerInterface

public class DODSPersistentManager
extends java.lang.Object
implements PersistentManagerInterface

Used to save, restore or delete relevant engine objects from database, using DODS persistent layer.

Version:
1.2
Author:
Sasa Bojanic

Field Summary
protected  java.util.Map _acStates
           
protected  java.util.List _actClosedStatesBigDecimals
           
protected  java.util.List _actOpenStatesBigDecimals
           
protected  java.util.List _prClosedStatesBigDecimals
           
protected  java.util.List _prOpenStatesBigDecimals
           
protected  java.util.Map _prStates
           
protected  CallbackUtilities cus
           
protected  com.lutris.appserver.server.sql.LogicalDatabase db
           
protected static short DB_TYPE_BLOB
           
protected static short DB_TYPE_BOOLEAN
           
protected static short DB_TYPE_DATE
           
protected static short DB_TYPE_DOUBLE
           
protected static short DB_TYPE_LONG
           
protected static short DB_TYPE_VCHAR
           
protected static short DB_TYPE_XML
           
protected  boolean deleteFinishedProcesses
           
protected static java.lang.String LOG_CHANNEL
           
protected static int max_vchar_size
           
protected static int MAX_VCHAR_SIZE_LIMIT
           
protected  boolean storeArraysAsBLOBs
           
protected  boolean usingStandardVariableDataModel
           
 
Constructor Summary
DODSPersistentManager()
           
 
Method Summary
protected  com.lutris.appserver.server.sql.DBTransaction __getDBTransaction()
           
protected  boolean canDeleteFinishedProcess(WMSessionHandle shandle, java.lang.String procId)
           
 void configure(CallbackUtilities cut)
           
protected  java.lang.Object[] createArray(short vtype, int length)
           
 void delete(WMSessionHandle shandle, ActivityVariablePersistenceObject var)
           
 void delete(WMSessionHandle shandle, ProcessVariablePersistenceObject var)
           
 void deleteActivity(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId)
           
 void deleteAndJoinEntries(WMSessionHandle shandle, java.lang.String procId, java.lang.String blockActId, java.lang.String aDefId)
           
 void deleteAssignment(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId, java.lang.String resUsername)
           
 void deleteDeadlines(WMSessionHandle shandle, java.lang.String procId)
           
 void deleteDeadlines(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId)
           
 java.util.List deleteProcess(WMSessionHandle shandle, java.lang.String procId, boolean administrative)
           
 void deleteProcessMgr(WMSessionHandle shandle, java.lang.String mgrName)
           
 void deleteResource(WMSessionHandle shandle, java.lang.String resUsername)
           
 java.util.List getActivitiesForProcess(WMSessionHandle shandle, java.lang.String procId, java.lang.String actState)
           
protected  DeadlineDO[] getActivitiesPersistedDeadlines(java.lang.String actId, long timeLimitBoundary)
           
 java.util.List getActivitiesWhere(WMSessionHandle shandle, java.lang.String sqlWhere, int startAt, int limit)
           
 ActivityDataDO[] getActivityDataDOArray(ActivityDO activityDO, java.lang.String sqlWhere, int startAt, int limit)
           
 ActivityDataDO getActivityDataDOSingle(ActivityDO activityDO, java.lang.String variableId)
           
protected  java.lang.Object getActivityDataValue(WMSessionHandle shandle, ActivityDataDO DO)
           
protected  java.lang.Object getActivityDataValue(WMSessionHandle shandle, ActivityDataWOBDO DO)
           
 ActivityDataWOBDO[] getActivityDataWOBDOArray(ActivityDO activityDO, java.lang.String sqlWhere, int startAt, int limit)
           
 ActivityDataWOBDO getActivityDataWOBDOSingle(ActivityDO aDO, java.lang.String variableId)
           
 ActivityVariablePersistenceObject getActivityVariable(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId, java.lang.String variableId)
           
 java.util.List getActivityVariables(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId, java.util.List variableIds)
           
 java.util.List getActivityVariablesWhere(WMSessionHandle shandle, java.lang.String activityId, java.lang.String sqlWhere, int startAt, int limit)
           
 java.util.List getAllActiveActivitiesForProcess(WMSessionHandle shandle, java.lang.String procId)
           
 java.util.List getAllActivities(WMSessionHandle shandle)
           
 java.util.List getAllActivitiesForProcess(WMSessionHandle shandle, java.lang.String procId)
           
 java.util.List getAllAssignments(WMSessionHandle shandle)
           
 java.util.List getAllAssignmentsForActivity(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId)
          Returns all assignments that are ever created for that activity, no matter if activity is already in "closed" state or some of its sub-states.
 java.util.List getAllAssignmentsForResource(WMSessionHandle shandle, java.lang.String resUsername)
          Returns all assignments for the resource, no matter if its activity is in "closed" state (or some of its sub-states).
 java.util.List getAllDeadlinesForActivity(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId)
           
 java.util.List getAllDeadlinesForActivity(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId, long timeLimitBoundary)
           
 java.util.List getAllDeadlinesForProcess(WMSessionHandle shandle, java.lang.String procId)
           
 java.util.List getAllDeadlinesForProcess(WMSessionHandle shandle, java.lang.String procId, long timeLimitBoundary)
           
 java.util.List getAllFinishedActivitiesForProcess(WMSessionHandle shandle, java.lang.String procId)
           
 java.util.List getAllFinishedProcesses(WMSessionHandle shandle)
           
 java.util.List getAllIdsForProcessesWithExpiriedDeadlines(WMSessionHandle shandle, long timeLimitBoundary)
           
protected  AssignmentDO[] getAllPersistedAssignments(java.lang.String sqlWhere, int startAt, int limit)
           
protected  ProcessDefinitionDO[] getAllPersistedProcessMgrs(java.lang.String where, int startAt, int limit)
           
protected  ResourceDO[] getAllPersistedResources(java.lang.String sqlWhere, int startAt, int limit)
           
 java.util.List getAllProcesses(WMSessionHandle shandle)
           
 java.util.List getAllProcessesForMgr(WMSessionHandle shandle, java.lang.String mgrName)
           
 java.util.List getAllProcessMgrs(WMSessionHandle shandle)
           
 java.util.List getAllResources(WMSessionHandle shandle)
           
 java.util.List getAllRunningProcesses(WMSessionHandle shandle)
           
 java.util.List getAllValidAssignmentsForActivity(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId)
          If activity is in "closed" state, or some of its sub-states, returns an empty list, otherwise it returns either all assignments that are ever created for that activity if activity is not accepted, or just the assignment for the resource that accepted activity.
 java.util.List getAllValidAssignmentsForResource(WMSessionHandle shandle, java.lang.String resUsername)
          Returns only the assignments that can be currently executed by the resource with a given username.
 java.util.List getAllVariablesForActivity(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId)
           
protected  java.util.List getAllVariablesForActivityBLOB(WMSessionHandle shandle, java.lang.String actId)
           
protected  java.util.List getAllVariablesForActivityWOB(WMSessionHandle shandle, java.lang.String actId)
           
 java.util.List getAllVariablesForProcess(WMSessionHandle shandle, java.lang.String procId)
           
protected  java.util.List getAllVariablesForProcessBLOB(WMSessionHandle shandle, java.lang.String procId)
           
protected  java.util.List getAllVariablesForProcessWOB(WMSessionHandle shandle, java.lang.String procId)
           
 java.util.List getAndJoinEntries(WMSessionHandle shandle, java.lang.String procId, java.lang.String blockActId, java.lang.String aDefId)
           
 java.util.List getAssignmentsWhere(WMSessionHandle shandle, java.lang.String sqlWhere, int startAt, int limit)
           
 int getExecuteCount(WMSessionHandle shandle, java.lang.String procId, java.lang.String aDefId)
           
 java.math.BigDecimal getNextDecId(java.lang.String idName)
           
 java.lang.String getNextId(java.lang.String idName)
           
protected  ActivityDO[] getPersistedActivities(int type, ProcessDO pDO, java.lang.String sqlWhere, int startAt, int limit)
           
protected  ActivityDO getPersistedActivityObject(java.lang.String actId)
           
protected  ActivityStateDO getPersistedActivityStateObject(java.lang.String value, boolean searchByKeyValue, com.lutris.appserver.server.sql.DBTransaction ti)
           
protected  ActivityDataBLOBDO getPersistedActivityVariableBLOBObject(ActivityDataWOBDO adDO)
           
protected  ActivityDataDO getPersistedActivityVariableObject(java.lang.String actId, java.lang.String defId)
           
protected  ActivityDataWOBDO getPersistedActivityVariableObject2(java.lang.String actId, java.lang.String defId)
           
protected  ActivityDataDO[] getPersistedActivityVariableObjects(java.lang.String actId, java.lang.String defId)
           
protected  ActivityDataWOBDO[] getPersistedActivityVariableObjects2(java.lang.String procId, java.lang.String defId)
           
protected  AndJoinEntryDO[] getPersistedAndJoinEntries(java.lang.String procId, java.lang.String blockActId, java.lang.String aDefId)
           
protected  AssignmentDO getPersistedAssignmentObject(java.lang.String actId, java.lang.String username)
           
protected  DeadlineDO getPersistedDeadlineObject(java.lang.String uniqueId)
           
protected  DeadlineDO[] getPersistedDeadlines(java.lang.String procId, long timeLimitBoundary)
           
protected  ActivityDataBLOBDO getPersistedObject(ActivityDataWOBDO adDO)
           
protected  ActivityDO getPersistedObject(ActivityPersistenceObject act)
           
protected  ActivityDataDO getPersistedObject(ActivityVariablePersistenceObject var)
           
protected  AssignmentDO getPersistedObject(AssignmentPersistenceObject ass)
           
protected  DeadlineDO getPersistedObject(DeadlinePersistenceObject dpe)
           
protected  ProcessDataBLOBDO getPersistedObject(ProcessDataWOBDO pdDO)
           
protected  ProcessDefinitionDO getPersistedObject(ProcessMgrPersistenceObject mgr)
           
protected  ProcessDO getPersistedObject(ProcessPersistenceObject proc)
           
protected  ProcessDataDO getPersistedObject(ProcessVariablePersistenceObject var)
           
protected  ResourceDO getPersistedObject(ResourcePersistenceObject res)
           
protected  ActivityDataWOBDO getPersistedObject2(ActivityVariablePersistenceObject var)
           
protected  ProcessDataWOBDO getPersistedObject2(ProcessVariablePersistenceObject var)
           
protected  ActivityDataDO[] getPersistedObjects(ActivityVariablePersistenceObject var)
           
protected  ProcessDataDO[] getPersistedObjects(ProcessVariablePersistenceObject var)
           
protected  ActivityDataWOBDO[] getPersistedObjects2(ActivityVariablePersistenceObject var)
           
protected  ProcessDataWOBDO[] getPersistedObjects2(ProcessVariablePersistenceObject var)
           
protected  ProcessDO[] getPersistedProcesses(int type, java.lang.String sqlWhere, int startAt, int limit)
           
protected  ProcessDefinitionDO getPersistedProcessMgrObject(java.lang.String name)
           
protected  ProcessDO getPersistedProcessObject(java.lang.String procId)
           
protected  ProcessStateDO getPersistedProcessStateObject(java.lang.String value, boolean searchByKeyValue, com.lutris.appserver.server.sql.DBTransaction ti)
           
protected  ProcessDataBLOBDO getPersistedProcessVariableBLOBObject(ProcessDataWOBDO pdDO)
           
protected  ProcessDataDO getPersistedProcessVariableObject(java.lang.String procId, java.lang.String defId)
           
protected  ProcessDataWOBDO getPersistedProcessVariableObject2(java.lang.String procId, java.lang.String defId)
           
protected  ProcessDataDO[] getPersistedProcessVariableObjects(java.lang.String procId, java.lang.String defId)
           
protected  ProcessDataWOBDO[] getPersistedProcessVariableObjects2(java.lang.String procId, java.lang.String defId)
           
protected  ProcessRequesterDO getPersistedRequesterObject(java.lang.String procId)
           
protected  ResourceDO getPersistedResourceObject(java.lang.String username)
           
 ProcessDataDO[] getProcessDataDOArray(ProcessDO processDO, java.lang.String sqlWhere, int startAt, int limit)
           
 ProcessDataDO getProcessDataDOSingle(ProcessDO processDO, java.lang.String variableId)
           
protected  java.lang.Object getProcessDataValue(WMSessionHandle shandle, ProcessDataDO DO)
           
protected  java.lang.Object getProcessDataValue(WMSessionHandle shandle, ProcessDataWOBDO DO)
           
 ProcessDataWOBDO[] getProcessDataWOBDOArray(ProcessDO pDO, java.lang.String sqlWhere, int startAt, int limit)
           
 ProcessDataWOBDO getProcessDataWOBDOSingle(ProcessDO pDO, java.lang.String variableId)
           
 java.util.List getProcessesWhere(WMSessionHandle shandle, java.lang.String sqlWhere, int startAt, int limit)
           
 java.util.List getProcessMgrsWhere(WMSessionHandle shandle, java.lang.String sqlWhere, int startAt, int limit)
           
protected  ProcessRequesterDO getProcessRequester(java.lang.String procId)
           
 ProcessVariablePersistenceObject getProcessVariable(WMSessionHandle shandle, java.lang.String procId, java.lang.String variableId)
           
 java.util.List getProcessVariables(WMSessionHandle shandle, java.lang.String procId, java.util.List variableIds)
           
 java.util.List getProcessVariablesWhere(WMSessionHandle shandle, java.lang.String processId, java.lang.String sqlWhere, int startAt, int limit)
           
 java.util.List getResourceRequestersProcessIds(WMSessionHandle shandle, java.lang.String resUsername)
           
 java.util.List getResourcesWhere(WMSessionHandle shandle, java.lang.String sqlWhere, int startAt, int limit)
           
protected  java.util.List getSortedVariableDOs(ActivityDataDO[] DOs)
           
protected  java.util.List getSortedVariableDOs(ActivityDataWOBDO[] DOs)
           
protected  java.util.List getSortedVariableDOs(ProcessDataDO[] DOs)
           
protected  java.util.List getSortedVariableDOs(ProcessDataWOBDO[] DOs)
           
protected  ActivityVariablePersistenceObject getVariableForActivityBLOB(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId, java.lang.String variableId)
           
protected  ActivityVariablePersistenceObject getVariableForActivityWOB(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId, java.lang.String variableId)
           
protected  ProcessVariablePersistenceObject getVariableForProcessBLOB(WMSessionHandle shandle, java.lang.String procId, java.lang.String variableId)
           
protected  ProcessVariablePersistenceObject getVariableForProcessWOB(WMSessionHandle shandle, java.lang.String procId, java.lang.String variableId)
           
protected  java.util.List getVariablesForActivityBLOB(WMSessionHandle shandle, java.lang.String activityId, java.lang.String sqlWhere, int startAt, int limit)
           
protected  java.util.List getVariablesForActivityWOB(WMSessionHandle shandle, java.lang.String activityId, java.lang.String sqlWhere, int startAt, int limit)
           
protected  java.util.List getVariablesForProcessBLOB(WMSessionHandle shandle, java.lang.String processId, java.lang.String sqlWhere, int startAt, int limit)
           
protected  java.util.List getVariablesForProcessWOB(WMSessionHandle shandle, java.lang.String processId, java.lang.String sqlWhere, int startAt, int limit)
           
 int howManyAndJoinEntries(WMSessionHandle shandle, java.lang.String procId, java.lang.String blockActId, java.lang.String aDefId)
           
protected  void initActivityAndProcessStatesTable()
          Fills the state table with possible activity and process states.
 void migrate(WMSessionHandle shandle, ActivityPersistenceObject actPO)
           
 void migrate(WMSessionHandle shandle, ProcessPersistenceObject prPO)
           
protected  void performCascadeDeletion(WMSessionHandle shandle, java.lang.String procId, java.util.Map procIds)
           
 void persist(WMSessionHandle shandle, ActivityPersistenceObject act, boolean isInitialPersistence)
           
 void persist(WMSessionHandle shandle, ActivityVariablePersistenceObject var, boolean isInitialPersistence)
           
 void persist(WMSessionHandle shandle, AndJoinEntryPersitenceObject aje)
           
 void persist(WMSessionHandle shandle, AssignmentPersistenceObject ass, boolean isInitialPersistence)
           
 void persist(WMSessionHandle shandle, AssignmentPersistenceObject ass, java.lang.String oldResUname)
           
 void persist(WMSessionHandle shandle, DeadlinePersistenceObject dpe, boolean isInitialPersistence)
           
 void persist(WMSessionHandle shandle, ProcessMgrPersistenceObject pm, boolean isInitialPersistence)
           
 void persist(WMSessionHandle shandle, ProcessPersistenceObject pr, boolean isInitialPersistence)
           
 void persist(WMSessionHandle shandle, ProcessVariablePersistenceObject var, boolean isInitialPersistence)
           
 void persist(WMSessionHandle shandle, ResourcePersistenceObject res, boolean isInitialPersistence)
           
protected  void persistVariablesBLOB(WMSessionHandle shandle, ActivityDataDO DO, java.lang.Object vv, boolean isInitialPersistence, int ordNo)
           
protected  void persistVariablesBLOB(WMSessionHandle shandle, ActivityVariablePersistenceObject var, boolean isInitialPersistence)
           
protected  void persistVariablesBLOB(WMSessionHandle shandle, ProcessDataDO DO, java.lang.Object vv, boolean isInitialPersistence, int ordNo)
           
protected  void persistVariablesBLOB(WMSessionHandle shandle, ProcessVariablePersistenceObject var, boolean isInitialPersistence)
           
protected  void persistVariablesWOB(WMSessionHandle shandle, ActivityDataWOBDO DO, java.lang.Object vv, boolean isInitialPersistence, int ordNo)
           
protected  void persistVariablesWOB(WMSessionHandle shandle, ActivityVariablePersistenceObject var, boolean isInitialPersistence)
           
protected  void persistVariablesWOB(WMSessionHandle shandle, ProcessDataWOBDO DO, java.lang.Object vv, boolean isInitialPersistence, int ordNo)
           
protected  void persistVariablesWOB(WMSessionHandle shandle, ProcessVariablePersistenceObject var, boolean isInitialPersistence)
           
protected  void refreshDOCaches()
           
protected  ActivityPersistenceObject restore(WMSessionHandle shandle, ActivityDO DO)
           
 boolean restore(WMSessionHandle shandle, ActivityVariablePersistenceObject var)
           
protected  AssignmentPersistenceObject restore(WMSessionHandle shandle, AssignmentDO DO)
           
protected  ProcessMgrPersistenceObject restore(WMSessionHandle shandle, ProcessDefinitionDO DO)
           
protected  ProcessPersistenceObject restore(WMSessionHandle shandle, ProcessDO DO)
           
 boolean restore(WMSessionHandle shandle, ProcessVariablePersistenceObject var)
           
protected  ResourcePersistenceObject restore(WMSessionHandle shandle, ResourceDO DO)
           
 ActivityPersistenceObject restoreActivity(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId)
           
 AssignmentPersistenceObject restoreAssignment(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId, java.lang.String resUsername)
           
protected  boolean restoreBLOB(WMSessionHandle shandle, ActivityVariablePersistenceObject engineObj, ActivityDataDO[] DOs)
           
protected  boolean restoreBLOB(WMSessionHandle shandle, ProcessVariablePersistenceObject engineObj, ProcessDataDO[] DOs)
           
 ProcessPersistenceObject restoreProcess(WMSessionHandle shandle, java.lang.String procId)
           
 ProcessMgrPersistenceObject restoreProcessMgr(WMSessionHandle shandle, java.lang.String mgrName)
           
 ResourcePersistenceObject restoreResource(WMSessionHandle shandle, java.lang.String resUsername)
           
protected  boolean restoreWOB(WMSessionHandle shandle, ActivityVariablePersistenceObject engineObj, ActivityDataWOBDO[] DOs)
           
protected  boolean restoreWOB(WMSessionHandle shandle, ProcessVariablePersistenceObject engineObj, ProcessDataWOBDO[] DOs)
           
protected  void setLDBName()
           
 void shutdownDatabase(WMSessionHandle shandle)
           
 void synchronizeProcess(WMSessionHandle shandle, java.lang.String procId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_CHANNEL

protected static final java.lang.String LOG_CHANNEL
See Also:
Constant Field Values

DB_TYPE_BOOLEAN

protected static final short DB_TYPE_BOOLEAN
See Also:
Constant Field Values

DB_TYPE_LONG

protected static final short DB_TYPE_LONG
See Also:
Constant Field Values

DB_TYPE_DOUBLE

protected static final short DB_TYPE_DOUBLE
See Also:
Constant Field Values

DB_TYPE_VCHAR

protected static final short DB_TYPE_VCHAR
See Also:
Constant Field Values

DB_TYPE_DATE

protected static final short DB_TYPE_DATE
See Also:
Constant Field Values

DB_TYPE_BLOB

protected static final short DB_TYPE_BLOB
See Also:
Constant Field Values

DB_TYPE_XML

protected static final short DB_TYPE_XML
See Also:
Constant Field Values

MAX_VCHAR_SIZE_LIMIT

protected static final int MAX_VCHAR_SIZE_LIMIT
See Also:
Constant Field Values

max_vchar_size

protected static int max_vchar_size

cus

protected CallbackUtilities cus

deleteFinishedProcesses

protected boolean deleteFinishedProcesses

_prStates

protected java.util.Map _prStates

_acStates

protected java.util.Map _acStates

_prClosedStatesBigDecimals

protected java.util.List _prClosedStatesBigDecimals

_prOpenStatesBigDecimals

protected java.util.List _prOpenStatesBigDecimals

_actClosedStatesBigDecimals

protected java.util.List _actClosedStatesBigDecimals

_actOpenStatesBigDecimals

protected java.util.List _actOpenStatesBigDecimals

usingStandardVariableDataModel

protected boolean usingStandardVariableDataModel

storeArraysAsBLOBs

protected boolean storeArraysAsBLOBs

db

protected com.lutris.appserver.server.sql.LogicalDatabase db
Constructor Detail

DODSPersistentManager

public DODSPersistentManager()
Method Detail

configure

public void configure(CallbackUtilities cut)
               throws java.lang.Exception
Specified by:
configure in interface PersistentManagerInterface
Throws:
java.lang.Exception

initActivityAndProcessStatesTable

protected void initActivityAndProcessStatesTable()
                                          throws PersistenceException
Fills the state table with possible activity and process states. For now, the 'keyValue' and the 'name' attribute of state record has the same value, but in the future, if the names of states changes, it will be very easy to change this table entries without affecting other tables. NOTE: When new names are introduced, the getPersistentXXX that use it also has to be changed

Throws:
PersistenceException

shutdownDatabase

public void shutdownDatabase(WMSessionHandle shandle)
                      throws PersistenceException
Specified by:
shutdownDatabase in interface PersistentManagerInterface
Throws:
PersistenceException

persist

public void persist(WMSessionHandle shandle,
                    ProcessMgrPersistenceObject pm,
                    boolean isInitialPersistence)
             throws PersistenceException
Specified by:
persist in interface PersistentManagerInterface
Throws:
PersistenceException

persist

public void persist(WMSessionHandle shandle,
                    ProcessPersistenceObject pr,
                    boolean isInitialPersistence)
             throws PersistenceException
Specified by:
persist in interface PersistentManagerInterface
Throws:
PersistenceException

persist

public void persist(WMSessionHandle shandle,
                    ActivityPersistenceObject act,
                    boolean isInitialPersistence)
             throws PersistenceException
Specified by:
persist in interface PersistentManagerInterface
Throws:
PersistenceException

persist

public void persist(WMSessionHandle shandle,
                    ResourcePersistenceObject res,
                    boolean isInitialPersistence)
             throws PersistenceException
Specified by:
persist in interface PersistentManagerInterface
Throws:
PersistenceException

persist

public void persist(WMSessionHandle shandle,
                    AssignmentPersistenceObject ass,
                    boolean isInitialPersistence)
             throws PersistenceException
Specified by:
persist in interface PersistentManagerInterface
Throws:
PersistenceException

persist

public void persist(WMSessionHandle shandle,
                    AssignmentPersistenceObject ass,
                    java.lang.String oldResUname)
             throws PersistenceException
Specified by:
persist in interface PersistentManagerInterface
Throws:
PersistenceException

persist

public void persist(WMSessionHandle shandle,
                    ProcessVariablePersistenceObject var,
                    boolean isInitialPersistence)
             throws PersistenceException
Specified by:
persist in interface PersistentManagerInterface
Throws:
PersistenceException

persistVariablesBLOB

protected void persistVariablesBLOB(WMSessionHandle shandle,
                                    ProcessVariablePersistenceObject var,
                                    boolean isInitialPersistence)
                             throws PersistenceException
Throws:
PersistenceException

persistVariablesBLOB

protected void persistVariablesBLOB(WMSessionHandle shandle,
                                    ProcessDataDO DO,
                                    java.lang.Object vv,
                                    boolean isInitialPersistence,
                                    int ordNo)
                             throws java.lang.Throwable
Throws:
java.lang.Throwable

persistVariablesWOB

protected void persistVariablesWOB(WMSessionHandle shandle,
                                   ProcessVariablePersistenceObject var,
                                   boolean isInitialPersistence)
                            throws PersistenceException
Throws:
PersistenceException

persistVariablesWOB

protected void persistVariablesWOB(WMSessionHandle shandle,
                                   ProcessDataWOBDO DO,
                                   java.lang.Object vv,
                                   boolean isInitialPersistence,
                                   int ordNo)
                            throws java.lang.Throwable
Throws:
java.lang.Throwable

persist

public void persist(WMSessionHandle shandle,
                    ActivityVariablePersistenceObject var,
                    boolean isInitialPersistence)
             throws PersistenceException
Specified by:
persist in interface PersistentManagerInterface
Throws:
PersistenceException

persistVariablesBLOB

protected void persistVariablesBLOB(WMSessionHandle shandle,
                                    ActivityVariablePersistenceObject var,
                                    boolean isInitialPersistence)
                             throws PersistenceException
Throws:
PersistenceException

persistVariablesBLOB

protected void persistVariablesBLOB(WMSessionHandle shandle,
                                    ActivityDataDO DO,
                                    java.lang.Object vv,
                                    boolean isInitialPersistence,
                                    int ordNo)
                             throws java.lang.Throwable
Throws:
java.lang.Throwable

persistVariablesWOB

protected void persistVariablesWOB(WMSessionHandle shandle,
                                   ActivityVariablePersistenceObject var,
                                   boolean isInitialPersistence)
                            throws PersistenceException
Throws:
PersistenceException

persistVariablesWOB

protected void persistVariablesWOB(WMSessionHandle shandle,
                                   ActivityDataWOBDO DO,
                                   java.lang.Object vv,
                                   boolean isInitialPersistence,
                                   int ordNo)
                            throws java.lang.Throwable
Throws:
java.lang.Throwable

persist

public void persist(WMSessionHandle shandle,
                    AndJoinEntryPersitenceObject aje)
             throws PersistenceException
Specified by:
persist in interface PersistentManagerInterface
Throws:
PersistenceException

persist

public void persist(WMSessionHandle shandle,
                    DeadlinePersistenceObject dpe,
                    boolean isInitialPersistence)
             throws PersistenceException
Specified by:
persist in interface PersistentManagerInterface
Throws:
PersistenceException

restoreProcessMgr

public ProcessMgrPersistenceObject restoreProcessMgr(WMSessionHandle shandle,
                                                     java.lang.String mgrName)
                                              throws PersistenceException
Specified by:
restoreProcessMgr in interface PersistentManagerInterface
Throws:
PersistenceException

restore

protected ProcessMgrPersistenceObject restore(WMSessionHandle shandle,
                                              ProcessDefinitionDO DO)
                                       throws PersistenceException
Throws:
PersistenceException

restoreProcess

public ProcessPersistenceObject restoreProcess(WMSessionHandle shandle,
                                               java.lang.String procId)
                                        throws PersistenceException
Specified by:
restoreProcess in interface PersistentManagerInterface
Throws:
PersistenceException

restore

protected ProcessPersistenceObject restore(WMSessionHandle shandle,
                                           ProcessDO DO)
                                    throws PersistenceException
Throws:
PersistenceException

restoreActivity

public ActivityPersistenceObject restoreActivity(WMSessionHandle shandle,
                                                 java.lang.String procId,
                                                 java.lang.String actId)
                                          throws PersistenceException
Specified by:
restoreActivity in interface PersistentManagerInterface
Throws:
PersistenceException

restore

protected ActivityPersistenceObject restore(WMSessionHandle shandle,
                                            ActivityDO DO)
                                     throws PersistenceException
Throws:
PersistenceException

restoreResource

public ResourcePersistenceObject restoreResource(WMSessionHandle shandle,
                                                 java.lang.String resUsername)
                                          throws PersistenceException
Specified by:
restoreResource in interface PersistentManagerInterface
Throws:
PersistenceException

restore

protected ResourcePersistenceObject restore(WMSessionHandle shandle,
                                            ResourceDO DO)
                                     throws PersistenceException
Throws:
PersistenceException

restoreAssignment

public AssignmentPersistenceObject restoreAssignment(WMSessionHandle shandle,
                                                     java.lang.String procId,
                                                     java.lang.String actId,
                                                     java.lang.String resUsername)
                                              throws PersistenceException
Specified by:
restoreAssignment in interface PersistentManagerInterface
Throws:
PersistenceException

restore

protected AssignmentPersistenceObject restore(WMSessionHandle shandle,
                                              AssignmentDO DO)
                                       throws PersistenceException
Throws:
PersistenceException

restore

public boolean restore(WMSessionHandle shandle,
                       ProcessVariablePersistenceObject var)
                throws PersistenceException
Specified by:
restore in interface PersistentManagerInterface
Throws:
PersistenceException

restoreBLOB

protected boolean restoreBLOB(WMSessionHandle shandle,
                              ProcessVariablePersistenceObject engineObj,
                              ProcessDataDO[] DOs)
                       throws PersistenceException
Throws:
PersistenceException

getProcessDataValue

protected java.lang.Object getProcessDataValue(WMSessionHandle shandle,
                                               ProcessDataDO DO)
                                        throws java.lang.Throwable
Throws:
java.lang.Throwable

restoreWOB

protected boolean restoreWOB(WMSessionHandle shandle,
                             ProcessVariablePersistenceObject engineObj,
                             ProcessDataWOBDO[] DOs)
                      throws PersistenceException
Throws:
PersistenceException

createArray

protected java.lang.Object[] createArray(short vtype,
                                         int length)

getProcessDataValue

protected java.lang.Object getProcessDataValue(WMSessionHandle shandle,
                                               ProcessDataWOBDO DO)
                                        throws java.lang.Throwable
Throws:
java.lang.Throwable

restore

public boolean restore(WMSessionHandle shandle,
                       ActivityVariablePersistenceObject var)
                throws PersistenceException
Specified by:
restore in interface PersistentManagerInterface
Throws:
PersistenceException

restoreBLOB

protected boolean restoreBLOB(WMSessionHandle shandle,
                              ActivityVariablePersistenceObject engineObj,
                              ActivityDataDO[] DOs)
                       throws PersistenceException
Throws:
PersistenceException

getActivityDataValue

protected java.lang.Object getActivityDataValue(WMSessionHandle shandle,
                                                ActivityDataDO DO)
                                         throws java.lang.Throwable
Throws:
java.lang.Throwable

restoreWOB

protected boolean restoreWOB(WMSessionHandle shandle,
                             ActivityVariablePersistenceObject engineObj,
                             ActivityDataWOBDO[] DOs)
                      throws PersistenceException
Throws:
PersistenceException

getActivityDataValue

protected java.lang.Object getActivityDataValue(WMSessionHandle shandle,
                                                ActivityDataWOBDO DO)
                                         throws java.lang.Throwable
Throws:
java.lang.Throwable

deleteProcessMgr

public void deleteProcessMgr(WMSessionHandle shandle,
                             java.lang.String mgrName)
                      throws PersistenceException
Specified by:
deleteProcessMgr in interface PersistentManagerInterface
Throws:
PersistenceException

deleteProcess

public java.util.List deleteProcess(WMSessionHandle shandle,
                                    java.lang.String procId,
                                    boolean administrative)
                             throws PersistenceException
Specified by:
deleteProcess in interface PersistentManagerInterface
Throws:
PersistenceException

performCascadeDeletion

protected void performCascadeDeletion(WMSessionHandle shandle,
                                      java.lang.String procId,
                                      java.util.Map procIds)
                               throws java.lang.Exception
Throws:
java.lang.Exception

deleteActivity

public void deleteActivity(WMSessionHandle shandle,
                           java.lang.String procId,
                           java.lang.String actId)
                    throws PersistenceException
Specified by:
deleteActivity in interface PersistentManagerInterface
Throws:
PersistenceException

deleteResource

public void deleteResource(WMSessionHandle shandle,
                           java.lang.String resUsername)
                    throws PersistenceException
Specified by:
deleteResource in interface PersistentManagerInterface
Throws:
PersistenceException

deleteAssignment

public void deleteAssignment(WMSessionHandle shandle,
                             java.lang.String procId,
                             java.lang.String actId,
                             java.lang.String resUsername)
                      throws PersistenceException
Specified by:
deleteAssignment in interface PersistentManagerInterface
Throws:
PersistenceException

deleteAndJoinEntries

public void deleteAndJoinEntries(WMSessionHandle shandle,
                                 java.lang.String procId,
                                 java.lang.String blockActId,
                                 java.lang.String aDefId)
                          throws PersistenceException
Specified by:
deleteAndJoinEntries in interface PersistentManagerInterface
Throws:
PersistenceException

deleteDeadlines

public void deleteDeadlines(WMSessionHandle shandle,
                            java.lang.String procId)
                     throws PersistenceException
Specified by:
deleteDeadlines in interface PersistentManagerInterface
Throws:
PersistenceException

deleteDeadlines

public void deleteDeadlines(WMSessionHandle shandle,
                            java.lang.String procId,
                            java.lang.String actId)
                     throws PersistenceException
Specified by:
deleteDeadlines in interface PersistentManagerInterface
Throws:
PersistenceException

delete

public void delete(WMSessionHandle shandle,
                   ProcessVariablePersistenceObject var)
            throws PersistenceException
Specified by:
delete in interface PersistentManagerInterface
Throws:
PersistenceException

delete

public void delete(WMSessionHandle shandle,
                   ActivityVariablePersistenceObject var)
            throws PersistenceException
Specified by:
delete in interface PersistentManagerInterface
Throws:
PersistenceException

getAllProcessMgrs

public java.util.List getAllProcessMgrs(WMSessionHandle shandle)
                                 throws PersistenceException
Specified by:
getAllProcessMgrs in interface PersistentManagerInterface
Throws:
PersistenceException

getAllProcesses

public java.util.List getAllProcesses(WMSessionHandle shandle)
                               throws PersistenceException
Specified by:
getAllProcesses in interface PersistentManagerInterface
Throws:
PersistenceException

getAllRunningProcesses

public java.util.List getAllRunningProcesses(WMSessionHandle shandle)
                                      throws PersistenceException
Specified by:
getAllRunningProcesses in interface PersistentManagerInterface
Throws:
PersistenceException

getAllFinishedProcesses

public java.util.List getAllFinishedProcesses(WMSessionHandle shandle)
                                       throws PersistenceException
Specified by:
getAllFinishedProcesses in interface PersistentManagerInterface
Throws:
PersistenceException

getAllActivities

public java.util.List getAllActivities(WMSessionHandle shandle)
                                throws PersistenceException
Specified by:
getAllActivities in interface PersistentManagerInterface
Throws:
PersistenceException

getAllResources

public java.util.List getAllResources(WMSessionHandle shandle)
                               throws PersistenceException
Specified by:
getAllResources in interface PersistentManagerInterface
Throws:
PersistenceException

getAllAssignments

public java.util.List getAllAssignments(WMSessionHandle shandle)
                                 throws PersistenceException
Specified by:
getAllAssignments in interface PersistentManagerInterface
Throws:
PersistenceException

getAllProcessesForMgr

public java.util.List getAllProcessesForMgr(WMSessionHandle shandle,
                                            java.lang.String mgrName)
                                     throws PersistenceException
Specified by:
getAllProcessesForMgr in interface PersistentManagerInterface
Throws:
PersistenceException

getAllActivitiesForProcess

public java.util.List getAllActivitiesForProcess(WMSessionHandle shandle,
                                                 java.lang.String procId)
                                          throws PersistenceException
Specified by:
getAllActivitiesForProcess in interface PersistentManagerInterface
Throws:
PersistenceException

getActivitiesForProcess

public java.util.List getActivitiesForProcess(WMSessionHandle shandle,
                                              java.lang.String procId,
                                              java.lang.String actState)
                                       throws PersistenceException
Specified by:
getActivitiesForProcess in interface PersistentManagerInterface
Throws:
PersistenceException

getAllFinishedActivitiesForProcess

public java.util.List getAllFinishedActivitiesForProcess(WMSessionHandle shandle,
                                                         java.lang.String procId)
                                                  throws PersistenceException
Specified by:
getAllFinishedActivitiesForProcess in interface PersistentManagerInterface
Throws:
PersistenceException

getAllActiveActivitiesForProcess

public java.util.List getAllActiveActivitiesForProcess(WMSessionHandle shandle,
                                                       java.lang.String procId)
                                                throws PersistenceException
Specified by:
getAllActiveActivitiesForProcess in interface PersistentManagerInterface
Throws:
PersistenceException

getAllAssignmentsForResource

public java.util.List getAllAssignmentsForResource(WMSessionHandle shandle,
                                                   java.lang.String resUsername)
                                            throws PersistenceException
Returns all assignments for the resource, no matter if its activity is in "closed" state (or some of its sub-states).

Specified by:
getAllAssignmentsForResource in interface PersistentManagerInterface
Throws:
PersistenceException

getAllValidAssignmentsForResource

public java.util.List getAllValidAssignmentsForResource(WMSessionHandle shandle,
                                                        java.lang.String resUsername)
                                                 throws PersistenceException
Returns only the assignments that can be currently executed by the resource with a given username. This means the ones which activity is not finished and not accepted (it doesn't have TheResource field set), and the ones which activity is accepted by this resource (its TheResource field is set to the resource with given username).

Specified by:
getAllValidAssignmentsForResource in interface PersistentManagerInterface
Throws:
PersistenceException

getAllAssignmentsForActivity

public java.util.List getAllAssignmentsForActivity(WMSessionHandle shandle,
                                                   java.lang.String procId,
                                                   java.lang.String actId)
                                            throws PersistenceException
Returns all assignments that are ever created for that activity, no matter if activity is already in "closed" state or some of its sub-states.

Specified by:
getAllAssignmentsForActivity in interface PersistentManagerInterface
Throws:
PersistenceException

getAllValidAssignmentsForActivity

public java.util.List getAllValidAssignmentsForActivity(WMSessionHandle shandle,
                                                        java.lang.String procId,
                                                        java.lang.String actId)
                                                 throws PersistenceException
If activity is in "closed" state, or some of its sub-states, returns an empty list, otherwise it returns either all assignments that are ever created for that activity if activity is not accepted, or just the assignment for the resource that accepted activity.

Specified by:
getAllValidAssignmentsForActivity in interface PersistentManagerInterface
Throws:
PersistenceException

getAllVariablesForProcess

public java.util.List getAllVariablesForProcess(WMSessionHandle shandle,
                                                java.lang.String procId)
                                         throws PersistenceException
Specified by:
getAllVariablesForProcess in interface PersistentManagerInterface
Throws:
PersistenceException

getAllVariablesForProcessBLOB

protected java.util.List getAllVariablesForProcessBLOB(WMSessionHandle shandle,
                                                       java.lang.String procId)
                                                throws PersistenceException
Throws:
PersistenceException

getSortedVariableDOs

protected java.util.List getSortedVariableDOs(ProcessDataDO[] DOs)
                                       throws java.lang.Throwable
Throws:
java.lang.Throwable

getAllVariablesForProcessWOB

protected java.util.List getAllVariablesForProcessWOB(WMSessionHandle shandle,
                                                      java.lang.String procId)
                                               throws PersistenceException
Throws:
PersistenceException

getSortedVariableDOs

protected java.util.List getSortedVariableDOs(ProcessDataWOBDO[] DOs)
                                       throws java.lang.Throwable
Throws:
java.lang.Throwable

getProcessVariables

public java.util.List getProcessVariables(WMSessionHandle shandle,
                                          java.lang.String procId,
                                          java.util.List variableIds)
                                   throws PersistenceException
Specified by:
getProcessVariables in interface PersistentManagerInterface
Throws:
PersistenceException

getAllVariablesForActivity

public java.util.List getAllVariablesForActivity(WMSessionHandle shandle,
                                                 java.lang.String procId,
                                                 java.lang.String actId)
                                          throws PersistenceException
Specified by:
getAllVariablesForActivity in interface PersistentManagerInterface
Throws:
PersistenceException

getAllVariablesForActivityBLOB

protected java.util.List getAllVariablesForActivityBLOB(WMSessionHandle shandle,
                                                        java.lang.String actId)
                                                 throws PersistenceException
Throws:
PersistenceException

getAllVariablesForActivityWOB

protected java.util.List getAllVariablesForActivityWOB(WMSessionHandle shandle,
                                                       java.lang.String actId)
                                                throws PersistenceException
Throws:
PersistenceException

getActivityVariables

public java.util.List getActivityVariables(WMSessionHandle shandle,
                                           java.lang.String procId,
                                           java.lang.String actId,
                                           java.util.List variableIds)
                                    throws PersistenceException
Specified by:
getActivityVariables in interface PersistentManagerInterface
Throws:
PersistenceException

getSortedVariableDOs

protected java.util.List getSortedVariableDOs(ActivityDataDO[] DOs)
                                       throws java.lang.Throwable
Throws:
java.lang.Throwable

getSortedVariableDOs

protected java.util.List getSortedVariableDOs(ActivityDataWOBDO[] DOs)
                                       throws java.lang.Throwable
Throws:
java.lang.Throwable

getResourceRequestersProcessIds

public java.util.List getResourceRequestersProcessIds(WMSessionHandle shandle,
                                                      java.lang.String resUsername)
                                               throws PersistenceException
Specified by:
getResourceRequestersProcessIds in interface PersistentManagerInterface
Throws:
PersistenceException

getAndJoinEntries

public java.util.List getAndJoinEntries(WMSessionHandle shandle,
                                        java.lang.String procId,
                                        java.lang.String blockActId,
                                        java.lang.String aDefId)
                                 throws PersistenceException
Specified by:
getAndJoinEntries in interface PersistentManagerInterface
Throws:
PersistenceException

howManyAndJoinEntries

public int howManyAndJoinEntries(WMSessionHandle shandle,
                                 java.lang.String procId,
                                 java.lang.String blockActId,
                                 java.lang.String aDefId)
                          throws PersistenceException
Specified by:
howManyAndJoinEntries in interface PersistentManagerInterface
Throws:
PersistenceException

getExecuteCount

public int getExecuteCount(WMSessionHandle shandle,
                           java.lang.String procId,
                           java.lang.String aDefId)
                    throws PersistenceException
Specified by:
getExecuteCount in interface PersistentManagerInterface
Throws:
PersistenceException

getAllDeadlinesForProcess

public java.util.List getAllDeadlinesForProcess(WMSessionHandle shandle,
                                                java.lang.String procId)
                                         throws PersistenceException
Specified by:
getAllDeadlinesForProcess in interface PersistentManagerInterface
Throws:
PersistenceException

getAllDeadlinesForProcess

public java.util.List getAllDeadlinesForProcess(WMSessionHandle shandle,
                                                java.lang.String procId,
                                                long timeLimitBoundary)
                                         throws PersistenceException
Specified by:
getAllDeadlinesForProcess in interface PersistentManagerInterface
Throws:
PersistenceException

getAllDeadlinesForActivity

public java.util.List getAllDeadlinesForActivity(WMSessionHandle shandle,
                                                 java.lang.String procId,
                                                 java.lang.String actId)
                                          throws PersistenceException
Specified by:
getAllDeadlinesForActivity in interface PersistentManagerInterface
Throws:
PersistenceException

getAllDeadlinesForActivity

public java.util.List getAllDeadlinesForActivity(WMSessionHandle shandle,
                                                 java.lang.String procId,
                                                 java.lang.String actId,
                                                 long timeLimitBoundary)
                                          throws PersistenceException
Specified by:
getAllDeadlinesForActivity in interface PersistentManagerInterface
Throws:
PersistenceException

getAllIdsForProcessesWithExpiriedDeadlines

public java.util.List getAllIdsForProcessesWithExpiriedDeadlines(WMSessionHandle shandle,
                                                                 long timeLimitBoundary)
                                                          throws PersistenceException
Specified by:
getAllIdsForProcessesWithExpiriedDeadlines in interface PersistentManagerInterface
Throws:
PersistenceException

getPersistedObject

protected ProcessDefinitionDO getPersistedObject(ProcessMgrPersistenceObject mgr)
                                          throws PersistenceException
Throws:
PersistenceException

getPersistedProcessMgrObject

protected ProcessDefinitionDO getPersistedProcessMgrObject(java.lang.String name)
                                                    throws PersistenceException
Throws:
PersistenceException

getAllPersistedProcessMgrs

protected ProcessDefinitionDO[] getAllPersistedProcessMgrs(java.lang.String where,
                                                           int startAt,
                                                           int limit)
                                                    throws PersistenceException
Throws:
PersistenceException

getPersistedObject

protected ProcessDO getPersistedObject(ProcessPersistenceObject proc)
                                throws PersistenceException
Throws:
PersistenceException

getPersistedProcesses

protected ProcessDO[] getPersistedProcesses(int type,
                                            java.lang.String sqlWhere,
                                            int startAt,
                                            int limit)
                                     throws PersistenceException
Throws:
PersistenceException

getPersistedProcessObject

protected ProcessDO getPersistedProcessObject(java.lang.String procId)
                                       throws PersistenceException
Throws:
PersistenceException

getProcessRequester

protected ProcessRequesterDO getProcessRequester(java.lang.String procId)
                                          throws PersistenceException
Throws:
PersistenceException

getPersistedRequesterObject

protected ProcessRequesterDO getPersistedRequesterObject(java.lang.String procId)
                                                  throws PersistenceException
Throws:
PersistenceException

getPersistedObject

protected ActivityDO getPersistedObject(ActivityPersistenceObject act)
                                 throws PersistenceException
Throws:
PersistenceException

getPersistedActivities

protected ActivityDO[] getPersistedActivities(int type,
                                              ProcessDO pDO,
                                              java.lang.String sqlWhere,
                                              int startAt,
                                              int limit)
                                       throws PersistenceException
Throws:
PersistenceException

getPersistedActivityObject

protected ActivityDO getPersistedActivityObject(java.lang.String actId)
                                         throws PersistenceException
Throws:
PersistenceException

getPersistedObject

protected ResourceDO getPersistedObject(ResourcePersistenceObject res)
                                 throws PersistenceException
Throws:
PersistenceException

getPersistedResourceObject

protected ResourceDO getPersistedResourceObject(java.lang.String username)
                                         throws PersistenceException
Throws:
PersistenceException

getAllPersistedResources

protected ResourceDO[] getAllPersistedResources(java.lang.String sqlWhere,
                                                int startAt,
                                                int limit)
                                         throws PersistenceException
Throws:
PersistenceException

getPersistedObject

protected AssignmentDO getPersistedObject(AssignmentPersistenceObject ass)
                                   throws PersistenceException
Throws:
PersistenceException

getPersistedAssignmentObject

protected AssignmentDO getPersistedAssignmentObject(java.lang.String actId,
                                                    java.lang.String username)
                                             throws PersistenceException
Throws:
PersistenceException

getAllPersistedAssignments

protected AssignmentDO[] getAllPersistedAssignments(java.lang.String sqlWhere,
                                                    int startAt,
                                                    int limit)
                                             throws PersistenceException
Throws:
PersistenceException

getPersistedAndJoinEntries

protected AndJoinEntryDO[] getPersistedAndJoinEntries(java.lang.String procId,
                                                      java.lang.String blockActId,
                                                      java.lang.String aDefId)
                                               throws PersistenceException
Throws:
PersistenceException

getPersistedDeadlines

protected DeadlineDO[] getPersistedDeadlines(java.lang.String procId,
                                             long timeLimitBoundary)
                                      throws PersistenceException
Throws:
PersistenceException

getActivitiesPersistedDeadlines

protected DeadlineDO[] getActivitiesPersistedDeadlines(java.lang.String actId,
                                                       long timeLimitBoundary)
                                                throws PersistenceException
Throws:
PersistenceException

getPersistedObject

protected DeadlineDO getPersistedObject(DeadlinePersistenceObject dpe)
                                 throws PersistenceException
Throws:
PersistenceException

getPersistedDeadlineObject

protected DeadlineDO getPersistedDeadlineObject(java.lang.String uniqueId)
                                         throws PersistenceException
Throws:
PersistenceException

getPersistedObject

protected ProcessDataDO getPersistedObject(ProcessVariablePersistenceObject var)
                                    throws PersistenceException
Throws:
PersistenceException

getPersistedProcessVariableObject

protected ProcessDataDO getPersistedProcessVariableObject(java.lang.String procId,
                                                          java.lang.String defId)
                                                   throws PersistenceException
Throws:
PersistenceException

getPersistedObjects

protected ProcessDataDO[] getPersistedObjects(ProcessVariablePersistenceObject var)
                                       throws PersistenceException
Throws:
PersistenceException

getPersistedProcessVariableObjects

protected ProcessDataDO[] getPersistedProcessVariableObjects(java.lang.String procId,
                                                             java.lang.String defId)
                                                      throws PersistenceException
Throws:
PersistenceException

getPersistedObject2

protected ProcessDataWOBDO getPersistedObject2(ProcessVariablePersistenceObject var)
                                        throws PersistenceException
Throws:
PersistenceException

getPersistedProcessVariableObject2

protected ProcessDataWOBDO getPersistedProcessVariableObject2(java.lang.String procId,
                                                              java.lang.String defId)
                                                       throws PersistenceException
Throws:
PersistenceException

getPersistedObjects2

protected ProcessDataWOBDO[] getPersistedObjects2(ProcessVariablePersistenceObject var)
                                           throws PersistenceException
Throws:
PersistenceException

getPersistedProcessVariableObjects2

protected ProcessDataWOBDO[] getPersistedProcessVariableObjects2(java.lang.String procId,
                                                                 java.lang.String defId)
                                                          throws PersistenceException
Throws:
PersistenceException

getPersistedObject

protected ProcessDataBLOBDO getPersistedObject(ProcessDataWOBDO pdDO)
                                        throws PersistenceException
Throws:
PersistenceException

getPersistedProcessVariableBLOBObject

protected ProcessDataBLOBDO getPersistedProcessVariableBLOBObject(ProcessDataWOBDO pdDO)
                                                           throws PersistenceException
Throws:
PersistenceException

getPersistedObject

protected ActivityDataDO getPersistedObject(ActivityVariablePersistenceObject var)
                                     throws PersistenceException
Throws:
PersistenceException

getPersistedActivityVariableObject

protected ActivityDataDO getPersistedActivityVariableObject(java.lang.String actId,
                                                            java.lang.String defId)
                                                     throws PersistenceException
Throws:
PersistenceException

getPersistedObjects

protected ActivityDataDO[] getPersistedObjects(ActivityVariablePersistenceObject var)
                                        throws PersistenceException
Throws:
PersistenceException

getPersistedActivityVariableObjects

protected ActivityDataDO[] getPersistedActivityVariableObjects(java.lang.String actId,
                                                               java.lang.String defId)
                                                        throws PersistenceException
Throws:
PersistenceException

getPersistedObject2

protected ActivityDataWOBDO getPersistedObject2(ActivityVariablePersistenceObject var)
                                         throws PersistenceException
Throws:
PersistenceException

getPersistedActivityVariableObject2

protected ActivityDataWOBDO getPersistedActivityVariableObject2(java.lang.String actId,
                                                                java.lang.String defId)
                                                         throws PersistenceException
Throws:
PersistenceException

getPersistedObjects2

protected ActivityDataWOBDO[] getPersistedObjects2(ActivityVariablePersistenceObject var)
                                            throws PersistenceException
Throws:
PersistenceException

getPersistedActivityVariableObjects2

protected ActivityDataWOBDO[] getPersistedActivityVariableObjects2(java.lang.String procId,
                                                                   java.lang.String defId)
                                                            throws PersistenceException
Throws:
PersistenceException

getPersistedObject

protected ActivityDataBLOBDO getPersistedObject(ActivityDataWOBDO adDO)
                                         throws PersistenceException
Throws:
PersistenceException

getPersistedActivityVariableBLOBObject

protected ActivityDataBLOBDO getPersistedActivityVariableBLOBObject(ActivityDataWOBDO adDO)
                                                             throws PersistenceException
Throws:
PersistenceException

getPersistedActivityStateObject

protected ActivityStateDO getPersistedActivityStateObject(java.lang.String value,
                                                          boolean searchByKeyValue,
                                                          com.lutris.appserver.server.sql.DBTransaction ti)
                                                   throws PersistenceException
Throws:
PersistenceException

getPersistedProcessStateObject

protected ProcessStateDO getPersistedProcessStateObject(java.lang.String value,
                                                        boolean searchByKeyValue,
                                                        com.lutris.appserver.server.sql.DBTransaction ti)
                                                 throws PersistenceException
Throws:
PersistenceException

getNextDecId

public java.math.BigDecimal getNextDecId(java.lang.String idName)
                                  throws PersistenceException
Throws:
PersistenceException

getNextId

public java.lang.String getNextId(java.lang.String idName)
                           throws PersistenceException
Specified by:
getNextId in interface PersistentManagerInterface
Throws:
PersistenceException

getProcessMgrsWhere

public java.util.List getProcessMgrsWhere(WMSessionHandle shandle,
                                          java.lang.String sqlWhere,
                                          int startAt,
                                          int limit)
                                   throws PersistenceException
Specified by:
getProcessMgrsWhere in interface PersistentManagerInterface
Throws:
PersistenceException

getResourcesWhere

public java.util.List getResourcesWhere(WMSessionHandle shandle,
                                        java.lang.String sqlWhere,
                                        int startAt,
                                        int limit)
                                 throws PersistenceException
Specified by:
getResourcesWhere in interface PersistentManagerInterface
Throws:
PersistenceException

getAssignmentsWhere

public java.util.List getAssignmentsWhere(WMSessionHandle shandle,
                                          java.lang.String sqlWhere,
                                          int startAt,
                                          int limit)
                                   throws PersistenceException
Specified by:
getAssignmentsWhere in interface PersistentManagerInterface
Throws:
PersistenceException

getProcessesWhere

public java.util.List getProcessesWhere(WMSessionHandle shandle,
                                        java.lang.String sqlWhere,
                                        int startAt,
                                        int limit)
                                 throws PersistenceException
Specified by:
getProcessesWhere in interface PersistentManagerInterface
Throws:
PersistenceException

getActivitiesWhere

public java.util.List getActivitiesWhere(WMSessionHandle shandle,
                                         java.lang.String sqlWhere,
                                         int startAt,
                                         int limit)
                                  throws PersistenceException
Specified by:
getActivitiesWhere in interface PersistentManagerInterface
Throws:
PersistenceException

synchronizeProcess

public void synchronizeProcess(WMSessionHandle shandle,
                               java.lang.String procId)
                        throws PersistenceException
Specified by:
synchronizeProcess in interface PersistentManagerInterface
Throws:
PersistenceException

canDeleteFinishedProcess

protected boolean canDeleteFinishedProcess(WMSessionHandle shandle,
                                           java.lang.String procId)
                                    throws java.lang.Exception
Throws:
java.lang.Exception

__getDBTransaction

protected com.lutris.appserver.server.sql.DBTransaction __getDBTransaction()
                                                                    throws java.lang.Exception
Throws:
java.lang.Exception

setLDBName

protected void setLDBName()

refreshDOCaches

protected void refreshDOCaches()
                        throws java.lang.Exception
Throws:
java.lang.Exception

migrate

public void migrate(WMSessionHandle shandle,
                    ProcessPersistenceObject prPO)
             throws PersistenceException
Specified by:
migrate in interface PersistentManagerInterface
Throws:
PersistenceException

getProcessVariable

public ProcessVariablePersistenceObject getProcessVariable(WMSessionHandle shandle,
                                                           java.lang.String procId,
                                                           java.lang.String variableId)
                                                    throws PersistenceException
Specified by:
getProcessVariable in interface PersistentManagerInterface
Throws:
PersistenceException

getActivityVariable

public ActivityVariablePersistenceObject getActivityVariable(WMSessionHandle shandle,
                                                             java.lang.String procId,
                                                             java.lang.String actId,
                                                             java.lang.String variableId)
                                                      throws PersistenceException
Specified by:
getActivityVariable in interface PersistentManagerInterface
Throws:
PersistenceException

getVariableForProcessBLOB

protected ProcessVariablePersistenceObject getVariableForProcessBLOB(WMSessionHandle shandle,
                                                                     java.lang.String procId,
                                                                     java.lang.String variableId)
                                                              throws PersistenceException
Throws:
PersistenceException

getVariableForProcessWOB

protected ProcessVariablePersistenceObject getVariableForProcessWOB(WMSessionHandle shandle,
                                                                    java.lang.String procId,
                                                                    java.lang.String variableId)
                                                             throws PersistenceException
Throws:
PersistenceException

getVariableForActivityBLOB

protected ActivityVariablePersistenceObject getVariableForActivityBLOB(WMSessionHandle shandle,
                                                                       java.lang.String procId,
                                                                       java.lang.String actId,
                                                                       java.lang.String variableId)
                                                                throws PersistenceException
Throws:
PersistenceException

getVariableForActivityWOB

protected ActivityVariablePersistenceObject getVariableForActivityWOB(WMSessionHandle shandle,
                                                                      java.lang.String procId,
                                                                      java.lang.String actId,
                                                                      java.lang.String variableId)
                                                               throws PersistenceException
Throws:
PersistenceException

getActivityDataDOSingle

public ActivityDataDO getActivityDataDOSingle(ActivityDO activityDO,
                                              java.lang.String variableId)
                                       throws com.lutris.dods.builder.generator.query.DataObjectException,
                                              com.lutris.dods.builder.generator.query.QueryException
Throws:
com.lutris.dods.builder.generator.query.DataObjectException
com.lutris.dods.builder.generator.query.QueryException

getActivityDataWOBDOSingle

public ActivityDataWOBDO getActivityDataWOBDOSingle(ActivityDO aDO,
                                                    java.lang.String variableId)
                                             throws com.lutris.dods.builder.generator.query.DataObjectException,
                                                    com.lutris.dods.builder.generator.query.QueryException
Throws:
com.lutris.dods.builder.generator.query.DataObjectException
com.lutris.dods.builder.generator.query.QueryException

getProcessDataDOSingle

public ProcessDataDO getProcessDataDOSingle(ProcessDO processDO,
                                            java.lang.String variableId)
                                     throws com.lutris.dods.builder.generator.query.DataObjectException,
                                            com.lutris.dods.builder.generator.query.QueryException
Throws:
com.lutris.dods.builder.generator.query.DataObjectException
com.lutris.dods.builder.generator.query.QueryException

getProcessDataWOBDOSingle

public ProcessDataWOBDO getProcessDataWOBDOSingle(ProcessDO pDO,
                                                  java.lang.String variableId)
                                           throws com.lutris.dods.builder.generator.query.DataObjectException,
                                                  com.lutris.dods.builder.generator.query.QueryException
Throws:
com.lutris.dods.builder.generator.query.DataObjectException
com.lutris.dods.builder.generator.query.QueryException

getActivityVariablesWhere

public java.util.List getActivityVariablesWhere(WMSessionHandle shandle,
                                                java.lang.String activityId,
                                                java.lang.String sqlWhere,
                                                int startAt,
                                                int limit)
                                         throws PersistenceException
Specified by:
getActivityVariablesWhere in interface PersistentManagerInterface
Throws:
PersistenceException

getVariablesForActivityBLOB

protected java.util.List getVariablesForActivityBLOB(WMSessionHandle shandle,
                                                     java.lang.String activityId,
                                                     java.lang.String sqlWhere,
                                                     int startAt,
                                                     int limit)
                                              throws PersistenceException
Throws:
PersistenceException

getVariablesForActivityWOB

protected java.util.List getVariablesForActivityWOB(WMSessionHandle shandle,
                                                    java.lang.String activityId,
                                                    java.lang.String sqlWhere,
                                                    int startAt,
                                                    int limit)
                                             throws PersistenceException
Throws:
PersistenceException

getActivityDataDOArray

public ActivityDataDO[] getActivityDataDOArray(ActivityDO activityDO,
                                               java.lang.String sqlWhere,
                                               int startAt,
                                               int limit)
                                        throws com.lutris.dods.builder.generator.query.DataObjectException,
                                               com.lutris.dods.builder.generator.query.QueryException
Throws:
com.lutris.dods.builder.generator.query.DataObjectException
com.lutris.dods.builder.generator.query.QueryException

getActivityDataWOBDOArray

public ActivityDataWOBDO[] getActivityDataWOBDOArray(ActivityDO activityDO,
                                                     java.lang.String sqlWhere,
                                                     int startAt,
                                                     int limit)
                                              throws com.lutris.dods.builder.generator.query.DataObjectException,
                                                     com.lutris.dods.builder.generator.query.QueryException
Throws:
com.lutris.dods.builder.generator.query.DataObjectException
com.lutris.dods.builder.generator.query.QueryException

getProcessVariablesWhere

public java.util.List getProcessVariablesWhere(WMSessionHandle shandle,
                                               java.lang.String processId,
                                               java.lang.String sqlWhere,
                                               int startAt,
                                               int limit)
                                        throws PersistenceException
Specified by:
getProcessVariablesWhere in interface PersistentManagerInterface
Throws:
PersistenceException

getVariablesForProcessBLOB

protected java.util.List getVariablesForProcessBLOB(WMSessionHandle shandle,
                                                    java.lang.String processId,
                                                    java.lang.String sqlWhere,
                                                    int startAt,
                                                    int limit)
                                             throws PersistenceException
Throws:
PersistenceException

getVariablesForProcessWOB

protected java.util.List getVariablesForProcessWOB(WMSessionHandle shandle,
                                                   java.lang.String processId,
                                                   java.lang.String sqlWhere,
                                                   int startAt,
                                                   int limit)
                                            throws PersistenceException
Throws:
PersistenceException

getProcessDataDOArray

public ProcessDataDO[] getProcessDataDOArray(ProcessDO processDO,
                                             java.lang.String sqlWhere,
                                             int startAt,
                                             int limit)
                                      throws com.lutris.dods.builder.generator.query.DataObjectException,
                                             com.lutris.dods.builder.generator.query.QueryException
Throws:
com.lutris.dods.builder.generator.query.DataObjectException
com.lutris.dods.builder.generator.query.QueryException

getProcessDataWOBDOArray

public ProcessDataWOBDO[] getProcessDataWOBDOArray(ProcessDO pDO,
                                                   java.lang.String sqlWhere,
                                                   int startAt,
                                                   int limit)
                                            throws com.lutris.dods.builder.generator.query.DataObjectException,
                                                   com.lutris.dods.builder.generator.query.QueryException
Throws:
com.lutris.dods.builder.generator.query.DataObjectException
com.lutris.dods.builder.generator.query.QueryException

migrate

public void migrate(WMSessionHandle shandle,
                    ActivityPersistenceObject actPO)
             throws PersistenceException
Specified by:
migrate in interface PersistentManagerInterface
Throws:
PersistenceException