DSRG.MW
Class Tuple

java.lang.Object
  |
  +--DSRG.MW.Tuple

public class Tuple
extends java.lang.Object

this class holds a tuple in a relation object. This is used for storing (cacheing) relational extents in the EVE-Demo. This is currently in the MKB, where it doesn't belong


Field Summary
(package private)  Table parent
          The extent to which this tuple belongs.
(package private)  java.util.Vector values
          the values in the tuple.
 
Constructor Summary
Tuple(Table myParent, java.util.Vector myValues)
          constructs a tuple with a certain Table instance as parent and sets its value from a vector (not cloned).
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(Tuple otherTuple)
          recursively calls the equals methods of this vector's objects
 java.util.Enumeration getEnumeration()
          returns an enumeration on this tuple.
 int getSize()
          returns the number of elements (attributes) in thi s tuple.
 java.util.Vector getVector()
          returns this tuple as a vector
 void setVector(java.util.Vector myValues)
          sets this tuple's vector (=data).
 java.lang.String toSQLString()
          calls the toString() methods of this tuple's objects and concatenates them with commas in between and single quotes around the strings.
 java.lang.String toString()
          calls the toString() methods of this tuple's objects and concatenates them
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

values

java.util.Vector values
the values in the tuple. The types of the elements are heterogeneous, but have to agree with the types in the "attribute" objects referenced in the attributes-vector in this tuple's Table-object.

parent

Table parent
The extent to which this tuple belongs. Tuples belong to exactly one Table instance
Constructor Detail

Tuple

public Tuple(Table myParent,
             java.util.Vector myValues)
constructs a tuple with a certain Table instance as parent and sets its value from a vector (not cloned).
Method Detail

getEnumeration

public java.util.Enumeration getEnumeration()
returns an enumeration on this tuple. The elements are of type "Object"

getSize

public int getSize()
returns the number of elements (attributes) in thi s tuple. This should correspond to the number of attributes in this tuple's relation extent's relation object, but this is not enforced or checked...

getVector

public java.util.Vector getVector()
returns this tuple as a vector

setVector

public void setVector(java.util.Vector myValues)
sets this tuple's vector (=data). Does not clone the contents.

equals

public boolean equals(Tuple otherTuple)
recursively calls the equals methods of this vector's objects

toString

public java.lang.String toString()
calls the toString() methods of this tuple's objects and concatenates them
Overrides:
toString in class java.lang.Object

toSQLString

public java.lang.String toSQLString()
calls the toString() methods of this tuple's objects and concatenates them with commas in between and single quotes around the strings. This is used for storing this tuple in a JDBC database

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object