com.ibm.tws.objects.model
Class Variable

java.lang.Object
  extended bycom.ibm.tws.objects.model.Variable
All Implemented Interfaces:
java.io.Serializable, TWSHeader, TWSObject

public class Variable
extends java.lang.Object
implements TWSObject, TWSHeader

A Variable object represents a TWS parameter and wraps a VariableKey object. No object is referenced by the Variable class, which only includes the attributes of the corresponding parameter.

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

name Always required
Alphanumeric characters
Starting with alphabetic character
'-' and '_' characters allowed
Blank spaces not allowed
Not longer than 8 characters
value Not longer than 72 characters

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright.
 
Constructor Summary
Variable()
          Creates an empty Variable.
Variable(Identifier variableId)
          Creates a Variable with the specified identifier.
Variable(Identifier variableId, VariableKey variableKey)
          Creates a Variable with the specified identifier and key.
Variable(VariableKey variableKey)
          Creates a Variable with the specified key.
 
Method Summary
 boolean equals(java.lang.Object object)
          Returns true if all fields of this Variable object are equal to those of the given one.
 java.lang.String getDescription()
          Returns the variable description.
 Identifier getId()
          Returns the variable identifier.
 VariableKey getKey()
          Returns the VariableKey wrapped by this Variable object.
 LockData getLockData()
          Returns the variable lock data.
 ModifyData getModifyData()
          Returns the variable modification data.
 java.lang.String getName()
          Returns the variable name.
 TWSHeader getObjectHeader()
          Returns this object, which also acts as a TWS header.
 TWSKey getObjectKey()
          Returns the variable key as a TWS key.
 java.lang.String getValue()
          Returns the variable value.
 int hashCode()
          Returns a hash code for this Variable object.
 void setDescription(java.lang.String string)
          Sets the variable description.
 void setId(Identifier identifier)
          Sets the variable identifier.
 void setKey(VariableKey variableKey)
          Sets the VariableKey to be wrapped by this Variable object.
 void setLockData(LockData data)
          Sets the variable lock data.
 void setModifyData(ModifyData data)
          Sets the variable modification data.
 void setName(java.lang.String string)
          Sets the variable name.
 void setValue(java.lang.String string)
          Sets the variable value.
 java.lang.String toString()
          Returns a string representation of this Variable 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

Variable

public Variable()
Creates an empty Variable.


Variable

public Variable(Identifier variableId)
Creates a Variable with the specified identifier.

Parameters:
variableId - The variable identifier.

Variable

public Variable(VariableKey variableKey)
Creates a Variable with the specified key.

Parameters:
variableKey - The variable key.

Variable

public Variable(Identifier variableId,
                VariableKey variableKey)
Creates a Variable with the specified identifier and key.

Parameters:
variableId - The variable identifier.
variableKey - The variable key.
Method Detail

getId

public Identifier getId()
Returns the variable identifier.

Specified by:
getId in interface TWSObject
Returns:
The variable identifier.

getObjectKey

public TWSKey getObjectKey()
Returns the variable key as a TWS key.

Specified by:
getObjectKey in interface TWSObject
Returns:
The variable key as a TWS key.

getObjectHeader

public TWSHeader getObjectHeader()
Returns this object, which also acts as a TWS header.

Specified by:
getObjectHeader in interface TWSObject
Returns:
This object, which also acts as a TWS header.

getKey

public VariableKey getKey()
Returns the VariableKey wrapped by this Variable object.

Returns:
The VariableKey wrapped by this Variable object.

getName

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

Specified by:
getName in interface TWSObject
Returns:
The variable name.

getValue

public java.lang.String getValue()
Returns the variable value.

Returns:
The variable value.

getDescription

public java.lang.String getDescription()
Returns the variable description.

Returns:
The variable description.

getModifyData

public ModifyData getModifyData()
Returns the variable modification data.

Specified by:
getModifyData in interface TWSObject
Returns:
The variable modification data.

getLockData

public LockData getLockData()
Returns the variable lock data.

Specified by:
getLockData in interface TWSObject
Returns:
The variable lock data.

setId

public void setId(Identifier identifier)
Sets the variable identifier.

Parameters:
identifier - The variable identifier.

setKey

public void setKey(VariableKey variableKey)
Sets the VariableKey to be wrapped by this Variable object.

Parameters:
variableKey - The VariableKey to be wrapped by this Variable object.

setName

public void setName(java.lang.String string)
Sets the variable name.

Parameters:
string - The variable name.

setValue

public void setValue(java.lang.String string)
Sets the variable value.

Parameters:
string - The variable value.

setDescription

public void setDescription(java.lang.String string)
Sets the variable description.

Parameters:
string - The variable description.

setModifyData

public void setModifyData(ModifyData data)
Sets the variable modification data. For internal use only.

Parameters:
data - A ModifyData object.

setLockData

public void setLockData(LockData data)
Sets the variable lock data. For internal use only.

Parameters:
data - A LockData object.

equals

public boolean equals(java.lang.Object object)
Returns true if all fields of this Variable 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 Variable object.

Returns:
The object's hash code.

toString

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

Returns:
A text string including all Variable fields.


Copyright © 2005 IBM All Rights Reserved.