org.rhq.core.domain.operation
Class JobId

java.lang.Object
  extended by org.rhq.core.domain.operation.JobId
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
HistoryJobId, ScheduleJobId

public class JobId
extends Object
implements Serializable

Simple object that encapsulates the individual pieces of data that make up an operation job ID.

This class has some JPA annotations to allow it to be an entity ID specified via @IdClass.

See Also:
Serialized Form

Constructor Summary
  JobId(String jobIdString)
           
protected JobId(String[] jobIdParts)
           
  JobId(String jobName, String jobGroup)
           
 
Method Summary
 boolean equals(Object obj)
          Compares the strings returned by toString(), assuming obj is another JobId.
 String getJobGroup()
          The job group allows jobs to be grouped across an individual resource of group.
 String getJobName()
          The job name makes the job unique among all other jobs in the system.
 int hashCode()
          Returns the hash code of the string that is returned by toString().
protected static String joinPartsIntoJobIdString(String... parts)
           
protected  void setJobGroup(String jobGroup)
          This class is designed as a read-only immutable, however, this protected method will allow you to subclass it to make it mutable.
protected  void setJobName(String jobName)
          This class is designed as a read-only immutable, however, this protected method will allow you to subclass it to make it mutable.
protected static String[] splitJobIdStringIntoParts(String jobId)
           
 String toString()
          Returns the single string that identifies the unique job ID.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JobId

public JobId(String jobName,
             String jobGroup)

JobId

public JobId(String jobIdString)

JobId

protected JobId(String[] jobIdParts)
Method Detail

getJobName

public String getJobName()
The job name makes the job unique among all other jobs in the system.

Returns:
job name string

setJobName

protected void setJobName(String jobName)
This class is designed as a read-only immutable, however, this protected method will allow you to subclass it to make it mutable.

Parameters:
jobName -

getJobGroup

public String getJobGroup()
The job group allows jobs to be grouped across an individual resource of group. The job group string is unique to a resource or group.

Returns:
the job's group string

setJobGroup

protected void setJobGroup(String jobGroup)
This class is designed as a read-only immutable, however, this protected method will allow you to subclass it to make it mutable.

Parameters:
jobGroup -

toString

public String toString()
Returns the single string that identifies the unique job ID.

Overrides:
toString in class Object
See Also:
Object.toString()

hashCode

public int hashCode()
Returns the hash code of the string that is returned by toString().

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)
Compares the strings returned by toString(), assuming obj is another JobId.

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

splitJobIdStringIntoParts

protected static String[] splitJobIdStringIntoParts(String jobId)

joinPartsIntoJobIdString

protected static String joinPartsIntoJobIdString(String... parts)


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.