Package net.sf.basedb.core.data
Class JobData
java.lang.Object
net.sf.basedb.core.data.BasicData
net.sf.basedb.core.data.OwnedData
net.sf.basedb.core.data.SharedData
net.sf.basedb.core.data.CommonData
net.sf.basedb.core.data.JobData
- All Implemented Interfaces:
IdentifiableData
,NameableData
,OwnableData
,RemovableData
,ShareableData
,SubtypableData
This class holds information about a job.
- Version:
- 2.0
- Author:
- Nicklas
- See Also:
- Last modified
- $Date: 2018-01-17 13:44:16 +0100 (on, 17 jan 2018) $
- Hibernate: class
- table="`Jobs`" lazy="true"
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
private Set<ArrayDesignData>
private Integer
private Integer
private Date
private Set<DerivedBioAssayData>
private boolean
private Date
private int
private String
private ExperimentData
private String
private Integer
static final int
The maximum allowed length of the execute command.static final int
The maximum allowed length of the external ID.static final int
The maximum allowed length of the plugin version.static final int
The maximum allowed length of the server name.static final int
The maximum allowed length of the signal transporter string.static final int
The maximum allowed length of the stack trace message.static final int
The maximum allowed length of the status message.static final int
The maximum allowed length of the subcontext name.private Set<MessageData>
private String
private Map<String,
ParameterValueData<?>> private int
private int
private PluginConfigurationData
private PluginDefinitionData
private String
private int
private Set<RawBioAssayData>
private boolean
private Date
private boolean
private String
private String
private String
private Date
private int
private String
private String
private ItemSubtypeData
private Set<TransformationData>
private int
Fields inherited from interface net.sf.basedb.core.data.NameableData
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
The ID of the project that should be made active when running this job.(package private) Set<ArrayDesignData>
This is the inverse end.The item type of the context that was active when configuring this job. null = no context was knownThe context type that was active when configuring this job. 0 = single item, 1 = listGet the date and time the job was created.(package private) Set<DerivedBioAssayData>
This is the inverse end.getEnded()
Get the date and time the job was ended or null if the job hasn't ended.int
Get the estimated execution time of the job. 0 = <1 minute, 1 = 1 - 10 minutes, 2 = <1 hour, 3 = >1 hourThe command to send to the plug-in when starting to execute it.The experiment this job is a part of.External ID of a job running on an external system.Get the subtype of the item.The ID of the job agent this job should run/is running/was running on.(package private) Set<MessageData>
This is the inverse end.getNode()
The name of the node where the job is executing.The parameters for this job.int
Get the parameter version of the configuration used for this job.int
If the job is running, how many percent has been completed.The plugin configuration for the plugin.The plugin that executes the job.Get the version of the plugin used to execute this job at the time the job was executed or registered.int
The jobs priority.(package private) Set<RawBioAssayData>
This is the inverse end.boolean
If the core should delete the job when it's finished successfully.Get the date and time the job was scheduled to the job queue, or null if it hasn't been scheduled yet.boolean
If the core should send a message to the owner when the job is finished or not.The name of the server where the job is executing.Identifies the signal transporter to use.Get the stack trace in case of an errorGet the date and time the job was started or null if the job hasn't been started.int
Get the status of the job. 1 = waiting, 2 = running, 3 = completed ok, 4 = errorGet a status message.The name of the subcontext that was active whjen configuring this job.(package private) Set<TransformationData>
This is the inverse end.int
getType()
The type of job: 1 = run plugin, 2 = otherboolean
isDryRun()
If the job should be/was executed as a dry-run job.void
setActiveProjectId
(int activeProjectId) (package private) void
setArrayDesigns
(Set<ArrayDesignData> arrayDesigns) void
setContextItem
(Integer contextItem) void
setContextType
(Integer contextType) void
setCreated
(Date created) (package private) void
setDerivedBioAssays
(Set<DerivedBioAssayData> derivedBioAssays) void
setDryRun
(boolean dryRun) void
void
setEstimatedExecutionTime
(int estimatedExecutionTime) void
setExecuteCommand
(String command) void
setExperiment
(ExperimentData experiment) void
setExternalId
(String externalId) void
setItemSubtype
(ItemSubtypeData subtype) Set the subtype of the item.void
setJobAgentId
(Integer jobAgentId) (package private) void
setMessages
(Set<MessageData> messages) void
(package private) void
setParameters
(Map<String, ParameterValueData<?>> parameters) void
setParameterVersion
(int parameterVersion) void
setPercentComplete
(int percentComplete) void
setPluginConfiguration
(PluginConfigurationData pluginConfiguration) void
setPluginDefinition
(PluginDefinitionData pluginDefinition) void
setPluginVersion
(String pluginVersion) void
setPriority
(int priority) (package private) void
setRawBioAssays
(Set<RawBioAssayData> rawBioAssays) void
setRemoveJobWhenFinished
(boolean removeJobWhenFinished) void
setScheduled
(Date scheduled) void
setSendMessage
(boolean sendMessage) void
void
setSignalTransporter
(String signalTransporter) void
setStackTrace
(String stackTrace) void
setStarted
(Date started) void
setStatus
(int status) void
setStatusMessage
(String statusMessage) void
setSubContext
(String subContext) (package private) void
setTransformations
(Set<TransformationData> transformations) void
setType
(int type) Methods inherited from class net.sf.basedb.core.data.CommonData
getDescription, getName, getRemovedBy, setDescription, setName, setRemovedBy
Methods inherited from class net.sf.basedb.core.data.SharedData
getItemKey, getProjectKey, setItemKey, setProjectKey
Methods inherited from class net.sf.basedb.core.data.BasicData
equals, getId, getVersion, hashCode, setId, setVersion, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.sf.basedb.core.data.IdentifiableData
getId, getVersion
Methods inherited from interface net.sf.basedb.core.data.OwnableData
getOwner, setOwner
-
Field Details
-
type
private int type -
subtype
-
MAX_EXTERNAL_ID_LENGTH
public static final int MAX_EXTERNAL_ID_LENGTHThe maximum allowed length of the external ID.- Since:
- 3.3
- See Also:
-
externalId
-
pluginDefinition
-
pluginConfiguration
-
experiment
-
MAX_PLUGIN_VERSION_LENGTH
public static final int MAX_PLUGIN_VERSION_LENGTHThe maximum allowed length of the plugin version.- Since:
- 2.8
- See Also:
-
pluginVersion
-
parameterVersion
private int parameterVersion -
sendMessage
private boolean sendMessage -
removeJobWhenFinished
private boolean removeJobWhenFinished -
status
private int status -
dryRun
private boolean dryRun -
MAX_COMMAND_LENGTH
public static final int MAX_COMMAND_LENGTHThe maximum allowed length of the execute command.- Since:
- 2.16
- See Also:
-
executeCommand
-
MAX_STATUS_MESSAGE_LENGTH
public static final int MAX_STATUS_MESSAGE_LENGTHThe maximum allowed length of the status message.- See Also:
-
statusMessage
-
MAX_STACK_TRACE_LENGTH
public static final int MAX_STACK_TRACE_LENGTHThe maximum allowed length of the stack trace message.- See Also:
-
stackTrace
-
estimatedExecutionTime
private int estimatedExecutionTime -
percentComplete
private int percentComplete -
priority
private int priority -
activeProjectId
private int activeProjectId -
created
-
scheduled
-
started
-
ended
-
MAX_SERVER_LENGTH
public static final int MAX_SERVER_LENGTHThe maximum allowed length of the server name.- See Also:
-
server
-
node
-
contextItem
-
contextType
-
MAX_SUBCONTEXT_LENGTH
public static final int MAX_SUBCONTEXT_LENGTHThe maximum allowed length of the subcontext name.- Since:
- 2.8
- See Also:
-
subContext
-
MAX_SIGNAL_TRANSPORTER_LENGTH
public static final int MAX_SIGNAL_TRANSPORTER_LENGTHThe maximum allowed length of the signal transporter string.- See Also:
-
signalTransporter
-
jobAgentId
-
parameters
-
messages
-
derivedBioAssays
-
rawBioAssays
-
arrayDesigns
-
transformations
-
-
Constructor Details
-
JobData
public JobData()
-
-
Method Details
-
getType
public int getType()The type of job: 1 = run plugin, 2 = other- Hibernate: property
- column="`type`" type="int" not-null="true"
-
setType
public void setType(int type) -
getItemSubtype
Description copied from interface:SubtypableData
Get the subtype of the item.- Specified by:
getItemSubtype
in interfaceSubtypableData
- Since:
- 3.10
-
setItemSubtype
Description copied from interface:SubtypableData
Set the subtype of the item.- Specified by:
setItemSubtype
in interfaceSubtypableData
-
getExternalId
External ID of a job running on an external system.- Since:
- 3.3
- Hibernate: property
- column="`external_id`" type="string" length="255" not-null="false"
-
setExternalId
-
getPluginDefinition
The plugin that executes the job.- Hibernate: many-to-one
- column="`plugindefinition_id`" not-null="false" outer-join="false" update="false"
-
setPluginDefinition
-
getPluginConfiguration
The plugin configuration for the plugin.- Hibernate: many-to-one
- column="`pluginconfiguration_id`" not-null="false" outer-join="false" update="false"
-
setPluginConfiguration
-
getExperiment
The experiment this job is a part of.- Since:
- 2.4
- Hibernate: many-to-one
- column="`experiment_id`" not-null="false" outer-join="false"
-
setExperiment
-
getPluginVersion
Get the version of the plugin used to execute this job at the time the job was executed or registered.- Returns:
- A string with the version of the plugin, or null if not known or if the job is not executed by a plug-in
- Since:
- 2.8
- Hibernate: property
- column="`version_string`" type="string" length="255" not-null="false"
-
setPluginVersion
- Since:
- 2.8
-
getParameterVersion
public int getParameterVersion()Get the parameter version of the configuration used for this job.- Hibernate: property
- column="`parameter_version`" type="int" not-null="true"
-
setParameterVersion
public void setParameterVersion(int parameterVersion) -
getSendMessage
public boolean getSendMessage()If the core should send a message to the owner when the job is finished or not.- Hibernate: property
- column="`send_message`" type="boolean" not-null="true"
-
setSendMessage
public void setSendMessage(boolean sendMessage) -
getRemoveJobWhenFinished
public boolean getRemoveJobWhenFinished()If the core should delete the job when it's finished successfully.- Hibernate: property
- column="`remove_job`" type="boolean" not-null="true"
-
setRemoveJobWhenFinished
public void setRemoveJobWhenFinished(boolean removeJobWhenFinished) -
getStatus
public int getStatus()Get the status of the job. 1 = waiting, 2 = running, 3 = completed ok, 4 = error- Hibernate: property
- column="`status`" type="int" not-null="true"
-
setStatus
public void setStatus(int status) -
isDryRun
public boolean isDryRun()If the job should be/was executed as a dry-run job.- Hibernate: property
- column="`dry_run`" type="boolean" not-null="true"
-
setDryRun
public void setDryRun(boolean dryRun) -
getExecuteCommand
The command to send to the plug-in when starting to execute it. If null, a default values is used. See Request.COMMAND_EXECUTE. This is usually only used when automatically restarting a failed job.- Since:
- 2.16
- Hibernate: property
- column="`exec_command`" type="string" length="255" not-null="false"
-
setExecuteCommand
-
getStatusMessage
Get a status message.- Hibernate: property
- column="`status_message`" type="text" not-null="false"
-
setStatusMessage
-
getStackTrace
Get the stack trace in case of an error- Hibernate: property
- column="`stack_trace`" type="text" not-null="false"
-
setStackTrace
-
getEstimatedExecutionTime
public int getEstimatedExecutionTime()Get the estimated execution time of the job. 0 = <1 minute, 1 = 1 - 10 minutes, 2 = <1 hour, 3 = >1 hour- Hibernate: property
- column="`execution_time`" type="int" not-null="true"
-
setEstimatedExecutionTime
public void setEstimatedExecutionTime(int estimatedExecutionTime) -
getPercentComplete
public int getPercentComplete()If the job is running, how many percent has been completed.- Hibernate: property
- column="`percent_complete`" type="int" not-null="true"
-
setPercentComplete
public void setPercentComplete(int percentComplete) -
getPriority
public int getPriority()The jobs priority. A lower value means a higher priority.- Hibernate: property
- column="`priority`" type="int" not-null="true"
-
setPriority
public void setPriority(int priority) -
getActiveProjectId
public int getActiveProjectId()The ID of the project that should be made active when running this job.- Hibernate: property
- column="`project_id`" type="int" not-null="true"
-
setActiveProjectId
public void setActiveProjectId(int activeProjectId) -
getCreated
Get the date and time the job was created.- Hibernate: property
- column="`created`" type="timestamp" not-null="true" update="false"
-
setCreated
-
getScheduled
Get the date and time the job was scheduled to the job queue, or null if it hasn't been scheduled yet. This timestamp should be updated whenever the status is changed to WAITING.- Since:
- 2.16
- Hibernate: property
- column="`scheduled`" type="timestamp" not-null="false"
-
setScheduled
-
getStarted
Get the date and time the job was started or null if the job hasn't been started.- Hibernate: property
- column="`started`" type="timestamp" not-null="false"
-
setStarted
-
getEnded
Get the date and time the job was ended or null if the job hasn't ended.- Hibernate: property
- column="`ended`" type="timestamp" not-null="false"
-
setEnded
-
getServer
The name of the server where the job is executing.- Hibernate: property
- column="`server`" type="string" length="255" not-null="false"
-
setServer
-
getNode
The name of the node where the job is executing. If this value is used it typically means that the server is some kind of master controller for multiple nodes in a cluster. The max length is the same as for the server.- Since:
- 3.10
- Hibernate: property
- column="`node`" type="string" length="255" not-null="false"
-
setNode
-
getContextItem
The item type of the context that was active when configuring this job. null = no context was known- Since:
- 2.8
- Hibernate: property
- column="`context_item`" type="int"
-
setContextItem
- Since:
- 2.8
-
getContextType
The context type that was active when configuring this job. 0 = single item, 1 = list- Since:
- 2.8
- Hibernate: property
- column="`context_type`" type="int"
-
setContextType
- Since:
- 2.8
-
getSubContext
The name of the subcontext that was active whjen configuring this job.- Since:
- 2.8
- Hibernate: property
- column="`subcontext`" type="string" length="255" not-null="false"
-
setSubContext
- Since:
- 2.8
-
getSignalTransporter
Identifies the signal transporter to use. This is a string with two parts separated by colon (:). The first part is the class name of the signal transporter class, the second part is the initialisation string for the transporter.- Since:
- 2.6
- Hibernate: property
- column="`signal_transporter`" type="text" not-null="false"
-
setSignalTransporter
-
getJobAgentId
The ID of the job agent this job should run/is running/was running on. We store this as an ID value only and not a reference toJobAgentData
since it would then be impossible to delete a job agent without also deleting all jobs that has been running on it.- Since:
- 2.8
- Hibernate: property
- column="`jobagent_id`" type="int" not-null="false"
-
setJobAgentId
-
getParameters
The parameters for this job.- Hibernate: map
- table="`JobParameters`" lazy="true" cascade="all"
- Hibernate: collection-key
- column="`job_id`"
- Hibernate: collection-index
- column="`name`" type="string" length="255"
- Hibernate: collection-many-to-many
- column="`value_id`" class="net.sf.basedb.core.data.ParameterValueData"
-
setParameters
-
getMessages
Set<MessageData> getMessages()This is the inverse end.- See Also:
- Hibernate: set
- lazy="true" inverse="true" cascade="delete"
- Hibernate: collection-key
- column="`job_id`"
- Hibernate: collection-one-to-many
- class="net.sf.basedb.core.data.MessageData"
-
setMessages
-
getDerivedBioAssays
Set<DerivedBioAssayData> getDerivedBioAssays()This is the inverse end.- Since:
- 3.3
- See Also:
- Hibernate: set
- lazy="true" inverse="true"
- Hibernate: collection-key
- column="`job_id`"
- Hibernate: collection-one-to-many
- class="net.sf.basedb.core.data.DerivedBioAssayData"
-
setDerivedBioAssays
-
getRawBioAssays
Set<RawBioAssayData> getRawBioAssays()This is the inverse end.- Since:
- 3.3
- See Also:
- Hibernate: set
- lazy="true" inverse="true"
- Hibernate: collection-key
- column="`job_id`"
- Hibernate: collection-one-to-many
- class="net.sf.basedb.core.data.RawBioAssayData"
-
setRawBioAssays
-
getArrayDesigns
Set<ArrayDesignData> getArrayDesigns()This is the inverse end.- Since:
- 3.3
- See Also:
- Hibernate: set
- lazy="true" inverse="true"
- Hibernate: collection-key
- column="`job_id`"
- Hibernate: collection-one-to-many
- class="net.sf.basedb.core.data.ArrayDesignData"
-
setArrayDesigns
-
getTransformations
Set<TransformationData> getTransformations()This is the inverse end.- Since:
- 3.3
- See Also:
- Hibernate: set
- lazy="true" inverse="true"
- Hibernate: collection-key
- column="`job_id`"
- Hibernate: collection-one-to-many
- class="net.sf.basedb.core.data.TransformationData"
-
setTransformations
-