org.objectweb.medor.tuple.lib
Class MemoryTuple

java.lang.Object
  |
  +--org.objectweb.medor.tuple.lib.MemoryTuple
All Implemented Interfaces:
java.lang.Cloneable, Tuple

public class MemoryTuple
extends java.lang.Object
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.


Constructor Summary
MemoryTuple(PType[] types)
           
 
Method Summary
 java.lang.Object clone()
           
 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
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryTuple

public MemoryTuple(PType[] types)
Method Detail

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
MedorException

setInt

public void setInt(int x,
                   int i)
            throws MedorException
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
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
MedorException

setByte

public void setByte(byte x,
                    int i)
             throws MedorException
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
MedorException

setBigDecimal

public void setBigDecimal(java.math.BigDecimal x,
                          int i)
                   throws MedorException
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
MedorException

setBigInteger

public void setBigInteger(java.math.BigInteger x,
                          int i)
                   throws MedorException
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
MedorException

setDouble

public void setDouble(double x,
                      int i)
               throws MedorException
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
MedorException

setFloat

public void setFloat(float x,
                     int i)
              throws MedorException
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
MedorException

setShort

public void setShort(short x,
                     int i)
              throws MedorException
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
MedorException

setString

public void setString(java.lang.String x,
                      int i)
               throws MedorException
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
MedorException

setLong

public void setLong(long x,
                    int i)
             throws MedorException
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
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
MedorException

setBoolean

public void setBoolean(boolean x,
                       int i)
                throws MedorException
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
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
MedorException

setChar

public void setChar(char x,
                    int i)
             throws MedorException
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
MedorException

setDate

public void setDate(java.util.Date x,
                    int i)
             throws MedorException
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
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
MedorException

clone

public java.lang.Object clone()
Specified by:
clone in interface Tuple
Overrides:
clone in class java.lang.Object