com.sap.scheduler.runtime

Class JobDefinitionName

java.lang.Object
  extended by com.sap.scheduler.runtime.JobDefinitionName
All Implemented Interfaces:
Serializable

public class JobDefinitionName
extends Object
implements Serializable

This class represnts the name of a job defintion. A name consists of an application name and a job name. The application name corresponds to the name of the application where the job definition is deployed in.

See Also:
Serialized Form

Constructor Summary
JobDefinitionName(String name)
          Constructs a new JobDefinitionName from a string.
JobDefinitionName(String appName, String name)
          Constructs a new JobDefinitionName from an application name and a job name.
 
Method Summary
 boolean equals(Object o)
          Returns true if the provided object represents the same application name.
 String getApplicationName()
          Returns the application name.
 String getName()
          Returns the job definition name.
 int hashCode()
          Returns the hash code of this job definition name.
 String toString()
          Returns the name of this job definition as a string.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JobDefinitionName

public JobDefinitionName(String name)
                  throws NullPointerException,
                         IllegalArgumentException
Constructs a new JobDefinitionName from a string. If the string has a colon (":") in its name, the first part is considered the application name and the second part is considered the job name.

Parameters:
name - the name of a job definition represented as a String. This can either be the name of the job definition or the name of the application followed by a colon folloed by the name of the job definition.
Throws:
NullPointerException - if the name is null
IllegalArgumentException - if the name is not a legal job definition name

JobDefinitionName

public JobDefinitionName(String appName,
                         String name)
Constructs a new JobDefinitionName from an application name and a job name.

Parameters:
appName - application name
name - name of job definition within the application
Throws:
NullPointerException - if appName or name are null.
Method Detail

getName

public String getName()
Returns the job definition name.

Returns:
the job definition name

getApplicationName

public String getApplicationName()
Returns the application name.

Returns:
the application name

toString

public String toString()
Returns the name of this job definition as a string.

Overrides:
toString in class Object
Returns:
the name of this job definition

hashCode

public int hashCode()
Returns the hash code of this job definition name.

Overrides:
hashCode in class Object
Returns:
hash code of this job definition name object.

equals

public boolean equals(Object o)
Returns true if the provided object represents the same application name.

Overrides:
equals in class Object
Parameters:
o - the object to compare


Copyright 2009 SAP AG Complete Copyright Notice