org.objectweb.medor.tuple.lib
Class MemoryTuple

java.lang.Object
  extended byBasicCloneable
      extended byorg.objectweb.medor.tuple.lib.MemoryTuple
All Implemented Interfaces:
Tuple

public class MemoryTuple
extends BasicCloneable
implements Tuple

This class represent a tuple interface in a memory. Java array is used to stores fienlds Values. Rather than getXXX() methods, setXXX() allow updating the content of the Tuple.

See Also:
Serialized Form

Constructor Summary
MemoryTuple()
           
MemoryTuple(PType[] types)
           
 
Method Summary
 java.lang.Object clone(java.lang.Object clone, java.util.Map obj2clone)
           
 java.math.BigDecimal getBigDecimal(int i)
          Returns the value of the designated column in the current row of this Tuple as a BigDecimal in the java programming language
 java.math.BigInteger getBigInteger(int i)
          Returns the value of the designated column in the current row of this Tuple as a BigDecimal in the java programming language
 boolean getBoolean(int i)
          Returns the value of the designated column in the current row of this Tuple as a Boolean of java programming language
 byte getByte(int i)
          Returns the value of the designated column in the current row of this Tuple as a Java byte
 byte[] getByteArray(int i)
          Returns the value of the designated column in the current row of this Tuple as a Java byte
 char getChar(int i)
          Returns the value of the designated column in the current row of this Tuple as a Java char
 char[] getCharArray(int i)
          Returns the value of the designated column in the current row of this Tuple as a Java char[]
 java.util.Date getDate(int i)
          Returns the value of the designated column in the current row of this Tuple as a java.sql.Data
 double getDouble(int i)
          Returns the value of the designated column in the current row of this Tuple as a Java double
 float getFloat(int i)
          Returns the value of the designated column in the current row of this Tuple as a Java float
 int getInt(int i)
          Returns the value of the designated column in the current row of this Tuple as a java int
 Operand getLikeOperand(int i)
          Returns the value of the designated column in the current row of this Tuple as an org.objectweb.medor.filter.Operand Object
 long getLong(int i)
          Returns the value of the designated column in the current row of this Tuple as a Java long
 java.lang.Object getObject(int i)
          Returns the value of the designated column in the current row of this Tuple as a Java Object
 short getShort(int i)
          Returns the value of the designated column in the current row of this Tuple as a Short in the java programming language
 int getSize()
          Give the number of the attribute in this Tuple object.
 java.lang.String getString(int i)
          Returns the value of the designated column in the current row of this Tuple as a String in java programming language
 TupleCollection getTupleCollection(int i)
          Returns the value of the designated column in the current row of this Tuple as a org.objectweb.medor object
 boolean isDefined(int i)
           
 void setBigDecimal(java.math.BigDecimal x, int i)
           
 void setBigInteger(java.math.BigInteger x, int i)
           
 void setBoolean(boolean x, int i)
           
 void setByte(byte x, int i)
           
 void setChar(char x, int i)
           
 void setDate(java.util.Date x, int i)
           
 void setDouble(double x, int i)
           
 void setFloat(float x, int i)
           
 void setInt(int x, int i)
           
 void setLong(long x, int i)
           
 void setShort(short x, int i)
           
 void setString(java.lang.String x, int i)
           
 Operand[] toOperandArray()
          Give the array of Operand object representation of the Tuple.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryTuple

public MemoryTuple()

MemoryTuple

public MemoryTuple(PType[] types)
Method Detail

clone

public java.lang.Object clone(java.lang.Object clone,
                              java.util.Map obj2clone)
                       throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException

isDefined

public boolean isDefined(int i)
Specified by:
isDefined in interface Tuple

getSize

public int getSize()
Description copied from interface: Tuple
Give the number of the attribute in this Tuple object.

Specified by:
getSize in interface Tuple
Returns:
an int

toOperandArray

public Operand[] toOperandArray()
Description copied from interface: Tuple
Give the array of Operand object representation of the Tuple.

Specified by:
toOperandArray in interface Tuple
Returns:
an array of Operand type.

getInt

public int getInt(int i)
           throws MedorException
Description copied from interface: Tuple
Returns the value of the designated column in the current row of this Tuple as a java int

Specified by:
getInt in interface Tuple
Throws:
MedorException

setInt

public void setInt(int x,
                   int i)
            throws MedorException
Throws:
MedorException

getByte

public byte getByte(int i)
             throws MedorException
Description copied from interface: Tuple
Returns the value of the designated column in the current row of this Tuple as a Java byte

Specified by:
getByte in interface Tuple
Throws:
MedorException

getByteArray

public byte[] getByteArray(int i)
                    throws MedorException
Description copied from interface: Tuple
Returns the value of the designated column in the current row of this Tuple as a Java byte

Specified by:
getByteArray in interface Tuple
Throws:
MedorException

setByte

public void setByte(byte x,
                    int i)
             throws MedorException
Throws:
MedorException

getDouble

public double getDouble(int i)
                 throws MedorException
Description copied from interface: Tuple
Returns the value of the designated column in the current row of this Tuple as a Java double

Specified by:
getDouble in interface Tuple
Throws:
MedorException

setBigDecimal

public void setBigDecimal(java.math.BigDecimal x,
                          int i)
                   throws MedorException
Throws:
MedorException

getBigDecimal

public java.math.BigDecimal getBigDecimal(int i)
                                   throws MedorException
Description copied from interface: Tuple
Returns the value of the designated column in the current row of this Tuple as a BigDecimal in the java programming language

Specified by:
getBigDecimal in interface Tuple
Throws:
MedorException

setBigInteger

public void setBigInteger(java.math.BigInteger x,
                          int i)
                   throws MedorException
Throws:
MedorException

getBigInteger

public java.math.BigInteger getBigInteger(int i)
                                   throws MedorException
Description copied from interface: Tuple
Returns the value of the designated column in the current row of this Tuple as a BigDecimal in the java programming language

Specified by:
getBigInteger in interface Tuple
Throws:
MedorException

setDouble

public void setDouble(double x,
                      int i)
               throws MedorException
Throws:
MedorException

getFloat

public float getFloat(int i)
               throws MedorException
Description copied from interface: Tuple
Returns the value of the designated column in the current row of this Tuple as a Java float

Specified by:
getFloat in interface Tuple
Throws:
MedorException

setFloat

public void setFloat(float x,
                     int i)
              throws MedorException
Throws:
MedorException

getShort

public short getShort(int i)
               throws MedorException
Description copied from interface: Tuple
Returns the value of the designated column in the current row of this Tuple as a Short in the java programming language

Specified by:
getShort in interface Tuple
Throws:
MedorException

setShort

public void setShort(short x,
                     int i)
              throws MedorException
Throws:
MedorException

getString

public java.lang.String getString(int i)
                           throws MedorException
Description copied from interface: Tuple
Returns the value of the designated column in the current row of this Tuple as a String in java programming language

Specified by:
getString in interface Tuple
Throws:
MedorException

setString

public void setString(java.lang.String x,
                      int i)
               throws MedorException
Throws:
MedorException

getLong

public long getLong(int i)
             throws MedorException
Description copied from interface: Tuple
Returns the value of the designated column in the current row of this Tuple as a Java long

Specified by:
getLong in interface Tuple
Throws:
MedorException

setLong

public void setLong(long x,
                    int i)
             throws MedorException
Throws:
MedorException

getObject

public java.lang.Object getObject(int i)
                           throws MedorException
Description copied from interface: Tuple
Returns the value of the designated column in the current row of this Tuple as a Java Object

Specified by:
getObject in interface Tuple
Throws:
MedorException

getBoolean

public boolean getBoolean(int i)
                   throws MedorException
Description copied from interface: Tuple
Returns the value of the designated column in the current row of this Tuple as a Boolean of java programming language

Specified by:
getBoolean in interface Tuple
Throws:
MedorException

setBoolean

public void setBoolean(boolean x,
                       int i)
                throws MedorException
Throws:
MedorException

getChar

public char getChar(int i)
             throws MedorException
Description copied from interface: Tuple
Returns the value of the designated column in the current row of this Tuple as a Java char

Specified by:
getChar in interface Tuple
Throws:
MedorException

getCharArray

public char[] getCharArray(int i)
                    throws MedorException
Description copied from interface: Tuple
Returns the value of the designated column in the current row of this Tuple as a Java char[]

Specified by:
getCharArray in interface Tuple
Throws:
MedorException

setChar

public void setChar(char x,
                    int i)
             throws MedorException
Throws:
MedorException

getDate

public java.util.Date getDate(int i)
                       throws MedorException
Description copied from interface: Tuple
Returns the value of the designated column in the current row of this Tuple as a java.sql.Data

Specified by:
getDate in interface Tuple
Throws:
MedorException

setDate

public void setDate(java.util.Date x,
                    int i)
             throws MedorException
Throws:
MedorException

getTupleCollection

public TupleCollection getTupleCollection(int i)
                                   throws MedorException
Description copied from interface: Tuple
Returns the value of the designated column in the current row of this Tuple as a org.objectweb.medor object

Specified by:
getTupleCollection in interface Tuple
Throws:
MedorException

getLikeOperand

public Operand getLikeOperand(int i)
                       throws MedorException
Description copied from interface: Tuple
Returns the value of the designated column in the current row of this Tuple as an org.objectweb.medor.filter.Operand Object

Specified by:
getLikeOperand in interface Tuple
Throws:
MedorException