Package com.avoka.fc.core.entity
Class Job
- java.lang.Object
-
- org.apache.cayenne.PersistentObject
-
- 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
public class Job extends _Job
Provides a Collaboration Job entity.- Since:
- 4.0.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJob.StepActionsComparatorProvides a Job Step Actions Comparator.
-
Field Summary
Fields Modifier and Type Field Description static StringSTATUS_CANCELLEDThe Job "Cancelled" status.static StringSTATUS_COMPLETEDThe Job "Completed" status.static StringSTATUS_ERRORThe Job "Error" status.static StringSTATUS_EXPIREDThe Job "Expired" status.static StringSTATUS_IN_PROGRESSThe Job "In Progress" status.static StringSTATUS_PAUSEDThe Job "Paused" status.static String[]STATUS_VALUESThe 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_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
-
-
Constructor Summary
Constructors Constructor Description Job()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToSubmissions(Submission obj)Add the Submissions object.SubmissiongetFirstSubmission()Return the first submission of the job.JobDefgetJobDef()Return the JobDef descriptor associated with the Job instance service controller, or null if not defined.StringgetJobGroupNames()Return the job group names, sorted ascending.JobPropertygetJobProperty(String name)Return the job property with the given nameMap<String,String>getJobPropertyMap()Return an unmodifiable map of job property values, ordered by property id.StringgetJobPropertyValue(String name)Return the named job property with the value or null if not defined.List<JobAction>getOrderedJobActions()List<JobAction>getOrderedJobActionsDesc()List<JobStep>getOrderedJobSteps()List<JobStep>getOrderedJobStepsDesc()StringgetPreviousStepName()Returns the name of the previous step, relative to the current step.booleanisStatusCancelled()booleanisStatusCompleted()booleanisStatusError()booleanisStatusExpired()booleanisStatusInProgress()booleanisStatusPaused()voidprintJobDump()Print the job dump string to System.out.voidsetJobPropertyValue(String name, String value)Set the named job property with the given value, or create a new job property if it does not exist.StringtoDumpString()StringtoString()-
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, 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, setTimeCompletionScheduled, setTimeCreated, setTimeFinished, setTimeLastProcessed, setTimePurgeScheduled
-
Methods inherited from class com.avoka.core.entity.BaseEntity
appendProperties, getId, getValuesMap, isNew, setId
-
Methods inherited from class org.apache.cayenne.CayenneDataObject
addToManyTarget, getSnapshotVersion, makePath, readNestedProperty, readProperty, readPropertyDirectly, removeToManyTarget, setObjectContext, setPersistenceState, setReverseRelationship, setSnapshotVersion, setToManyTarget, setToOneTarget, toStringBuffer, unsetReverseRelationship, validateForDelete, validateForInsert, validateForSave, validateForUpdate, willConnect, writeProperty, writePropertyDirectly
-
Methods inherited from class org.apache.cayenne.PersistentObject
getMapKey, getObjectContext, getObjectId, getPersistenceState, setObjectId
-
-
-
-
Field Detail
-
STATUS_IN_PROGRESS
public static final String STATUS_IN_PROGRESS
The Job "In Progress" status.- See Also:
- Constant Field Values
-
STATUS_COMPLETED
public static final String STATUS_COMPLETED
The Job "Completed" status.- See Also:
- Constant Field Values
-
STATUS_CANCELLED
public static final String STATUS_CANCELLED
The Job "Cancelled" status.- See Also:
- Constant Field Values
-
STATUS_EXPIRED
public static final String STATUS_EXPIRED
The Job "Expired" status.- See Also:
- Constant Field Values
-
STATUS_ERROR
public static final String STATUS_ERROR
The Job "Error" status.- See Also:
- Constant Field Values
-
STATUS_PAUSED
public static final String STATUS_PAUSED
The Job "Paused" status.- See Also:
- Constant Field Values
-
STATUS_VALUES
public static final String[] STATUS_VALUES
The valid Job status values.
-
-
Method Detail
-
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
public Map<String,String> 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
public JobProperty getJobProperty(String name)
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
public String getJobPropertyValue(String name)
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
public 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.- 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
public List<JobAction> getOrderedJobActions()
- Returns:
- the list of job actions ordered by id.
-
getOrderedJobActionsDesc
public List<JobAction> getOrderedJobActionsDesc()
- Returns:
- the list of job actions ordered by id desc.
-
getOrderedJobSteps
public List<JobStep> getOrderedJobSteps()
- Returns:
- the list of job steps ordered by id.
-
getOrderedJobStepsDesc
public List<JobStep> getOrderedJobStepsDesc()
- Returns:
- the list of job steps ordered by id desc.
-
getFirstSubmission
public Submission getFirstSubmission()
Return the first submission of the job.- Returns:
- the first submission of the job.
-
toString
public String toString()
- Overrides:
toStringin classBaseEntity- Returns:
- the string representation of this object.
-
toDumpString
public String toDumpString()
- Returns:
- the full job state dump representation of this object for debugging purposes.
-
getPreviousStepName
public String 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
public JobDef 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
public void addToSubmissions(Submission obj)
Add the Submissions object.- Overrides:
addToSubmissionsin class_Job- Parameters:
obj- the submissions value to add
-
getJobGroupNames
public String getJobGroupNames()
Return the job group names, sorted ascending.- Returns:
- the job group names.
- Since:
- 17.10.0
-
-