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 |
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, startDataRequest
public 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
SQLException
public ResultSetResult(ResultSet rs, JDBCStore store) throws SQLException
SQLException
public 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 close()
AbstractResult
public boolean supportsRandomAccess() throws SQLException
AbstractResult
supportsRandomAccess
in interface Result
supportsRandomAccess
in class AbstractResult
SQLException
protected boolean absoluteInternal(int row) throws SQLException
AbstractResult
absoluteInternal
in class AbstractResult
SQLException
protected boolean nextInternal() throws SQLException
AbstractResult
nextInternal
in class AbstractResult
SQLException
public int size() throws SQLException
Result
SQLException
protected boolean containsInternal(Object obj, Joins joins) throws SQLException
AbstractResult
AbstractResult.translate(java.lang.Object, org.apache.openjpa.jdbc.sql.Joins)
.containsInternal
in class AbstractResult
SQLException
protected Array getArrayInternal(Object obj, Joins joins) throws SQLException
getArrayInternal
in class AbstractResult
SQLException
protected InputStream getAsciiStreamInternal(Object obj, Joins joins) throws SQLException
getAsciiStreamInternal
in class AbstractResult
SQLException
protected BigDecimal getBigDecimalInternal(Object obj, Joins joins) throws SQLException
getBigDecimalInternal
in class AbstractResult
SQLException
protected Number getNumberInternal(Object obj, Joins joins) throws SQLException
getNumberInternal
in class AbstractResult
SQLException
protected BigInteger getBigIntegerInternal(Object obj, Joins joins) throws SQLException
getBigIntegerInternal
in class AbstractResult
SQLException
protected InputStream getBinaryStreamInternal(Object obj, Joins joins) throws SQLException
getBinaryStreamInternal
in class AbstractResult
SQLException
protected Blob getBlobInternal(Object obj, Joins joins) throws SQLException
getBlobInternal
in class AbstractResult
SQLException
protected boolean getBooleanInternal(Object obj, Joins joins) throws SQLException
getBooleanInternal
in class AbstractResult
SQLException
protected byte getByteInternal(Object obj, Joins joins) throws SQLException
getByteInternal
in class AbstractResult
SQLException
protected byte[] getBytesInternal(Object obj, Joins joins) throws SQLException
getBytesInternal
in class AbstractResult
SQLException
protected Calendar getCalendarInternal(Object obj, Joins joins) throws SQLException
getCalendarInternal
in class AbstractResult
SQLException
protected char getCharInternal(Object obj, Joins joins) throws SQLException
getCharInternal
in class AbstractResult
SQLException
protected Reader getCharacterStreamInternal(Object obj, Joins joins) throws SQLException
getCharacterStreamInternal
in class AbstractResult
SQLException
protected Clob getClobInternal(Object obj, Joins joins) throws SQLException
getClobInternal
in class AbstractResult
SQLException
protected Date getDateInternal(Object obj, Joins joins) throws SQLException
getDateInternal
in class AbstractResult
SQLException
protected Date getDateInternal(Object obj, Calendar cal, Joins joins) throws SQLException
getDateInternal
in class AbstractResult
SQLException
protected double getDoubleInternal(Object obj, Joins joins) throws SQLException
getDoubleInternal
in class AbstractResult
SQLException
protected float getFloatInternal(Object obj, Joins joins) throws SQLException
getFloatInternal
in class AbstractResult
SQLException
protected int getIntInternal(Object obj, Joins joins) throws SQLException
getIntInternal
in class AbstractResult
SQLException
protected Locale getLocaleInternal(Object obj, Joins joins) throws SQLException
getLocaleInternal
in class AbstractResult
SQLException
protected long getLongInternal(Object obj, Joins joins) throws SQLException
getLongInternal
in class AbstractResult
SQLException
protected Object getStreamInternal(JDBCStore store, Object obj, int metaTypeCode, Object arg, Joins joins) throws SQLException
getStreamInternal
in class AbstractResult
SQLException
protected Object getObjectInternal(Object obj, int metaTypeCode, Object arg, Joins joins) throws SQLException
AbstractResult
getObjectInternal
in class AbstractResult
SQLException
protected Object getSQLObjectInternal(Object obj, Map map, Joins joins) throws SQLException
getSQLObjectInternal
in class AbstractResult
SQLException
protected Ref getRefInternal(Object obj, Map map, Joins joins) throws SQLException
getRefInternal
in class AbstractResult
SQLException
protected short getShortInternal(Object obj, Joins joins) throws SQLException
getShortInternal
in class AbstractResult
SQLException
protected String getStringInternal(Object obj, Joins joins, boolean isClobString) throws SQLException
getStringInternal
in class AbstractResult
SQLException
protected Time getTimeInternal(Object obj, Calendar cal, Joins joins) throws SQLException
getTimeInternal
in class AbstractResult
SQLException
protected Timestamp getTimestampInternal(Object obj, Calendar cal, Joins joins) throws SQLException
getTimestampInternal
in class AbstractResult
SQLException
public boolean wasNull() throws SQLException
Result
wasNull
in interface Result
wasNull
in class AbstractResult
SQLException
protected Object translate(Object obj, Joins joins) throws SQLException
AbstractResult
get*Internal
methods with the exception of
getObjectInternal
. Return the
original value by default.translate
in class AbstractResult
SQLException
protected int findObject(Object obj, Joins joins) throws SQLException
SQLException
protected InputStream getLOBStreamInternal(JDBCStore store, Object obj, Joins joins) throws SQLException
getLOBStreamInternal
in class AbstractResult
SQLException
Copyright © 2006–2017 Apache Software Foundation. All rights reserved.