com.ibm.tws.objects.model
Class ResourceDependency

java.lang.Object
  extended bycom.ibm.tws.objects.model.ResourceDependency
All Implemented Interfaces:
java.io.Serializable, TWSLink

public class ResourceDependency
extends java.lang.Object
implements TWSLink

Resource dependencies are represented for a job or job stream through multiple instances of this class, which references the resource on which the job or job stream depends, and allows defining a quantity attribute. This quantity does not have to be the same as the quantity stored on the referenced resource, because it acts as an attribute of the association between a job or job stream and the resource on which it depends.

The following syntax validation constraints must be met on ResourceDependency objects in distributed environment:

resourceKey Must reference an existing resource
quantity Allowed range is from 1 to 1024
Default value is 1

The following syntax validation constraints must be met on ResourceDependency objects in z/OS environment:

resourceKey Must reference an existing resource
allocationType One of the values exposed by the ResourceAllocationType class
Default value is ResourceAllocationType.EXCLUSIVE
quantity Required. Allowed range is from 1 to 999999
onError One of the values exposed by the OnErrorOption class
actionOnComplete One of the values exposed by the ResourceActionOnComplete class
Default value is OnErrorOption.DEFAULT

See Also:
ResourceActionOnComplete, ResourceAllocationType, OnErrorOption, Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright.
 
Constructor Summary
ResourceDependency()
          Creates an empty ResourceDependency.
ResourceDependency(Identifier id)
          Creates a ResourceDependency, specifying the identifier of the referenced resource.
ResourceDependency(Identifier id, ResourceKey key)
          Creates a ResourceDependency, specifying the identifier and key of the referenced resource.
ResourceDependency(ResourceKey key)
          Creates a ResourceDependency, specifying the key of the referenced resource.
 
Method Summary
 boolean equals(java.lang.Object object)
          Returns true if all fields of this ResourceDependency object are equal to those of the given one.
 ResourceActionOnComplete getActionOnComplete()
          Returns the action on complete.
 ResourceAllocationType getAllocationType()
          Returns the resource allocation type.
 Identifier getId()
          Returns the identifier of the resource referenced by this dependency.
 OnErrorOption getOnError()
          Returns the on error option.
 int getQuantity()
          Returns the requested resource quantity.
 Identifier getResourceId()
          Returns the identifier of the referenced resource.
 ResourceKey getResourceKey()
          Returns the key of the referenced resource.
 int hashCode()
          Returns a hash code for this ResourceDependency object.
 void setActionOnComplete(ResourceActionOnComplete value)
          Sets the action on complete.
 void setAllocationType(ResourceAllocationType value)
          Sets the resource allocation type.
 void setOnError(OnErrorOption value)
          Sets the on error option.
 void setQuantity(int value)
          Sets the requested resource quantity.
 void setResourceId(Identifier id)
          Sets the identifier of the referenced resource.
 void setResourceKey(ResourceKey key)
          Sets the key of the referenced resource.
 java.lang.String toString()
          Returns a string representation of this ResourceDependency object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Copyright.

Constructor Detail

ResourceDependency

public ResourceDependency()
Creates an empty ResourceDependency.


ResourceDependency

public ResourceDependency(Identifier id)
Creates a ResourceDependency, specifying the identifier of the referenced resource.

Parameters:
id - The identifier of the referenced resource.

ResourceDependency

public ResourceDependency(ResourceKey key)
Creates a ResourceDependency, specifying the key of the referenced resource.

Parameters:
key - The key of the referenced resource.

ResourceDependency

public ResourceDependency(Identifier id,
                          ResourceKey key)
Creates a ResourceDependency, specifying the identifier and key of the referenced resource.

Parameters:
id - The identifier of the referenced resource.
key - The key of the referenced resource.
Method Detail

getId

public Identifier getId()
Returns the identifier of the resource referenced by this dependency.

Specified by:
getId in interface TWSLink
Returns:
The identifier of the resource referenced by this dependency.

getResourceId

public Identifier getResourceId()
Returns the identifier of the referenced resource.

Returns:
The identifier of the referenced resource.

getResourceKey

public ResourceKey getResourceKey()
Returns the key of the referenced resource.

Returns:
The key of the referenced resource.

getQuantity

public int getQuantity()
Returns the requested resource quantity.

Returns:
The requested resource quantity.

getAllocationType

public ResourceAllocationType getAllocationType()
Returns the resource allocation type.

Returns:
The resource allocation type.

getOnError

public OnErrorOption getOnError()
Returns the on error option.

Returns:
The on error option.

getActionOnComplete

public ResourceActionOnComplete getActionOnComplete()
Returns the action on complete.

Returns:
Returns the action on complete.

setResourceId

public void setResourceId(Identifier id)
Sets the identifier of the referenced resource.

Parameters:
id - The identifier of the referenced resource.

setResourceKey

public void setResourceKey(ResourceKey key)
Sets the key of the referenced resource.

Parameters:
key - The key of the referenced resource.

setQuantity

public void setQuantity(int value)
Sets the requested resource quantity.

Parameters:
value - The requested resource quantity.

setAllocationType

public void setAllocationType(ResourceAllocationType value)
Sets the resource allocation type.

Parameters:
value - The resource allocation type.

setOnError

public void setOnError(OnErrorOption value)
Sets the on error option.

Parameters:
value - The on error option.

setActionOnComplete

public void setActionOnComplete(ResourceActionOnComplete value)
Sets the action on complete.

Parameters:
value - The action on complete.

equals

public boolean equals(java.lang.Object object)
Returns true if all fields of this ResourceDependency object are equal to those of the given one.

Parameters:
object - The object to be compared with this one.
Returns:
True if this object equals to the given one.

hashCode

public int hashCode()
Returns a hash code for this ResourceDependency object.

Returns:
The object's hash code.

toString

public java.lang.String toString()
Returns a string representation of this ResourceDependency object.

Returns:
A text string including all ResourceDependency fields.


Copyright © 2005 IBM All Rights Reserved.