com.ibm.tws.objects.plan
Class ResourceDependencyInPlan

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

public class ResourceDependencyInPlan
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 quantity actually available is stored in the 'available attribute.

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

resourceKey Reference to an existing resource
quantity Allowed range is from 1 to 1024 during submit,
from 1 to 32 during dependency addiction.
availableQuantity Read Only.
Read Only.
satisfied Read Only.
status Read Only.
allocationType N/A
onError N/A
actionOnComplete One of the values exposed by the ResourceActionOnComplete class
totalQuantity For Internal Use Only
loadedFromDB For Internal Use Only

See Also:
OnErrorOption, ResourceAllocationType, ResourceInPlan, Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright.
 
Constructor Summary
ResourceDependencyInPlan()
          Creates an empty resource.
ResourceDependencyInPlan(Identifier id)
          Creates a resource Containing an Identifier
ResourceDependencyInPlan(Identifier id, ResourceInPlanKey key)
          Creates a resource containing an Identifier and a Key
ResourceDependencyInPlan(ResourceInPlanKey key)
          Creates a Resource containing a key
 
Method Summary
 java.lang.Object clone()
          Clone method, used to create from a single Dependency with quantity > 32 multiple instance of the same Dependency with quantity <= 32.
 boolean equals(java.lang.Object object)
          equality method.
 ResourceActionOnComplete getActionOnComplete()
          Returns the actionOnComplete.
 ResourceAllocationType getAllocationType()
          Returns the resource allocation type.
 int getAvailable()
          Returns the number of available Resources for this dependency.
 Identifier getId()
          Returns the object Identifier.
 ResourceInPlanKey getKey()
          Returns the Resource key
 java.lang.String getName()
          Returns the Resource name
 OnErrorOption getOnError()
          Returns the on error option.
 int getQuantity()
          Returns the number of units currently in use.
 DependencyStatusType getStatus()
          Returns the dependency status.
 int getTotalQuantity()
          Returns the total quantity of the Resource, not of the Resource Dependency.
 Identifier getWorkstationId()
          Return the referenced Workstation Identifier
 int hashCode()
          Returns a hash code for this resource dependency object.
 boolean isLoadedFromDb()
          Gets if this Dependency is loaded from the DB or not For internal use only.
 boolean isSatisfied()
          Returns true if this dependency is satisfied, false otherwise.
 void setActionOnComplete(ResourceActionOnComplete value)
           
 void setAllocationType(ResourceAllocationType value)
          Sets the resource allocation type.
 void setAvailable(int i)
          Sets the number of availbale resources
 void setId(Identifier identifier)
          Sets the Resource Identifier
 void setKey(ResourceInPlanKey key)
          Sets the Resource key
 void setLoadedFromDb(boolean b)
          Sets if this Dependency is loaded from DB or not.
 void setOnError(OnErrorOption value)
          Sets the on error option.
 void setQuantity(int i)
          Set the Resource quantity For internal use only.
 void setSatisfied(boolean b)
          Sets if this dependency is satisfied For internal use only.
 void setStatus(DependencyStatusType value)
          Sets the dependency status For internal use only.
 void setTotalQuantity(int i)
          Sets the total quantity of the Resource, not of the Resource Dependency.
 void setWorkstationId(Identifier identifier)
          Sets the Resource Workstation Identifier
 java.lang.String toString()
          Returns a string representation of this ResourceDependencyInPlan.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Copyright.

Constructor Detail

ResourceDependencyInPlan

public ResourceDependencyInPlan()
Creates an empty resource.


ResourceDependencyInPlan

public ResourceDependencyInPlan(Identifier id,
                                ResourceInPlanKey key)
Creates a resource containing an Identifier and a Key

Parameters:
id - The Resource Identifier
key - The ResourceKey

ResourceDependencyInPlan

public ResourceDependencyInPlan(Identifier id)
Creates a resource Containing an Identifier

Parameters:
id - The Resource Identifier

ResourceDependencyInPlan

public ResourceDependencyInPlan(ResourceInPlanKey key)
Creates a Resource containing a key

Parameters:
key - The Resource key
Method Detail

getId

public Identifier getId()
Returns the object Identifier.

Specified by:
getId in interface TWSLink
Returns:
The object Identifier.

getName

public java.lang.String getName()
Returns the Resource name

Returns:
the object name
See Also:
TWSObject.getName()

getKey

public ResourceInPlanKey getKey()
Returns the Resource key

Returns:
the resource key.

getWorkstationId

public Identifier getWorkstationId()
Return the referenced Workstation Identifier

Returns:
the referenced Workstation Identifier

getAvailable

public int getAvailable()
Returns the number of available Resources for this dependency.

Returns:
the number of available Resources for this dependency.

getQuantity

public int getQuantity()
Returns the number of units currently in use.

Returns:
the number of units currently in use.

isSatisfied

public boolean isSatisfied()
Returns true if this dependency is satisfied, false otherwise.

Returns:
true if this dependency is satisfied, false otherwise.

getStatus

public DependencyStatusType getStatus()
Returns the dependency status. Valid values are: Satisfied, Unsatisfied, Undecided.

Returns:
the dependency status.

getAllocationType

public ResourceAllocationType getAllocationType()
Returns the resource allocation type. Valid values are: Exclusive, Shared

Returns:
The resource allocation type.

getOnError

public OnErrorOption getOnError()
Returns the on error option. Valid Values are: Keep, Release, Default.

Returns:
The on error option.

getActionOnComplete

public ResourceActionOnComplete getActionOnComplete()
Returns the actionOnComplete. Valid Values are: Yes, No, Reset, Default.

Returns:
Returns the actionOnComplete.

setId

public void setId(Identifier identifier)
Sets the Resource Identifier

Parameters:
identifier - the Resource Identifier

setKey

public void setKey(ResourceInPlanKey key)
Sets the Resource key

Parameters:
key - the Resource Identifier

setWorkstationId

public void setWorkstationId(Identifier identifier)
Sets the Resource Workstation Identifier

Parameters:
identifier - the Resource Workstation Identifier

setAvailable

public void setAvailable(int i)
Sets the number of availbale resources

Parameters:
i - the number of availbale resources

setQuantity

public void setQuantity(int i)
Set the Resource quantity For internal use only.

Parameters:
i - the Resource quantity

setActionOnComplete

public void setActionOnComplete(ResourceActionOnComplete value)

setSatisfied

public void setSatisfied(boolean b)
Sets if this dependency is satisfied For internal use only.

Parameters:
b - true if this dependency is satisfied

setStatus

public void setStatus(DependencyStatusType value)
Sets the dependency status For internal use only.

Parameters:
value - the dependency status

setAllocationType

public void setAllocationType(ResourceAllocationType value)
Sets the resource allocation type. For internal use only.

Parameters:
value - The resource allocation type.

setOnError

public void setOnError(OnErrorOption value)
Sets the on error option. For internal use only.

Parameters:
value - The on error option.

equals

public boolean equals(java.lang.Object object)
equality method.

Parameters:
object - The object to be compared
Returns:
true if the object is equal to this one, false otherwise.

hashCode

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

Returns:
The object's hash code.

toString

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

Returns:
A text string including all ResourceDependencyInPlan fields.

getTotalQuantity

public int getTotalQuantity()
Returns the total quantity of the Resource, not of the Resource Dependency. For internal use only.

Returns:
the total quantity of the Resource, not of the Resource Dependency.

setTotalQuantity

public void setTotalQuantity(int i)
Sets the total quantity of the Resource, not of the Resource Dependency. For internal use only.

Parameters:
i - the total quantity of the Resource, not of the Resource Dependency.

isLoadedFromDb

public boolean isLoadedFromDb()
Gets if this Dependency is loaded from the DB or not For internal use only.

Returns:
if this Dependency is loaded from the DB or not

setLoadedFromDb

public void setLoadedFromDb(boolean b)
Sets if this Dependency is loaded from DB or not. For internal use only.

Parameters:
b - true if this Dependency is loaded from DB, false otherwise.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clone method, used to create from a single Dependency with quantity > 32 multiple instance of the same Dependency with quantity <= 32. This is needed for backward compatibility with the 8.2.1 code.

Returns:
a clone of this object
Throws:
java.lang.CloneNotSupportedException - if the operation is not supported.
See Also:
Object.clone()


Copyright © 2005 IBM All Rights Reserved.