com.ibm.tspaces
Class TupleID

java.lang.Object
  |
  +--com.ibm.tspaces.TupleID

public class TupleID
extends java.lang.Object
implements java.io.Serializable

The TupleID object represents the unique id of a Tuple. The actual implementation is opaque to the client, it can retrieve the TupleID via the getTupleID method or returned from write operations. It can specify it as a parameter to commands such as deleteByTupleId and update. However the client never needs to look at what it contains and in fact in the future the contents will change

Author:
John Thomas
See Also:
SuperTuple, Serialized Form

Field Summary
protected  int _uniqueID
           
 
Constructor Summary
protected TupleID()
          prohibe use of default constructor except by subclass
  TupleID(int uniqueID)
          create a TupleID based on the int sequence number
  TupleID(java.lang.String ID)
          create a TupleID based on the String created by getID()
 
Method Summary
 int compareTo(java.lang.Object obj_)
          CompareTo method to satisy implementation of Comparable interface
 boolean equals(java.lang.Object t_)
          Compare 2 TSTupleIDs
 java.lang.String getID()
          returns a String representation of the uniqueID This method is required in order to extend the TupleID abstract class.
 int getUniqueID()
          returns the int value of the UniqueID *** Warning ** This method is public because various server side components need to get at it.
 java.lang.String toString()
          Provide good debug output
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_uniqueID

protected int _uniqueID
Constructor Detail

TupleID

public TupleID(int uniqueID)
create a TupleID based on the int sequence number

TupleID

public TupleID(java.lang.String ID)
create a TupleID based on the String created by getID()

TupleID

protected TupleID()
prohibe use of default constructor except by subclass
Method Detail

equals

public boolean equals(java.lang.Object t_)
Compare 2 TSTupleIDs
Overrides:
equals in class java.lang.Object
Returns:
True if UniqueID fields match

compareTo

public int compareTo(java.lang.Object obj_)
CompareTo method to satisy implementation of Comparable interface
Parameters:
obj_ - A TupleID instance that is to be compared to this one.
Returns:
0 if equal, > 0 if this > obj_ and < 0 if this < obj_

getUniqueID

public int getUniqueID()
returns the int value of the UniqueID *** Warning ** This method is public because various server side components need to get at it. But Clients have no business getting it. Clients should use getID if they want to get a representation of the TupleID that is a base type. This method is planned to be changed or removed.
Returns:
the int value stored as an instance variable.

getID

public java.lang.String getID()
returns a String representation of the uniqueID This method is required in order to extend the TupleID abstract class.
Returns:
String that represents the TupleID uniqueID

toString

public java.lang.String toString()
Provide good debug output
Overrides:
toString in class java.lang.Object
Returns:
String that represents the values in the object