com.trendmicro.grid.acl.ds.jpa.entities
Class JpaJob

java.lang.Object
  extended by com.trendmicro.grid.acl.l0.datatypes.Job
      extended by com.trendmicro.grid.acl.ds.datatypes.SharedJob
          extended by com.trendmicro.grid.acl.ds.jpa.entities.JpaJob
All Implemented Interfaces:
com.trendmicro.grid.acl.ds.datatypes.MetadataSharable, com.trendmicro.grid.acl.l0.datatypes.MetadataOwner, Serializable, Comparable<com.trendmicro.grid.acl.l0.datatypes.Job>

@Entity(name="JOBS")
public class JpaJob
extends com.trendmicro.grid.acl.ds.datatypes.SharedJob

Binds Job to the table "JOBS".

Version:
1.0
Author:
juergen_kellerer, 2010-06-01
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.trendmicro.grid.acl.l0.datatypes.Job
com.trendmicro.grid.acl.l0.datatypes.Job.State
 
Field Summary
protected  JpaJob parentJob
           
protected  int primaryKey
           
protected  List<JpaJob> subJobs
           
 
Fields inherited from class com.trendmicro.grid.acl.l0.datatypes.Job
created, FINAL_STATES, finished, jobId, lastUpdated, metadata, parentJobId, stagesPassed, state
 
Constructor Summary
JpaJob()
          Used by JPA to construct an empty instance.
JpaJob(UUID jobId, JpaJob parentJob)
          Constructs a new JpaJob instance for the given parent job.
 
Method Summary
 Date getCreated()
           
 Date getFinished()
           
 Date getLastUpdated()
           
 com.trendmicro.grid.acl.metadata.Metadata getMetadata()
           
 JpaJob getParentJob()
           
 int getPrimaryKey()
           
 byte[] getPublicGUID()
           
 int getStagesPassed()
           
 com.trendmicro.grid.acl.l0.datatypes.Job.State getState()
           
 List<JpaJob> getSubJobs()
           
 void setCreated(Date created)
           
 void setFinished(Date finished)
           
 void setLastUpdated(Date lastUpdated)
           
 void setMetadata(com.trendmicro.grid.acl.metadata.Metadata metadata)
           
 void setParentJob(JpaJob parentJob)
           
 void setParentJobId(UUID parentJobId)
           
 void setPrimaryKey(int primaryKey)
           
 void setPublicGUID(byte[] publicGUID)
           
 void setStagesPassed(int stagesPassed)
           
 void setState(com.trendmicro.grid.acl.l0.datatypes.Job.State state)
           
 void setSubJobs(List<JpaJob> subJobs)
           
 String toString()
           
 
Methods inherited from class com.trendmicro.grid.acl.ds.datatypes.SharedJob
shareMetadata
 
Methods inherited from class com.trendmicro.grid.acl.l0.datatypes.Job
compareTo, equals, getJobId, getParentJobId, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

primaryKey

protected int primaryKey

parentJob

protected JpaJob parentJob

subJobs

protected List<JpaJob> subJobs
Constructor Detail

JpaJob

public JpaJob()
Used by JPA to construct an empty instance.


JpaJob

public JpaJob(UUID jobId,
              JpaJob parentJob)
Constructs a new JpaJob instance for the given parent job.

Parameters:
jobId - the job id of the job to create.
parentJob - the parent job to link this job against.
Method Detail

getPrimaryKey

public int getPrimaryKey()

setPrimaryKey

public void setPrimaryKey(int primaryKey)

getParentJob

public JpaJob getParentJob()

setParentJob

public void setParentJob(JpaJob parentJob)

getSubJobs

public List<JpaJob> getSubJobs()

setSubJobs

public void setSubJobs(List<JpaJob> subJobs)

getState

public com.trendmicro.grid.acl.l0.datatypes.Job.State getState()
Overrides:
getState in class com.trendmicro.grid.acl.l0.datatypes.Job

setState

public void setState(com.trendmicro.grid.acl.l0.datatypes.Job.State state)
Overrides:
setState in class com.trendmicro.grid.acl.l0.datatypes.Job

getStagesPassed

public int getStagesPassed()
Overrides:
getStagesPassed in class com.trendmicro.grid.acl.l0.datatypes.Job

setStagesPassed

public void setStagesPassed(int stagesPassed)
Overrides:
setStagesPassed in class com.trendmicro.grid.acl.l0.datatypes.Job

setParentJobId

public void setParentJobId(UUID parentJobId)

getPublicGUID

public byte[] getPublicGUID()

setPublicGUID

public void setPublicGUID(byte[] publicGUID)

getCreated

public Date getCreated()
Overrides:
getCreated in class com.trendmicro.grid.acl.l0.datatypes.Job

setCreated

public void setCreated(Date created)

getLastUpdated

public Date getLastUpdated()
Overrides:
getLastUpdated in class com.trendmicro.grid.acl.l0.datatypes.Job

setLastUpdated

public void setLastUpdated(Date lastUpdated)
Overrides:
setLastUpdated in class com.trendmicro.grid.acl.l0.datatypes.Job

getFinished

public Date getFinished()
Overrides:
getFinished in class com.trendmicro.grid.acl.l0.datatypes.Job

setFinished

public void setFinished(Date finished)

getMetadata

public com.trendmicro.grid.acl.metadata.Metadata getMetadata()
Specified by:
getMetadata in interface com.trendmicro.grid.acl.l0.datatypes.MetadataOwner
Overrides:
getMetadata in class com.trendmicro.grid.acl.l0.datatypes.Job

setMetadata

public void setMetadata(com.trendmicro.grid.acl.metadata.Metadata metadata)
Specified by:
setMetadata in interface com.trendmicro.grid.acl.l0.datatypes.MetadataOwner
Overrides:
setMetadata in class com.trendmicro.grid.acl.l0.datatypes.Job

toString

public String toString()
Overrides:
toString in class com.trendmicro.grid.acl.l0.datatypes.Job