Package org.mycore.services.queuedjob
Class MCRJob
java.lang.Object
org.mycore.services.queuedjob.MCRJob
- All Implemented Interfaces:
Cloneable
Container class handled by hibernate to store and retrieve job information.
- Author:
- René Adler
-
Constructor Summary
ModifierConstructorDescriptionprotected
MCRJob()
MCRJob
(Class<? extends MCRJobAction> actionClass) -
Method Summary
Modifier and TypeMethodDescriptionclone()
Class<? extends MCRJobAction>
Returns the action class (MCRJobAction
).getAdded()
Returns the adding date of job.Returns the finishing date of execution.long
getId()
Returns the job Id.getParameter
(String key) Returns an single parameter by it's name.Returns all set parameters of the job.getStart()
Returns the starting date of execution.Returns the current state (MCRJobStatus
) of the job.void
setAction
(Class<? extends MCRJobAction> actionClass) Set the action class (MCRJobAction
).void
Set the adding date.void
setFinished
(Date finished) Set the finishing date of execution.protected void
setId
(long id) Set the job Id.void
setParameter
(String key, String value) Set an single parameter.void
setParameters
(Map<String, String> parameters) Set all job parameters.void
Set the job starting date.void
setStatus
(MCRJobStatus status) Set the state (MCRJobStatus
) of the job.toString()
-
Constructor Details
-
MCRJob
protected MCRJob() -
MCRJob
-
-
Method Details
-
getId
public long getId()Returns the job Id.- Returns:
- the job Id
-
setId
protected void setId(long id) Set the job Id.- Parameters:
id
- - the job id
-
getAction
Returns the action class (MCRJobAction
).- Returns:
- the action class
-
setAction
Set the action class (MCRJobAction
).- Parameters:
actionClass
- - the action class to set
-
getStatus
Returns the current state (MCRJobStatus
) of the job. -
setStatus
Set the state (MCRJobStatus
) of the job.- Parameters:
status
- - the job status
-
getAdded
Returns the adding date of job.- Returns:
- the add date of the job
-
setAdded
Set the adding date. -
getStart
Returns the starting date of execution.- Returns:
- the job start date
-
setStart
Set the job starting date.- Parameters:
start
- - the starting date
-
getFinished
Returns the finishing date of execution.- Returns:
- the finishing date
-
setFinished
Set the finishing date of execution.- Parameters:
finished
- - the finishing date
-
getParameters
Returns all set parameters of the job.- Returns:
- the job parameters
-
setParameters
Set all job parameters.- Parameters:
parameters
- - the job parameters
-
getParameter
Returns an single parameter by it's name.- Parameters:
key
- - the parameter name.- Returns:
- the value of the parameter.
-
setParameter
Set an single parameter.- Parameters:
key
- - the parameter namevalue
- - the parameter value
-
clone
-
toString
-