|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.jdbc.sql.AbstractResult
org.apache.openjpa.jdbc.sql.ResultSetResult
public class ResultSetResult
Base 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 Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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.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.String |
getStringInternal(java.lang.Object obj,
Joins joins)
|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
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.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| Method Detail |
|---|
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
close in interface Resultclose in interface Closeableclose in class AbstractResult
public boolean supportsRandomAccess()
throws java.sql.SQLException
AbstractResult
supportsRandomAccess in interface ResultsupportsRandomAccess in class AbstractResultjava.sql.SQLException
protected boolean absoluteInternal(int row)
throws java.sql.SQLException
AbstractResult
absoluteInternal in class AbstractResultjava.sql.SQLException
protected boolean nextInternal()
throws java.sql.SQLException
AbstractResult
nextInternal in class AbstractResultjava.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
AbstractResultAbstractResult.translate(java.lang.Object, org.apache.openjpa.jdbc.sql.Joins).
containsInternal in class AbstractResultjava.sql.SQLException
protected java.sql.Array getArrayInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getArrayInternal in class AbstractResultjava.sql.SQLException
protected java.io.InputStream getAsciiStreamInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getAsciiStreamInternal in class AbstractResultjava.sql.SQLException
protected java.math.BigDecimal getBigDecimalInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getBigDecimalInternal in class AbstractResultjava.sql.SQLException
protected java.lang.Number getNumberInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getNumberInternal in class AbstractResultjava.sql.SQLException
protected java.math.BigInteger getBigIntegerInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getBigIntegerInternal in class AbstractResultjava.sql.SQLException
protected java.io.InputStream getBinaryStreamInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getBinaryStreamInternal in class AbstractResultjava.sql.SQLException
protected java.sql.Blob getBlobInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getBlobInternal in class AbstractResultjava.sql.SQLException
protected boolean getBooleanInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getBooleanInternal in class AbstractResultjava.sql.SQLException
protected byte getByteInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getByteInternal in class AbstractResultjava.sql.SQLException
protected byte[] getBytesInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getBytesInternal in class AbstractResultjava.sql.SQLException
protected java.util.Calendar getCalendarInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getCalendarInternal in class AbstractResultjava.sql.SQLException
protected char getCharInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getCharInternal in class AbstractResultjava.sql.SQLException
protected java.io.Reader getCharacterStreamInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getCharacterStreamInternal in class AbstractResultjava.sql.SQLException
protected java.sql.Clob getClobInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getClobInternal in class AbstractResultjava.sql.SQLException
protected java.util.Date getDateInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getDateInternal in class AbstractResultjava.sql.SQLException
protected java.sql.Date getDateInternal(java.lang.Object obj,
java.util.Calendar cal,
Joins joins)
throws java.sql.SQLException
getDateInternal in class AbstractResultjava.sql.SQLException
protected double getDoubleInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getDoubleInternal in class AbstractResultjava.sql.SQLException
protected float getFloatInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getFloatInternal in class AbstractResultjava.sql.SQLException
protected int getIntInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getIntInternal in class AbstractResultjava.sql.SQLException
protected java.util.Locale getLocaleInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getLocaleInternal in class AbstractResultjava.sql.SQLException
protected long getLongInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getLongInternal in class AbstractResultjava.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 AbstractResultjava.sql.SQLException
protected java.lang.Object getSQLObjectInternal(java.lang.Object obj,
java.util.Map map,
Joins joins)
throws java.sql.SQLException
getSQLObjectInternal in class AbstractResultjava.sql.SQLException
protected java.sql.Ref getRefInternal(java.lang.Object obj,
java.util.Map map,
Joins joins)
throws java.sql.SQLException
getRefInternal in class AbstractResultjava.sql.SQLException
protected short getShortInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getShortInternal in class AbstractResultjava.sql.SQLException
protected java.lang.String getStringInternal(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
getStringInternal in class AbstractResultjava.sql.SQLException
protected java.sql.Time getTimeInternal(java.lang.Object obj,
java.util.Calendar cal,
Joins joins)
throws java.sql.SQLException
getTimeInternal in class AbstractResultjava.sql.SQLException
protected java.sql.Timestamp getTimestampInternal(java.lang.Object obj,
java.util.Calendar cal,
Joins joins)
throws java.sql.SQLException
getTimestampInternal in class AbstractResultjava.sql.SQLException
public boolean wasNull()
throws java.sql.SQLException
Result
wasNull in interface ResultwasNull in class AbstractResultjava.sql.SQLException
protected java.lang.Object translate(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
AbstractResultget*Internal methods. Return the
original value by default.
translate in class AbstractResultjava.sql.SQLException
protected int findObject(java.lang.Object obj,
Joins joins)
throws java.sql.SQLException
java.sql.SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||