net.sf.farrago.fennel.tuple
Class FennelTupleResultSet
java.lang.Object
org.eigenbase.jdbc4.Unwrappable
org.eigenbase.util14.AbstractResultSet
net.sf.farrago.fennel.tuple.FennelTupleResultSet
- All Implemented Interfaces:
- ResultSet
public abstract class FennelTupleResultSet
- extends AbstractResultSet
FennelTupleResultSet provides an abstract java.sql.ResultSet based on tuples.
This object uses the Java Tuple Library to interpret tuple data as presented
in fennel tuple format and presents java objects and/or primitives as
requested by the application. TODO: FennelTupleResultSet minimizes object
creation while remapping tuple data to java objects in order to provide
higher performance. This class is JDK 1.4 compatible.
- Since:
- Jan 8, 2006
- Version:
- $Id: //open/dev/farrago/src/net/sf/farrago/fennel/tuple/FennelTupleResultSet.java#17 $
- Author:
- angel
Methods inherited from class org.eigenbase.util14.AbstractResultSet |
absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, close, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getHoldability, getInt, getInt, getLong, getLong, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getRaw, getRef, getRef, getRow, getRowId, getRowId, getShort, getShort, getSQLXML, getSQLXML, getStatement, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, newConversionError, newConversionError, newDirectionError, newFetchError, newUpdatabilityError, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, setMaxRows, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNull |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ERRMSG_NO_TUPLE
public static final String ERRMSG_NO_TUPLE
- See Also:
- Constant Field Values
defaultZone
private static final TimeZone defaultZone
- The default timezone for this Java VM.
metaData
protected ResultSetMetaData metaData
desc
protected FennelTupleDescriptor desc
accessor
protected FennelTupleAccessor accessor
data
protected FennelTupleData data
tupleComputed
protected boolean tupleComputed
tupleAlignment
protected final int tupleAlignment
tupleAlignmentMask
protected final int tupleAlignmentMask
FennelTupleResultSet
public FennelTupleResultSet(FennelTupleDescriptor desc,
ResultSetMetaData metaData,
int tupleAlignment)
FennelTupleResultSet
public FennelTupleResultSet(FennelTupleDescriptor desc,
ResultSetMetaData metaData)
computeTuple
protected boolean computeTuple()
- compute the tuple accessors
alignBufferPosition
protected void alignBufferPosition(ByteBuffer buf)
- Adjusts ByteBuffer position according to the tuple alignment mask. Used
when "slicing" tuples from a multiple-tuple buffer.
- Parameters:
buf
-
getMillis
protected static long getMillis(FennelTupleDatum d,
boolean shiftForTimeZone)
getMillis
protected static long getMillis(FennelTupleDatum d)
getRaw
protected Object getRaw(int columnIndex)
throws SQLException
- Returns the raw object representing this column
- Specified by:
getRaw
in class AbstractResultSet
- Parameters:
columnIndex
- column ordinal
- Returns:
- raw object for a column
- Throws:
SQLException
getRawColumnData
public static Object getRawColumnData(int columnIndex,
ResultSetMetaData metaData,
FennelTupleData tupleData)
throws SQLException
- Parameters:
columnIndex
- column ordinalmetaData
- metadata for all columnstupleData
- tuple data representing a row of columns
- Returns:
- column data corresponding to a specified column ordinal; null if
the data is null
- Throws:
SQLException
getMetaData
public ResultSetMetaData getMetaData()
throws SQLException
- The number, types and properties of a ResultSet's columns are provided by
the getMetaData method.
- Returns:
- the description of a ResultSet's columns
- Throws:
SQLException