public class ResultSetResult extends AbstractResult
Result implementation wrapped around a result set.
Column objects, column names, or column indexes (as Number
instances) can be used to retrieve result set data.| Constructor and Description |
|---|
ResultSetResult(java.sql.Connection conn,
java.sql.ResultSet rs,
DBDictionary dict)
Constructor.
|
ResultSetResult(java.sql.Connection conn,
java.sql.Statement stmnt,
java.sql.ResultSet rs,
DBDictionary dict)
Constructor.
|
ResultSetResult(java.sql.Connection conn,
java.sql.Statement stmnt,
java.sql.ResultSet rs,
JDBCStore store)
Constructor.
|
ResultSetResult(java.sql.ResultSet rs,
DBDictionary dict)
JDBC 2 constructor.
|
ResultSetResult(java.sql.ResultSet rs,
JDBCStore store)
JDBC 2 constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
absoluteInternal(int row)
Throws an exception by default.
|
void |
close()
Closes all eager results.
|
protected boolean |
containsInternal(java.lang.Object obj,
Joins joins)
Return whether this result contains data for the given id or column.
|
protected int |
findObject(java.lang.Object obj,
Joins joins)
Return the 1-based result set index for the given column or id, or a
non-positive number if the column is not contained in this result.
|
protected java.sql.Array |
getArrayInternal(java.lang.Object obj,
Joins joins) |
protected java.io.InputStream |
getAsciiStreamInternal(java.lang.Object obj,
Joins joins) |
protected java.math.BigDecimal |
getBigDecimalInternal(java.lang.Object obj,
Joins joins) |
protected java.math.BigInteger |
getBigIntegerInternal(java.lang.Object obj,
Joins joins) |
protected java.io.InputStream |
getBinaryStreamInternal(java.lang.Object obj,
Joins joins) |
protected java.sql.Blob |
getBlobInternal(java.lang.Object obj,
Joins joins) |
protected boolean |
getBooleanInternal(java.lang.Object obj,
Joins joins) |
protected byte |
getByteInternal(java.lang.Object obj,
Joins joins) |
protected byte[] |
getBytesInternal(java.lang.Object obj,
Joins joins) |
protected java.util.Calendar |
getCalendarInternal(java.lang.Object obj,
Joins joins) |
protected java.io.Reader |
getCharacterStreamInternal(java.lang.Object obj,
Joins joins) |
protected char |
getCharInternal(java.lang.Object obj,
Joins joins) |
protected java.sql.Clob |
getClobInternal(java.lang.Object obj,
Joins joins) |
boolean |
getCloseConnection()
Whether to close the backing connection when this result is closed.
|
protected java.sql.Date |
getDateInternal(java.lang.Object obj,
java.util.Calendar cal,
Joins joins) |
protected java.util.Date |
getDateInternal(java.lang.Object obj,
Joins joins) |
DBDictionary |
getDBDictionary()
Return the dictionary in use.
|
protected double |
getDoubleInternal(java.lang.Object obj,
Joins joins) |
protected float |
getFloatInternal(java.lang.Object obj,
Joins joins) |
protected int |
getIntInternal(java.lang.Object obj,
Joins joins) |
protected java.io.InputStream |
getLOBStreamInternal(JDBCStore store,
java.lang.Object obj,
Joins joins) |
protected java.util.Locale |
getLocaleInternal(java.lang.Object obj,
Joins joins) |
protected long |
getLongInternal(java.lang.Object obj,
Joins joins) |
protected java.lang.Number |
getNumberInternal(java.lang.Object obj,
Joins joins) |
protected java.lang.Object |
getObjectInternal(java.lang.Object obj,
int metaTypeCode,
java.lang.Object arg,
Joins joins)
Return the value stored in the given id or column.
|
protected java.sql.Ref |
getRefInternal(java.lang.Object obj,
java.util.Map map,
Joins joins) |
java.sql.ResultSet |
getResultSet()
Return the backing result set.
|
protected short |
getShortInternal(java.lang.Object obj,
Joins joins) |
protected java.lang.Object |
getSQLObjectInternal(java.lang.Object obj,
java.util.Map map,
Joins joins) |
java.sql.Statement |
getStatement()
Return the statement that produced this result.
|
JDBCStore |
getStore()
Optional store manager used to deserialize blobs containing
references to persistent objects.
|
protected java.lang.Object |
getStreamInternal(JDBCStore store,
java.lang.Object obj,
int metaTypeCode,
java.lang.Object arg,
Joins joins) |
protected java.lang.String |
getStringInternal(java.lang.Object obj,
Joins joins,
boolean isClobString) |
protected java.sql.Time |
getTimeInternal(java.lang.Object obj,
java.util.Calendar cal,
Joins joins) |
protected java.sql.Timestamp |
getTimestampInternal(java.lang.Object obj,
java.util.Calendar cal,
Joins joins) |
protected boolean |
nextInternal()
Advance this row.
|
void |
setCloseConnection(boolean closeConn)
Whether to close the backing connection when this result is closed.
|
void |
setStore(JDBCStore store)
Optional store manager used to deserialize blobs containing
references to persistent objects.
|
int |
size()
Return the number of rows in this result.
|
boolean |
supportsRandomAccess()
Returns false by default.
|
protected java.lang.Object |
translate(java.lang.Object obj,
Joins joins)
Translate the user-given id or column.
|
boolean |
wasNull()
Return true if the last value fetched was null.
|
absolute, checkNull, closeEagerMap, contains, contains, containsAll, containsAll, containsAllInternal, endDataRequest, getArray, getArray, getAsciiStream, getAsciiStream, getBaseMapping, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCalendar, getCalendar, getChar, getChar, getCharacterStream, getCharacterStream, getClob, getClob, getDate, getDate, getDate, getDate, getDouble, getDouble, getEager, getEagerMap, getFloat, getFloat, getInt, getInt, getLOBStream, getLocale, getLocale, getLong, getLong, getMappedByFieldMapping, getMappedByValue, getNumber, getNumber, getObject, getObject, getRef, getRef, getShort, getShort, getSQLObject, getSQLObject, getString, getString, getTime, getTime, getTimestamp, getTimestamp, indexOf, isLocking, load, load, newJoins, next, pushBack, putEager, setBaseMapping, setEagerMap, setIndexOf, setLocking, setMappedByFieldMapping, setMappedByValue, startDataRequestpublic ResultSetResult(java.sql.Connection conn,
java.sql.Statement stmnt,
java.sql.ResultSet rs,
DBDictionary dict)
public ResultSetResult(java.sql.Connection conn,
java.sql.Statement stmnt,
java.sql.ResultSet rs,
JDBCStore store)
public ResultSetResult(java.sql.Connection conn,
java.sql.ResultSet rs,
DBDictionary dict)
public ResultSetResult(java.sql.ResultSet rs,
DBDictionary dict)
throws java.sql.SQLException
java.sql.SQLExceptionpublic ResultSetResult(java.sql.ResultSet rs,
JDBCStore store)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Statement getStatement()
public java.sql.ResultSet getResultSet()
public DBDictionary getDBDictionary()
public JDBCStore getStore()
public void setStore(JDBCStore store)
public boolean getCloseConnection()
public void setCloseConnection(boolean closeConn)
public void close()
AbstractResultpublic boolean supportsRandomAccess()
throws java.sql.SQLException
AbstractResultsupportsRandomAccess in interface ResultsupportsRandomAccess in class AbstractResultjava.sql.SQLExceptionprotected boolean absoluteInternal(int row)
throws java.sql.SQLException
AbstractResultabsoluteInternal in class AbstractResultjava.sql.SQLExceptionprotected boolean nextInternal()
throws java.sql.SQLException
AbstractResultnextInternal in class AbstractResultjava.sql.SQLExceptionpublic int size()
throws java.sql.SQLException
Resultjava.sql.SQLExceptionprotected boolean containsInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
AbstractResultAbstractResult.translate(java.lang.Object, org.apache.openjpa.jdbc.sql.Joins).containsInternal in class AbstractResultjava.sql.SQLExceptionprotected java.sql.Array getArrayInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getArrayInternal in class AbstractResultjava.sql.SQLExceptionprotected java.io.InputStream getAsciiStreamInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getAsciiStreamInternal in class AbstractResultjava.sql.SQLExceptionprotected java.math.BigDecimal getBigDecimalInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getBigDecimalInternal in class AbstractResultjava.sql.SQLExceptionprotected java.lang.Number getNumberInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getNumberInternal in class AbstractResultjava.sql.SQLExceptionprotected java.math.BigInteger getBigIntegerInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getBigIntegerInternal in class AbstractResultjava.sql.SQLExceptionprotected java.io.InputStream getBinaryStreamInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getBinaryStreamInternal in class AbstractResultjava.sql.SQLExceptionprotected java.sql.Blob getBlobInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getBlobInternal in class AbstractResultjava.sql.SQLExceptionprotected boolean getBooleanInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getBooleanInternal in class AbstractResultjava.sql.SQLExceptionprotected byte getByteInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getByteInternal in class AbstractResultjava.sql.SQLExceptionprotected byte[] getBytesInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getBytesInternal in class AbstractResultjava.sql.SQLExceptionprotected java.util.Calendar getCalendarInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getCalendarInternal in class AbstractResultjava.sql.SQLExceptionprotected char getCharInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getCharInternal in class AbstractResultjava.sql.SQLExceptionprotected java.io.Reader getCharacterStreamInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getCharacterStreamInternal in class AbstractResultjava.sql.SQLExceptionprotected java.sql.Clob getClobInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getClobInternal in class AbstractResultjava.sql.SQLExceptionprotected java.util.Date getDateInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getDateInternal in class AbstractResultjava.sql.SQLExceptionprotected java.sql.Date getDateInternal(java.lang.Object obj,
java.util.Calendar cal,
Joins joins)
throws java.sql.SQLException
getDateInternal in class AbstractResultjava.sql.SQLExceptionprotected double getDoubleInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getDoubleInternal in class AbstractResultjava.sql.SQLExceptionprotected float getFloatInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getFloatInternal in class AbstractResultjava.sql.SQLExceptionprotected int getIntInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getIntInternal in class AbstractResultjava.sql.SQLExceptionprotected java.util.Locale getLocaleInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getLocaleInternal in class AbstractResultjava.sql.SQLExceptionprotected long getLongInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getLongInternal in class AbstractResultjava.sql.SQLExceptionprotected java.lang.Object getStreamInternal(JDBCStore store, java.lang.Object obj, int metaTypeCode, java.lang.Object arg, Joins joins) throws java.sql.SQLException
getStreamInternal in class AbstractResultjava.sql.SQLExceptionprotected java.lang.Object getObjectInternal(java.lang.Object obj,
int metaTypeCode,
java.lang.Object arg,
Joins joins)
throws java.sql.SQLException
AbstractResultgetObjectInternal in class AbstractResultjava.sql.SQLExceptionprotected java.lang.Object getSQLObjectInternal(java.lang.Object obj,
java.util.Map map,
Joins joins)
throws java.sql.SQLException
getSQLObjectInternal in class AbstractResultjava.sql.SQLExceptionprotected java.sql.Ref getRefInternal(java.lang.Object obj,
java.util.Map map,
Joins joins)
throws java.sql.SQLException
getRefInternal in class AbstractResultjava.sql.SQLExceptionprotected short getShortInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getShortInternal in class AbstractResultjava.sql.SQLExceptionprotected java.lang.String getStringInternal(java.lang.Object obj,
Joins joins,
boolean isClobString)
throws java.sql.SQLException
getStringInternal in class AbstractResultjava.sql.SQLExceptionprotected java.sql.Time getTimeInternal(java.lang.Object obj,
java.util.Calendar cal,
Joins joins)
throws java.sql.SQLException
getTimeInternal in class AbstractResultjava.sql.SQLExceptionprotected java.sql.Timestamp getTimestampInternal(java.lang.Object obj,
java.util.Calendar cal,
Joins joins)
throws java.sql.SQLException
getTimestampInternal in class AbstractResultjava.sql.SQLExceptionpublic boolean wasNull()
throws java.sql.SQLException
ResultwasNull in interface ResultwasNull in class AbstractResultjava.sql.SQLExceptionprotected java.lang.Object translate(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
AbstractResultget*Internal methods with the exception of
getObjectInternal. Return the
original value by default.translate in class AbstractResultjava.sql.SQLExceptionprotected int findObject(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
java.sql.SQLExceptionprotected java.io.InputStream getLOBStreamInternal(JDBCStore store, java.lang.Object obj, Joins joins) throws java.sql.SQLException
getLOBStreamInternal in class AbstractResultjava.sql.SQLExceptionCopyright © 2006-2013 Apache Software Foundation. All Rights Reserved.