Skip navigation links

Oracle Enterprise Scheduler Java API Reference
11g Release 1 (11.1.1.7)
E26229-06


oracle.as.scheduler
Class JobDefinition

java.lang.Object
  extended by oracle.as.scheduler.BaseMetadata<JobDefinition>
      extended by oracle.as.scheduler.JobDefinition

All Implemented Interfaces:
java.io.Serializable

public class JobDefinition
extends BaseMetadata<JobDefinition>
implements java.io.Serializable

Represents the definition (metadata) for a Job that runs in the Scheduler. A Job is the basic unit of work that runs in Scheduler. Every JobDefinition belongs to one and only one type of Job as indicated by its JobType definition.

The name of a JobDefinition is unique in the metadata repository. Once a JobDefinition is created with a given type, its name and JobType cannot be changed.

See Also:
Serialized Form

Constructor Summary
JobDefinition(java.lang.String name, MetadataObjectId jobType)
          Constructor with name and JobType.
JobDefinition(java.lang.String name, MetadataObjectId jobType, MetadataObjectId objectId)
          Constructs a new instance.
JobDefinition(java.lang.String name, MetadataObjectId jobType, java.lang.String description, ParameterList parameters)
          Constructor to create a fully populated JobDefinition.
JobDefinition(java.lang.String name, MetadataObjectId jobType, java.lang.String displayNameKey, java.lang.String descriptionKey, ParameterList parameters, java.lang.String[] resourceBundleIDs)
          Constructor to create a fully populated JobDefinition.

 

Method Summary
 JobDefinition clone(java.lang.String newName)
           
 boolean equals(java.lang.Object obj)
          Compares an object for equality with this JobDefinition object.
static JobDefinition from(javax.management.openmbean.CompositeData cd)
          Create an instance of the model specific class out of an associated CompositeData instance
 BaseMetadataType<JobDefinition> getBaseMetadataType()
           
 MetadataObjectId getJobType()
          Method to retrieve the name of the JobType definition for this JobDefinition instance.
 ParameterList getParameters()
          Returns all the parameters defined for this JobDefinition
protected  JobDefinition getSelf()
           
 void setParameters(ParameterList params)
          Sets the parameters of this JobDefinition.
 javax.management.openmbean.CompositeData toCompositeData(javax.management.openmbean.CompositeType ct)
           
static javax.management.openmbean.CompositeType toCompositeType()
          Returns the CompositeType that describes this model specific class
 void validate(JobType jobType)
           
protected  void validateCustom()
          Validates this instance of JobDefinition.

 

Methods inherited from class oracle.as.scheduler.BaseMetadata
from, getDescription, getDescriptionKey, getDisplayName, getDisplayNameKey, getMessages, getMetadataObjectId, getName, getResourceBundles, hashCode, localize, setDescription, setDescriptionKey, setDisplayName, setDisplayNameKey, setResourceBundles, toCompositeData, toString, validate

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

 

Constructor Detail

JobDefinition

public JobDefinition(java.lang.String name,
                     MetadataObjectId jobType)
Constructor with name and JobType. This constructor creates a skeleton JobDefinition. Other appropriate methods must then be called to populate the definition.
Parameters:
name - - the name for the JobDefinition. The name is also used as the default display name unless otherwise specifially set.
jobType - - the identifier for the JobType definition for this JobDefinition object.

JobDefinition

public JobDefinition(java.lang.String name,
                     MetadataObjectId jobType,
                     MetadataObjectId objectId)
Constructs a new instance. This constructor is for internal use ONLY and should not be used to construct a new instance. This constructor is used internally by the MetadataService to populate the unique identifier of this object(definition) within the metadata repository.
Parameters:
name - - the name for the JobDefinition.
jobType - - the identifier for the JobType definition for this JobDefinition object.
objectId - - unique identifier of this object in the metadata repository. The identifier is set which this object is retrieved via MetadataService.

JobDefinition

public JobDefinition(java.lang.String name,
                     MetadataObjectId jobType,
                     java.lang.String description,
                     ParameterList parameters)
Constructor to create a fully populated JobDefinition.
Parameters:
name - - the name for the JobDefinition. The name is also used as the default display name unless otherwise specifially set.
jobType - - the JobType dor this JobDefinition.
description - - optional description to be associated.
parameters - - all the parameters defined for this JobDefinition.

JobDefinition

public JobDefinition(java.lang.String name,
                     MetadataObjectId jobType,
                     java.lang.String displayNameKey,
                     java.lang.String descriptionKey,
                     ParameterList parameters,
                     java.lang.String[] resourceBundleIDs)
Constructor to create a fully populated JobDefinition.
Parameters:
name - - the name for the JobDefinition. The name is also used as the default display name unless otherwise specifially set.
jobType - - the JobType dor this JobDefinition.
displayNameKey - - the key of the entry in the resourcebundles to lookup the name. Optional
descriptionKey - - the key of the entry in the resourcebundles to lookup the description. Optional.
parameters - - all the parameters defined for this JobDefinition.
resourceBundleIDs - -- an array of resource bundle id. Optional

Method Detail

getJobType

public MetadataObjectId getJobType()
Method to retrieve the name of the JobType definition for this JobDefinition instance.
Returns:
- the identifier of the corresponding JobType definition.

getParameters

public ParameterList getParameters()
Returns all the parameters defined for this JobDefinition
Returns:
- instance of ParameterList containing all the parameters.

setParameters

public void setParameters(ParameterList params)
Sets the parameters of this JobDefinition.
Parameters:
params - - instance of ParameterList containing all the parameters.

validate

public void validate(JobType jobType)
              throws ValidationException
Throws:
ValidationException

validateCustom

protected void validateCustom()
                       throws ValidationException
Validates this instance of JobDefinition.

The method performs checks that are possible on this object. It does not ensure the existence of JobType referenced by this JobDefinition. Such references and related validations are done by the MetadataService when the JobDefinition objects are persisted. MetadataService also calls this method to ensure only valid objects are persisted.

Specified by:
validateCustom in class BaseMetadata<JobDefinition>
Throws:
ValidationException - - thrown if any invalid data is detected.

equals

public boolean equals(java.lang.Object obj)
Compares an object for equality with this JobDefinition object.
Overrides:
equals in class java.lang.Object
Parameters:
obj - - the object to compare with this JobDefinition.
Returns:
- true if the object passed in is an instance of JobDefinition and is equal to this JobDefinition, false otherwise.

toCompositeType

public static javax.management.openmbean.CompositeType toCompositeType()
Returns the CompositeType that describes this model specific class

toCompositeData

public javax.management.openmbean.CompositeData toCompositeData(javax.management.openmbean.CompositeType ct)
Specified by:
toCompositeData in class BaseMetadata<JobDefinition>

from

public static JobDefinition from(javax.management.openmbean.CompositeData cd)
                          throws java.lang.IllegalArgumentException
Create an instance of the model specific class out of an associated CompositeData instance
Throws:
java.lang.IllegalArgumentException

getSelf

protected JobDefinition getSelf()
Specified by:
getSelf in class BaseMetadata<JobDefinition>

getBaseMetadataType

public BaseMetadataType<JobDefinition> getBaseMetadataType()
Specified by:
getBaseMetadataType in class BaseMetadata<JobDefinition>

clone

public JobDefinition clone(java.lang.String newName)
Specified by:
clone in class BaseMetadata<JobDefinition>

Skip navigation links

Oracle Enterprise Scheduler Java API Reference
11g Release 1 (11.1.1.7)
E26229-06


Copyright © 2008, 2013, Oracle and/or its affiliates. All rights reserved.