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(Connection conn,
ResultSet rs,
DBDictionary dict)
Constructor.
|
ResultSetResult(Connection conn,
Statement stmnt,
ResultSet rs,
DBDictionary dict)
Constructor.
|
ResultSetResult(Connection conn,
Statement stmnt,
ResultSet rs,
JDBCStore store)
Constructor.
|
ResultSetResult(ResultSet rs,
DBDictionary dict)
JDBC 2 constructor.
|
ResultSetResult(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(Object obj,
Joins joins)
Return whether this result contains data for the given id or column.
|
protected int |
findObject(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 Array |
getArrayInternal(Object obj,
Joins joins) |
protected InputStream |
getAsciiStreamInternal(Object obj,
Joins joins) |
protected BigDecimal |
getBigDecimalInternal(Object obj,
Joins joins) |
protected BigInteger |
getBigIntegerInternal(Object obj,
Joins joins) |
protected InputStream |
getBinaryStreamInternal(Object obj,
Joins joins) |
protected Blob |
getBlobInternal(Object obj,
Joins joins) |
protected boolean |
getBooleanInternal(Object obj,
Joins joins) |
protected byte |
getByteInternal(Object obj,
Joins joins) |
protected byte[] |
getBytesInternal(Object obj,
Joins joins) |
protected Calendar |
getCalendarInternal(Object obj,
Joins joins) |
protected Reader |
getCharacterStreamInternal(Object obj,
Joins joins) |
protected char |
getCharInternal(Object obj,
Joins joins) |
protected Clob |
getClobInternal(Object obj,
Joins joins) |
boolean |
getCloseConnection()
Whether to close the backing connection when this result is closed.
|
protected Date |
getDateInternal(Object obj,
Calendar cal,
Joins joins) |
protected Date |
getDateInternal(Object obj,
Joins joins) |
DBDictionary |
getDBDictionary()
Return the dictionary in use.
|
protected double |
getDoubleInternal(Object obj,
Joins joins) |
protected float |
getFloatInternal(Object obj,
Joins joins) |
protected int |
getIntInternal(Object obj,
Joins joins) |
protected InputStream |
getLOBStreamInternal(JDBCStore store,
Object obj,
Joins joins) |
protected Locale |
getLocaleInternal(Object obj,
Joins joins) |
protected long |
getLongInternal(Object obj,
Joins joins) |
protected Number |
getNumberInternal(Object obj,
Joins joins) |
protected Object |
getObjectInternal(Object obj,
int metaTypeCode,
Object arg,
Joins joins)
Return the value stored in the given id or column.
|
protected Ref |
getRefInternal(Object obj,
Map map,
Joins joins) |
ResultSet |
getResultSet()
Return the backing result set.
|
protected short |
getShortInternal(Object obj,
Joins joins) |
protected Object |
getSQLObjectInternal(Object obj,
Map map,
Joins joins) |
Statement |
getStatement()
Return the statement that produced this result.
|
JDBCStore |
getStore()
Optional store manager used to deserialize blobs containing
references to persistent objects.
|
protected Object |
getStreamInternal(JDBCStore store,
Object obj,
int metaTypeCode,
Object arg,
Joins joins) |
protected String |
getStringInternal(Object obj,
Joins joins,
boolean isClobString) |
protected Time |
getTimeInternal(Object obj,
Calendar cal,
Joins joins) |
protected Timestamp |
getTimestampInternal(Object obj,
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 |
setCloseStatement(boolean closeStatement) |
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 Object |
translate(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(Connection conn, Statement stmnt, ResultSet rs, DBDictionary dict)
public ResultSetResult(Connection conn, Statement stmnt, ResultSet rs, JDBCStore store)
public ResultSetResult(Connection conn, ResultSet rs, DBDictionary dict)
public ResultSetResult(ResultSet rs, DBDictionary dict) throws SQLException
SQLExceptionpublic ResultSetResult(ResultSet rs, JDBCStore store) throws SQLException
SQLExceptionpublic Statement getStatement()
public ResultSet getResultSet()
public DBDictionary getDBDictionary()
public JDBCStore getStore()
public void setStore(JDBCStore store)
public boolean getCloseConnection()
public void setCloseConnection(boolean closeConn)
public void setCloseStatement(boolean closeStatement)
public void close()
AbstractResultpublic boolean supportsRandomAccess()
throws SQLException
AbstractResultsupportsRandomAccess in interface ResultsupportsRandomAccess in class AbstractResultSQLExceptionprotected boolean absoluteInternal(int row)
throws SQLException
AbstractResultabsoluteInternal in class AbstractResultSQLExceptionprotected boolean nextInternal()
throws SQLException
AbstractResultnextInternal in class AbstractResultSQLExceptionpublic int size()
throws SQLException
ResultSQLExceptionprotected boolean containsInternal(Object obj, Joins joins) throws SQLException
AbstractResultAbstractResult.translate(java.lang.Object, org.apache.openjpa.jdbc.sql.Joins).containsInternal in class AbstractResultSQLExceptionprotected Array getArrayInternal(Object obj, Joins joins) throws SQLException
getArrayInternal in class AbstractResultSQLExceptionprotected InputStream getAsciiStreamInternal(Object obj, Joins joins) throws SQLException
getAsciiStreamInternal in class AbstractResultSQLExceptionprotected BigDecimal getBigDecimalInternal(Object obj, Joins joins) throws SQLException
getBigDecimalInternal in class AbstractResultSQLExceptionprotected Number getNumberInternal(Object obj, Joins joins) throws SQLException
getNumberInternal in class AbstractResultSQLExceptionprotected BigInteger getBigIntegerInternal(Object obj, Joins joins) throws SQLException
getBigIntegerInternal in class AbstractResultSQLExceptionprotected InputStream getBinaryStreamInternal(Object obj, Joins joins) throws SQLException
getBinaryStreamInternal in class AbstractResultSQLExceptionprotected Blob getBlobInternal(Object obj, Joins joins) throws SQLException
getBlobInternal in class AbstractResultSQLExceptionprotected boolean getBooleanInternal(Object obj, Joins joins) throws SQLException
getBooleanInternal in class AbstractResultSQLExceptionprotected byte getByteInternal(Object obj, Joins joins) throws SQLException
getByteInternal in class AbstractResultSQLExceptionprotected byte[] getBytesInternal(Object obj, Joins joins) throws SQLException
getBytesInternal in class AbstractResultSQLExceptionprotected Calendar getCalendarInternal(Object obj, Joins joins) throws SQLException
getCalendarInternal in class AbstractResultSQLExceptionprotected char getCharInternal(Object obj, Joins joins) throws SQLException
getCharInternal in class AbstractResultSQLExceptionprotected Reader getCharacterStreamInternal(Object obj, Joins joins) throws SQLException
getCharacterStreamInternal in class AbstractResultSQLExceptionprotected Clob getClobInternal(Object obj, Joins joins) throws SQLException
getClobInternal in class AbstractResultSQLExceptionprotected Date getDateInternal(Object obj, Joins joins) throws SQLException
getDateInternal in class AbstractResultSQLExceptionprotected Date getDateInternal(Object obj, Calendar cal, Joins joins) throws SQLException
getDateInternal in class AbstractResultSQLExceptionprotected double getDoubleInternal(Object obj, Joins joins) throws SQLException
getDoubleInternal in class AbstractResultSQLExceptionprotected float getFloatInternal(Object obj, Joins joins) throws SQLException
getFloatInternal in class AbstractResultSQLExceptionprotected int getIntInternal(Object obj, Joins joins) throws SQLException
getIntInternal in class AbstractResultSQLExceptionprotected Locale getLocaleInternal(Object obj, Joins joins) throws SQLException
getLocaleInternal in class AbstractResultSQLExceptionprotected long getLongInternal(Object obj, Joins joins) throws SQLException
getLongInternal in class AbstractResultSQLExceptionprotected Object getStreamInternal(JDBCStore store, Object obj, int metaTypeCode, Object arg, Joins joins) throws SQLException
getStreamInternal in class AbstractResultSQLExceptionprotected Object getObjectInternal(Object obj, int metaTypeCode, Object arg, Joins joins) throws SQLException
AbstractResultgetObjectInternal in class AbstractResultSQLExceptionprotected Object getSQLObjectInternal(Object obj, Map map, Joins joins) throws SQLException
getSQLObjectInternal in class AbstractResultSQLExceptionprotected Ref getRefInternal(Object obj, Map map, Joins joins) throws SQLException
getRefInternal in class AbstractResultSQLExceptionprotected short getShortInternal(Object obj, Joins joins) throws SQLException
getShortInternal in class AbstractResultSQLExceptionprotected String getStringInternal(Object obj, Joins joins, boolean isClobString) throws SQLException
getStringInternal in class AbstractResultSQLExceptionprotected Time getTimeInternal(Object obj, Calendar cal, Joins joins) throws SQLException
getTimeInternal in class AbstractResultSQLExceptionprotected Timestamp getTimestampInternal(Object obj, Calendar cal, Joins joins) throws SQLException
getTimestampInternal in class AbstractResultSQLExceptionpublic boolean wasNull()
throws SQLException
ResultwasNull in interface ResultwasNull in class AbstractResultSQLExceptionprotected Object translate(Object obj, Joins joins) throws SQLException
AbstractResultget*Internal methods with the exception of
getObjectInternal. Return the
original value by default.translate in class AbstractResultSQLExceptionprotected int findObject(Object obj, Joins joins) throws SQLException
SQLExceptionprotected InputStream getLOBStreamInternal(JDBCStore store, Object obj, Joins joins) throws SQLException
getLOBStreamInternal in class AbstractResultSQLExceptionCopyright © 2006–2018 Apache Software Foundation. All rights reserved.