com.ibm.tws.objects.model
Class JobStreamKey

java.lang.Object
  extended bycom.ibm.tws.objects.model.FlowNodeKey
      extended bycom.ibm.tws.objects.model.JobStreamKey
All Implemented Interfaces:
java.io.Serializable, TWSKey

public class JobStreamKey
extends FlowNodeKey

This object represents a job stream external key, including fields used to identify a job stream in TWS external interfaces. Since a job stream is identified by its name, a validity date and a referenced workstation or workstation class, this class includes a name attribute, a date attribute and a reference to a FlowTargetKey object.

See Also:
JobStream, Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright.
 
Constructor Summary
JobStreamKey()
          Creates an empty JobStreamKey.
JobStreamKey(java.lang.String jobStreamName, java.util.Date jobStreamValidFrom, boolean draft, boolean group)
          Creates a JobStreamKey with the specified name, validity date and draft and group flags.
JobStreamKey(java.lang.String jobStreamName, FlowTargetKey trgKey, java.util.Date jobStreamValidFrom)
          Creates a JobStreamKey with the specified name, workstation or workstation class key and validity date.
 
Method Summary
 boolean equals(java.lang.Object object)
          Returns true if all fields of this JobStreamKey object are equal to those of the given one.
 FlowTargetKey getFlowTargetKey()
          Returns the key of the workstation or workstation class referenced by this job stream.
 java.util.Date getValidFrom()
          Returns the start date of the job stream validity period.
 int hashCode()
          Returns a hash code for this JobStreamKey object.
 boolean isDraft()
          Returns true if this job stream is a draft one.
 boolean isGroup()
          Returns true if this job stream is a group of job streams.
static JobStreamKey parseKey(java.lang.String key)
          Parses data from the specified string and creates a new JobStreamKey.
static JobStreamKey parseKey(java.lang.String key, java.text.DateFormat dateFormat)
          Parses data from the specified string and creates a new JobStreamKey.
 void setDateFormat(java.text.DateFormat dateFormat)
          Sets the date formatter, used only by the toString() method to format the key string.
 void setDraft(boolean value)
          Sets the property used to decide if this job stream is a draft one.
 void setFlowTargetKey(FlowTargetKey key)
          Sets the key of the workstation or workstation class referenced by this job stream.
 void setGroup(boolean value)
          Sets the property used to decide if this job stream is a group of job streams.
 void setValidFrom(java.util.Date value)
          Sets the start date of the job stream validity period.
 java.lang.String toString()
          Returns a string representation of this JobStreamKey object.
 java.lang.String toString(java.text.DateFormat dateFormat)
          Returns a string representation of this JobStreamKey object.
 
Methods inherited from class com.ibm.tws.objects.model.FlowNodeKey
getName, setName
 
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

JobStreamKey

public JobStreamKey()
Creates an empty JobStreamKey.


JobStreamKey

public JobStreamKey(java.lang.String jobStreamName,
                    FlowTargetKey trgKey,
                    java.util.Date jobStreamValidFrom)
Creates a JobStreamKey with the specified name, workstation or workstation class key and validity date.

Parameters:
jobStreamName - The job stream name.
trgKey - The key of the workstation or workstation class referenced by this job stream.
jobStreamValidFrom - The start date of the job stream validity period.

JobStreamKey

public JobStreamKey(java.lang.String jobStreamName,
                    java.util.Date jobStreamValidFrom,
                    boolean draft,
                    boolean group)
Creates a JobStreamKey with the specified name, validity date and draft and group flags.

Parameters:
jobStreamName - The job stream name.
jobStreamValidFrom - The start date of the job stream validity period.
draft - True if the job stream is a draft one.
group - True if the job stream is a group of job streams.
Method Detail

parseKey

public static JobStreamKey parseKey(java.lang.String key)
Parses data from the specified string and creates a new JobStreamKey.

Parameters:
key - The string containing key data.
Returns:
A new JobStreamKey, or null if the string does not contain a valid key.

parseKey

public static JobStreamKey parseKey(java.lang.String key,
                                    java.text.DateFormat dateFormat)
Parses data from the specified string and creates a new JobStreamKey.

Parameters:
key - The string containing key data.
dateFormat - The date format to be used for the validFrom attribute.
Returns:
A new JobStreamKey, or null if the string does not contain a valid key.

getFlowTargetKey

public FlowTargetKey getFlowTargetKey()
Returns the key of the workstation or workstation class referenced by this job stream.

Returns:
The key of the workstation or workstation class referenced by this job stream.

getValidFrom

public java.util.Date getValidFrom()
Returns the start date of the job stream validity period.

Returns:
The start date of the job stream validity period.

isDraft

public boolean isDraft()
Returns true if this job stream is a draft one.

Returns:
True if this job stream is a draft one.

isGroup

public boolean isGroup()
Returns true if this job stream is a group of job streams.

Returns:
True if this job stream is a group of job streams.

setFlowTargetKey

public void setFlowTargetKey(FlowTargetKey key)
Sets the key of the workstation or workstation class referenced by this job stream.

Parameters:
key - The key of the workstation or workstation class referenced by this job stream.

setValidFrom

public void setValidFrom(java.util.Date value)
Sets the start date of the job stream validity period. Values stored on the database are truncated to GMT midnight.

Parameters:
value - The start date of the job stream validity period.

setDraft

public void setDraft(boolean value)
Sets the property used to decide if this job stream is a draft one.

Parameters:
value - True if this job stream is a draft one.

setGroup

public void setGroup(boolean value)
Sets the property used to decide if this job stream is a group of job streams.

Parameters:
value - True if this job stream is a group of job streams.

setDateFormat

public void setDateFormat(java.text.DateFormat dateFormat)
Sets the date formatter, used only by the toString() method to format the key string.

Parameters:
dateFormat - The date formatter to be used to format the job stream "valid from" date.

equals

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

Overrides:
equals in class FlowNodeKey
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 JobStreamKey object.

Overrides:
hashCode in class FlowNodeKey
Returns:
The object's hash code.

toString

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

Returns:
A text string including all JobStreamKey fields.

toString

public java.lang.String toString(java.text.DateFormat dateFormat)
Returns a string representation of this JobStreamKey object.

Parameters:
dateFormat - The date format to be used for the validFrom attribute.
Returns:
A text string including all JobStreamKey fields.


Copyright © 2005 IBM All Rights Reserved.