Package com.avoka.fc.core.entity
Class Job
java.lang.Object
org.apache.cayenne.PersistentObject
org.apache.cayenne.BaseDataObject
org.apache.cayenne.CayenneDataObject
com.avoka.core.entity.BaseEntity
com.avoka.fc.core.entity.auto._Job
com.avoka.fc.core.entity.Job
- All Implemented Interfaces:
IEntity
,Serializable
,org.apache.cayenne.DataObject
,org.apache.cayenne.Persistent
,org.apache.cayenne.Validating
Provides a Collaboration Job entity.
- Since:
- 4.0.0
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Provides a Job Step Actions Comparator. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The Job "Cancelled" status.static final String
The Job "Completed" status.static final String
The Job "Error" status.static final String
The Job "Expired" status.static final String
The Job "In Progress" status.static final String
The Job "Paused" status.static final String[]
The valid Job status values.Fields inherited from class com.avoka.fc.core.entity.auto._Job
CLIENT, CLIENT_PROPERTY, COMMENTS, COMMENTS_PROPERTY, CONTROLLER_SERVICE, CONTROLLER_SERVICE_PROPERTY, CURRENT_STEP, CURRENT_STEP_PROPERTY, JOB_ACTIONS, JOB_ACTIONS_PROPERTY, JOB_EVENTS, JOB_EVENTS_PROPERTY, JOB_GROUPS, JOB_GROUPS_PROPERTY, JOB_HISTORY, JOB_HISTORY_PROPERTY, JOB_KEY, JOB_KEY_PROPERTY, JOB_OID_PK_COLUMN, JOB_PROPERTIES, JOB_PROPERTIES_PROPERTY, JOB_STATUS_HISTORY_LIST, JOB_STATUS_HISTORY_LIST_PROPERTY, JOB_STEPS, JOB_STEPS_PROPERTY, LICENSE_PUBLISHED_FLAG, LICENSE_PUBLISHED_FLAG_PROPERTY, NAME, NAME_PROPERTY, PROCESS_IMMEDIATE_FLAG, PROCESS_IMMEDIATE_FLAG_PROPERTY, REFERENCE_NUMBER, REFERENCE_NUMBER_PROPERTY, STATUS, STATUS_PROPERTY, SUBMISSIONS, SUBMISSIONS_PROPERTY, TIME_ABANDONMENT_SCHEDULED, TIME_ABANDONMENT_SCHEDULED_PROPERTY, TIME_COMPLETION_SCHEDULED, TIME_COMPLETION_SCHEDULED_PROPERTY, TIME_CREATED, TIME_CREATED_PROPERTY, TIME_FINISHED, TIME_FINISHED_PROPERTY, TIME_LAST_PROCESSED, TIME_LAST_PROCESSED_PROPERTY, TIME_PURGE_SCHEDULED, TIME_PURGE_SCHEDULED_PROPERTY
Fields inherited from class com.avoka.core.entity.BaseEntity
ID_PROPERTY
Fields inherited from class org.apache.cayenne.CayenneDataObject
values
Fields inherited from class org.apache.cayenne.BaseDataObject
snapshotVersion
Fields inherited from class org.apache.cayenne.PersistentObject
objectContext, objectId, persistenceState
Fields inherited from interface org.apache.cayenne.DataObject
DEFAULT_VERSION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add the Submissions object.Return the first submission of the job.Return the JobDef descriptor associated with the Job instance service controller, or null if not defined.Return the job group names, sorted ascending.getJobProperty
(String name) Return the job property with the given nameReturn an unmodifiable map of job property values, ordered by property id.getJobPropertyValue
(String name) Return the named job property with the value or null if not defined.Returns the name of the previous step, relative to the current step.boolean
boolean
boolean
boolean
boolean
boolean
void
Print the job dump string to System.out.void
setJobPropertyValue
(String name, String value) Set the named job property with the given value, or create a new job property if it does not exist.void
setTimeCreated
(Date timeCreated) Set the timeCreated value.void
setTimeFinished
(Date timeFinished) Set the timeFinished value.void
setTimeLastProcessed
(Date timeLastProcessed) Set the timeLastProcessed value.void
setTimeLastProcessedWithAbandonment
(Job job, Date timeLastProcessed) Set the last processed time for the job and update the abandonment date.toString()
Methods inherited from class com.avoka.fc.core.entity.auto._Job
addToComments, addToJobActions, addToJobEvents, addToJobGroups, addToJobHistory, addToJobProperties, addToJobStatusHistoryList, addToJobSteps, getClient, getComments, getControllerService, getCurrentStep, getJobActions, getJobEvents, getJobGroups, getJobHistory, getJobKey, getJobProperties, getJobStatusHistoryList, getJobSteps, getName, getReferenceNumber, getStatus, getSubmissions, getTimeAbandonmentScheduled, getTimeCompletionScheduled, getTimeCreated, getTimeFinished, getTimeLastProcessed, getTimePurgeScheduled, isLicensePublishedFlag, isProcessImmediateFlag, removeFromComments, removeFromJobActions, removeFromJobEvents, removeFromJobGroups, removeFromJobHistory, removeFromJobProperties, removeFromJobStatusHistoryList, removeFromJobSteps, removeFromSubmissions, setClient, setControllerService, setCurrentStep, setJobKey, setLicensePublishedFlag, setName, setProcessImmediateFlag, setReferenceNumber, setStatus, setTimeAbandonmentScheduled, setTimeCompletionScheduled, setTimePurgeScheduled
Methods inherited from class com.avoka.core.entity.BaseEntity
appendProperties, getId, getValuesMap, isNew, setId
Methods inherited from class org.apache.cayenne.CayenneDataObject
makePath, readPropertyDirectly, readState, setPersistenceState, writePropertyDirectly, writeState
Methods inherited from class org.apache.cayenne.BaseDataObject
addToManyTarget, beforePropertyRead, beforePropertyWrite, getSnapshotVersion, readNestedProperty, readProperty, readSerialized, removeToManyTarget, setObjectContext, setReverseRelationship, setSnapshotVersion, setToManyTarget, setToOneTarget, toStringBuffer, unsetReverseRelationship, validateForDelete, validateForInsert, validateForSave, validateForUpdate, willConnect, writeProperty, writeSerialized
Methods inherited from class org.apache.cayenne.PersistentObject
getMapKey, getObjectContext, getObjectId, getPersistenceState, setObjectId
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.cayenne.Persistent
getObjectContext, getObjectId, getPersistenceState, setObjectContext, setObjectId, setPersistenceState
-
Field Details
-
STATUS_IN_PROGRESS
The Job "In Progress" status.- See Also:
-
STATUS_COMPLETED
The Job "Completed" status.- See Also:
-
STATUS_CANCELLED
The Job "Cancelled" status.- See Also:
-
STATUS_EXPIRED
The Job "Expired" status.- See Also:
-
STATUS_ERROR
The Job "Error" status.- See Also:
-
STATUS_PAUSED
The Job "Paused" status.- See Also:
-
STATUS_VALUES
The valid Job status values.
-
-
Constructor Details
-
Job
public Job()
-
-
Method Details
-
isStatusCancelled
public boolean isStatusCancelled()- Returns:
- true if the Job is "Cancelled"
-
isStatusCompleted
public boolean isStatusCompleted()- Returns:
- true if the Job is "Completed"
-
isStatusError
public boolean isStatusError()- Returns:
- true if the Job is "Error"
-
isStatusExpired
public boolean isStatusExpired()- Returns:
- true if the Job is "Expired"
-
isStatusInProgress
public boolean isStatusInProgress()- Returns:
- true if the Job is "In Progress"
-
isStatusPaused
public boolean isStatusPaused()- Returns:
- true if the Job is "Paused"
-
getJobPropertyMap
Return an unmodifiable map of job property values, ordered by property id.- Returns:
- an unmodifiable map of job property values, ordered by property id
-
getJobProperty
Return the job property with the given name- Parameters:
name
- the job property name (required)- Returns:
- the matching job property, or null if not found
- Since:
- 4.1.0
-
getJobPropertyValue
Return the named job property with the value or null if not defined.- Parameters:
name
- the job property name (required)- Returns:
- the job property value
- Since:
- 4.1.0
-
setJobPropertyValue
Set the named job property with the given value, or create a new job property if it does not exist.- Parameters:
name
- the job property name (required)value
- the job property value, if the value is null the job property for the name will be deleted.- Since:
- 4.1.0
-
getOrderedJobActions
- Returns:
- the list of job actions ordered by id.
-
getOrderedJobActionsDesc
- Returns:
- the list of job actions ordered by id desc.
-
getOrderedJobSteps
- Returns:
- the list of job steps ordered by id.
-
getOrderedJobStepsDesc
- Returns:
- the list of job steps ordered by id desc.
-
getFirstSubmission
Return the first submission of the job.- Returns:
- the first submission of the job.
-
toString
- Overrides:
toString
in classBaseEntity
- Returns:
- the string representation of this object.
-
toDumpString
- Returns:
- the full job state dump representation of this object for debugging purposes.
-
getPreviousStepName
Returns the name of the previous step, relative to the current step.- Returns:
- the previous step name
-
printJobDump
public void printJobDump()Print the job dump string to System.out. -
getJobDef
Return the JobDef descriptor associated with the Job instance service controller, or null if not defined.- Returns:
- the JobDef descriptor associated with the Job instance service controller, or null if not defined.
-
addToSubmissions
Add the Submissions object.- Overrides:
addToSubmissions
in class_Job
- Parameters:
obj
- the submissions value to add
-
getJobGroupNames
Return the job group names, sorted ascending.- Returns:
- the job group names.
- Since:
- 17.10.0
-
setTimeLastProcessedWithAbandonment
Set the last processed time for the job and update the abandonment date.- Parameters:
job
- the job for which the the last processed time has to be updatedtimeLastProcessed
- last processed time- Since:
- 22.4.0
-
setTimeCreated
Description copied from class:_Job
Set the timeCreated value.- Overrides:
setTimeCreated
in class_Job
- Parameters:
timeCreated
- the timeCreated value to set
-
setTimeFinished
Description copied from class:_Job
Set the timeFinished value.- Overrides:
setTimeFinished
in class_Job
- Parameters:
timeFinished
- the timeFinished value to set
-
setTimeLastProcessed
Description copied from class:_Job
Set the timeLastProcessed value.- Overrides:
setTimeLastProcessed
in class_Job
- Parameters:
timeLastProcessed
- the timeLastProcessed value to set
-