com.caucho.amber.query
Class ResultSetCacheChunk

java.lang.Object
  extended by com.caucho.amber.query.ResultSetCacheChunk

public class ResultSetCacheChunk
extends java.lang.Object

The JDBC statement implementation.


Field Summary
static int CACHE_CHUNK_SIZE
           
 
Constructor Summary
ResultSetCacheChunk()
           
ResultSetCacheChunk(ResultSetCacheChunk prev)
           
 
Method Summary
 boolean getBoolean(int row, int column)
          Returns the boolean value for the column.
 byte getByte(int row, int column)
          Returns the byte value for the column.
 double getDouble(int row, int column)
          Returns the double value for the column.
 long getExpireTime()
          Returns the expire time.
 float getFloat(int row, int column)
          Returns the float value for the column.
 int getInt(int row, int column)
          Returns the int value for the column.
 long getLong(int row, int column)
          Returns the long value for the column.
 ResultSetCacheChunk getNext()
          Gets the next chunk
 java.lang.Object getObject(int row, int column)
          Returns the value.
 AmberSelectQuery getQuery()
          Gets the query.
 int getRowCount()
          Returns the number of rows.
 short getShort(int row, int column)
          Returns the short value for the column.
 java.lang.String getString(int row, int column)
          Returns the string value for the column.
 void invalidate()
          Invalidates the chunk.
 boolean invalidate(java.lang.String table, java.lang.Object key)
          Invalidates the chunk based on a table and key.
 boolean isLast()
          True for the last.
 boolean isNull(int row, int column)
          Returns true if the last column read was null.
 boolean isValid()
          Return true if the chunk is still valid.
 void newRow()
          Adds a new row.
 void setLast(boolean isLast)
          Sets true for the last.
 void setNext(ResultSetCacheChunk next)
          Gets the next chunk
 void setQuery(AmberSelectQuery query)
          Sets the query.
 void setValue(int row, int column, java.lang.Object value)
          Sets a row value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CACHE_CHUNK_SIZE

public static final int CACHE_CHUNK_SIZE
See Also:
Constant Field Values
Constructor Detail

ResultSetCacheChunk

public ResultSetCacheChunk()

ResultSetCacheChunk

public ResultSetCacheChunk(ResultSetCacheChunk prev)
Method Detail

setQuery

public void setQuery(AmberSelectQuery query)
Sets the query.


getQuery

public AmberSelectQuery getQuery()
Gets the query.


getExpireTime

public long getExpireTime()
Returns the expire time.


isValid

public boolean isValid()
Return true if the chunk is still valid.


invalidate

public void invalidate()
Invalidates the chunk.


invalidate

public boolean invalidate(java.lang.String table,
                          java.lang.Object key)
Invalidates the chunk based on a table and key.


getRowCount

public int getRowCount()
Returns the number of rows.


newRow

public void newRow()
Adds a new row.


setValue

public void setValue(int row,
                     int column,
                     java.lang.Object value)
Sets a row value.


getNext

public ResultSetCacheChunk getNext()
Gets the next chunk


setNext

public void setNext(ResultSetCacheChunk next)
Gets the next chunk


setLast

public void setLast(boolean isLast)
Sets true for the last.


isLast

public boolean isLast()
True for the last.


isNull

public boolean isNull(int row,
                      int column)
Returns true if the last column read was null.


getBoolean

public boolean getBoolean(int row,
                          int column)
                   throws java.sql.SQLException
Returns the boolean value for the column.

Throws:
java.sql.SQLException

getByte

public byte getByte(int row,
                    int column)
             throws java.sql.SQLException
Returns the byte value for the column.

Throws:
java.sql.SQLException

getInt

public int getInt(int row,
                  int column)
           throws java.sql.SQLException
Returns the int value for the column.

Throws:
java.sql.SQLException

getShort

public short getShort(int row,
                      int column)
               throws java.sql.SQLException
Returns the short value for the column.

Throws:
java.sql.SQLException

getLong

public long getLong(int row,
                    int column)
             throws java.sql.SQLException
Returns the long value for the column.

Throws:
java.sql.SQLException

getDouble

public double getDouble(int row,
                        int column)
                 throws java.sql.SQLException
Returns the double value for the column.

Throws:
java.sql.SQLException

getFloat

public float getFloat(int row,
                      int column)
               throws java.sql.SQLException
Returns the float value for the column.

Throws:
java.sql.SQLException

getString

public java.lang.String getString(int row,
                                  int column)
                           throws java.sql.SQLException
Returns the string value for the column.

Throws:
java.sql.SQLException

getObject

public final java.lang.Object getObject(int row,
                                        int column)
Returns the value.