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