org.objectweb.jorm.mapper.rdb.lib
Class RdbTupleCollection

java.lang.Object
  extended byorg.objectweb.jorm.mapper.rdb.lib.RdbTupleCollection
All Implemented Interfaces:
PPrefetchTupleCollection

public class RdbTupleCollection
extends java.lang.Object
implements PPrefetchTupleCollection

Is a TupleCollection encaspulating a prefetched buffer.

Author:
P. Dechamboux

Constructor Summary
RdbTupleCollection(java.lang.Object txctx, java.sql.ResultSet rs, java.sql.PreparedStatement ps, int pi, Logger l, PClassMapping pcm, boolean withSubType, java.lang.Object png)
           
 
Method Summary
 void close()
           
 void first()
          Moves the cursor to the first Tuple of this TupleCollection
 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
 TupleStructure getMetaData()
           
 java.lang.Object getObject(int i)
          Returns the value of the designated column in the current row of this Tuple as an Object in the java programming language
 int getPNameIndex()
          Gets the index of the PName of the persistent class which is pefetched
 PrefetchBuffer getPrefetchBuffer()
          Gets the PrefetchBuffer associated with the TupleCollection.
 int getRow()
          Retrieves the current row Number of this TupleCollection
 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
 Tuple getTuple()
           
 Tuple getTuple(int row)
           
 TupleCollection getTupleCollection(int i)
          Returns the value of the designated column in the current row of this Tuple as a org.objectweb.medor object
 void invalidatePrefetchBuffer()
           
 boolean isDefined(int i)
           
 boolean isEmpty()
           
 boolean isLast()
           
 boolean next()
          Moves the cursor down one row from its current position to the next tuple
 boolean row(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

RdbTupleCollection

public RdbTupleCollection(java.lang.Object txctx,
                          java.sql.ResultSet rs,
                          java.sql.PreparedStatement ps,
                          int pi,
                          Logger l,
                          PClassMapping pcm,
                          boolean withSubType,
                          java.lang.Object png)
                   throws MedorException,
                          java.sql.SQLException
Method Detail

getPrefetchBuffer

public PrefetchBuffer getPrefetchBuffer()
Description copied from interface: PPrefetchTupleCollection
Gets the PrefetchBuffer associated with the TupleCollection.

Specified by:
getPrefetchBuffer in interface PPrefetchTupleCollection
Returns:
The corresponding PrefetchBuffer.

getPNameIndex

public int getPNameIndex()
Description copied from interface: PPrefetchTupleCollection
Gets the index of the PName of the persistent class which is pefetched

Specified by:
getPNameIndex in interface PPrefetchTupleCollection
Returns:
an integer value greater or equal to 1.

getMetaData

public TupleStructure getMetaData()
                           throws MedorException
Throws:
MedorException

isLast

public boolean isLast()
               throws MedorException
Throws:
MedorException

close

public void close()
           throws MedorException
Throws:
MedorException

next

public boolean next()
             throws MedorException
Moves the cursor down one row from its current position to the next tuple

Throws:
MedorException

first

public void first()
           throws MedorException
Moves the cursor to the first Tuple of this TupleCollection

Throws:
MedorException

getRow

public int getRow()
           throws MedorException
Retrieves the current row Number of this TupleCollection

Throws:
MedorException

getTuple

public Tuple getTuple()
               throws MedorException
Throws:
MedorException

getTuple

public Tuple getTuple(int row)
               throws MedorException
Throws:
MedorException

isEmpty

public boolean isEmpty()
                throws MedorException
Throws:
MedorException

row

public boolean row(int i)
            throws MedorException
Throws:
MedorException

getSize

public int getSize()
Give the number of the attribute in this Tuple object.

Returns:
an int

toOperandArray

public Operand[] toOperandArray()
Give the array of Operand object representation of the Tuple.

Returns:
an array of Operand type.

getBoolean

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

Throws:
MedorException

getByte

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

Throws:
MedorException

getByteArray

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

Throws:
MedorException

getChar

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

Throws:
MedorException

getCharArray

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

Throws:
MedorException

getDate

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

Throws:
MedorException

getDouble

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

Throws:
MedorException

getFloat

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

Throws:
MedorException

getInt

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

Throws:
MedorException

getLikeOperand

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

Throws:
MedorException

getLong

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

Throws:
MedorException

getObject

public java.lang.Object getObject(int i)
                           throws MedorException
Returns the value of the designated column in the current row of this Tuple as an Object in the java programming language

Throws:
MedorException

getShort

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

Throws:
MedorException

getBigDecimal

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

Throws:
MedorException

getBigInteger

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

Throws:
MedorException

getString

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

Throws:
MedorException

getTupleCollection

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

Throws:
MedorException

isDefined

public boolean isDefined(int i)

invalidatePrefetchBuffer

public void invalidatePrefetchBuffer()
                              throws MedorException
Throws:
MedorException