public interface Result extends Closeable
ResultSet, so you
can expect like-named methods to have similar semantics. However, the
interface has been distilled and simplified, so a result object could
easily mask information sources other than a result set.
For more flexible customization of data loading, see the
PCResultObjectProvider.ResultSetResult| Modifier and Type | Method and Description |
|---|---|
boolean |
absolute(int row)
Move to the given 0-based row in the result, or
return false if the row does not exist.
|
void |
close()
Free the resources used by this result; do not
close the SQL connection.
|
boolean |
contains(Column col,
Joins joins)
Return true if the given column is available in the result.
|
boolean |
contains(Object obj)
Return true if the given id or column is available in the result.
|
boolean |
containsAll(Column[] cols,
Joins joins)
Return true if all the given columns are available in the result.
|
boolean |
containsAll(Object[] objs)
Return true if all the given ids or columns are available in the result.
|
void |
endDataRequest()
Ends a data request.
|
Array |
getArray(Column col,
Joins joins)
Return the value stored in the given column; may not be supported
by results that are not backed by a SQL result set.
|
Array |
getArray(Object obj)
Return the value stored in the given column or id; may not be supported
by results that are not backed by a SQL result set.
|
InputStream |
getAsciiStream(Column col,
Joins joins)
Return the value stored in the given column; may not be supported
by results that are not backed by a SQL result set.
|
InputStream |
getAsciiStream(Object obj)
Return the value stored in the given column or id; may not be supported
by results that are not backed by a SQL result set.
|
ClassMapping |
getBaseMapping()
If this is the result of a UNION used to select a hierarchy of
mappings, the base mapping represented by the current row.
|
BigDecimal |
getBigDecimal(Column col,
Joins joins)
Return the value stored in the given column.
|
BigDecimal |
getBigDecimal(Object obj)
Return the value stored in the given column or id.
|
BigInteger |
getBigInteger(Column col,
Joins joins)
Return the value stored in the given column.
|
BigInteger |
getBigInteger(Object obj)
Return the value stored in the given column or id.
|
InputStream |
getBinaryStream(Column col,
Joins joins)
Return the value stored in the given column; may not be supported
by results that are not backed by a SQL result set.
|
InputStream |
getBinaryStream(Object obj)
Return the value stored in the given column or id; may not be supported
by results that are not backed by a SQL result set.
|
Blob |
getBlob(Column col,
Joins joins)
Return the value stored in the given column; may not be supported
by results that are not backed by a SQL result set.
|
Blob |
getBlob(Object obj)
Return the value stored in the given column or id; may not be supported
by results that are not backed by a SQL result set.
|
boolean |
getBoolean(Column col,
Joins joins)
Return the value stored in the given column.
|
boolean |
getBoolean(Object obj)
Return the value stored in the given column or id.
|
byte |
getByte(Column col,
Joins joins)
Return the value stored in the given column.
|
byte |
getByte(Object obj)
Return the value stored in the given column or id.
|
byte[] |
getBytes(Column col,
Joins joins)
Return the value stored in the given column; may not be supported
by results that are not backed by a SQL result set.
|
byte[] |
getBytes(Object obj)
Return the value stored in the given column or id; may not be supported
by results that are not backed by a SQL result set.
|
Calendar |
getCalendar(Column col,
Joins joins)
Return the value stored in the given column.
|
Calendar |
getCalendar(Object obj)
Return the value stored in the given column or id.
|
char |
getChar(Column col,
Joins joins)
Return the value stored in the given column.
|
char |
getChar(Object obj)
Return the value stored in the given column or id.
|
Reader |
getCharacterStream(Column col,
Joins joins)
Return the value stored in the given column; may not be supported
by results that are not backed by a SQL result set.
|
Reader |
getCharacterStream(Object obj)
Return the value stored in the given column or id; may not be supported
by results that are not backed by a SQL result set.
|
Clob |
getClob(Column col,
Joins joins)
Return the value stored in the given column; may not be supported
by results that are not backed by a SQL result set.
|
Clob |
getClob(Object obj)
Return the value stored in the given column or id; may not be supported
by results that are not backed by a SQL result set.
|
Date |
getDate(Column col,
Calendar cal,
Joins joins)
Return the value stored in the given column; may not be supported
by results that are not backed by a SQL result set.
|
Date |
getDate(Column col,
Joins joins)
Return the value stored in the given column.
|
Date |
getDate(Object obj)
Return the value stored in the given column or id.
|
Date |
getDate(Object obj,
Calendar cal)
Return the value stored in the given column or id; may not be supported
by results that are not backed by a SQL result set.
|
double |
getDouble(Column col,
Joins joins)
Return the value stored in the given column.
|
double |
getDouble(Object obj)
Return the value stored in the given column or id.
|
Object |
getEager(FieldMapping key)
The eager result for the given key, or null if none.
|
float |
getFloat(Column col,
Joins joins)
Return the value stored in the given column.
|
float |
getFloat(Object obj)
Return the value stored in the given column or id.
|
int |
getInt(Column col,
Joins joins)
Return the value stored in the given column.
|
int |
getInt(Object obj)
Return the value stored in the given column or id.
|
InputStream |
getLOBStream(JDBCStore store,
Object obj) |
LocalDate |
getLocalDate(Object obj)
Return the value stored in the given column or id.
|
LocalDateTime |
getLocalDateTime(Object obj)
Return the value stored in the given column or id.
|
Locale |
getLocale(Column col,
Joins joins)
Return the value stored in the given column.
|
Locale |
getLocale(Object obj)
Return the value stored in the given column or id.
|
LocalTime |
getLocalTime(Object obj)
Return the value stored in the given column or id.
|
long |
getLong(Column col,
Joins joins)
Return the value stored in the given column.
|
long |
getLong(Object obj)
Return the value stored in the given column or id.
|
FieldMapping |
getMappedByFieldMapping()
If this is the result used to select a toMany relationship,
the mappedByFieldMapping is field mapping representing
the inverse relationship.
|
Object |
getMappedByValue()
If this is the result used to select a toMany relationship,
the mappedByValue is value of the owner of the toMany relationship.
|
Number |
getNumber(Column col,
Joins joins)
Return the value stored in the given column.
|
Number |
getNumber(Object obj)
Return the value stored in the given column or id.
|
Object |
getObject(Column col,
Object arg,
Joins joins)
Return the value stored in the given column.
|
Object |
getObject(Object obj,
int metaType,
Object arg)
Return the value stored in the given column or id.
|
OffsetDateTime |
getOffsetDateTime(Object obj)
Return the value stored in the given column or id.
|
OffsetTime |
getOffsetTime(Object obj)
Return the value stored in the given column or id.
|
Ref |
getRef(Column col,
Map map,
Joins joins)
Return the value stored in the given column; may not be supported
by results that are not backed by a SQL result set.
|
Ref |
getRef(Object obj,
Map map)
Return the value stored in the given column or id; may not be supported
by results that are not backed by a SQL result set.
|
short |
getShort(Column col,
Joins joins)
Return the value stored in the given column.
|
short |
getShort(Object obj)
Return the value stored in the given column or id.
|
Object |
getSQLObject(Column col,
Map map,
Joins joins)
Return the value stored in the given column; may not be supported
by results that are not backed by a SQL result set.
|
Object |
getSQLObject(Object obj,
Map map)
Return the value stored in the given column or id; may not be supported
by results that are not backed by a SQL result set.
|
String |
getString(Column col,
Joins joins)
Return the value stored in the given column.
|
String |
getString(Object obj)
Return the value stored in the given column or id.
|
Time |
getTime(Column col,
Calendar cal,
Joins joins)
Return the value stored in the given column; may not be supported
by results that are not backed by a SQL result set.
|
Time |
getTime(Object obj,
Calendar cal)
Return the value stored in the given column or id; may not be supported
by results that are not backed by a SQL result set.
|
Timestamp |
getTimestamp(Column col,
Calendar cal,
Joins joins)
Return the value stored in the given column; may not be supported
by results that are not backed by a SQL result set.
|
Timestamp |
getTimestamp(Object obj,
Calendar cal)
Return the value stored in the given column or id; may not be supported
by results that are not backed by a SQL result set.
|
int |
indexOf()
The index of the select within the UNION that the current row
corresponds to, or 0.
|
boolean |
isLocking()
If true, then any results loaded from this Result
will be locked in the database.
|
Object |
load(ClassMapping mapping,
JDBCStore store,
JDBCFetchConfiguration fetch)
Load a pc object using the given store manager.
|
Object |
load(ClassMapping mapping,
JDBCStore store,
JDBCFetchConfiguration fetch,
Joins joins)
Load a pc object using the given store manager.
|
Joins |
newJoins()
Return a new joins instance to use for traversing to related data.
|
boolean |
next()
Advance to the next row, or return false if there are no more rows
in the result.
|
void |
pushBack()
Push back the last result.
|
void |
putEager(FieldMapping key,
Object res)
The eager result for the given key, or null if none.
|
void |
setBaseMapping(ClassMapping mapping)
If this is the result of a UNION used to select a hierarchy of
mappings, the base mapping represented by the current row.
|
void |
setLocking(boolean locking)
Set to true if row locking has been issued for the row.
|
void |
setMappedByFieldMapping(FieldMapping fieldMapping)
If this is the result used to select a toMany relationship,
the mappedByFieldMapping is field mapping representing
the inverse relationship.
|
void |
setMappedByValue(Object mappedByValue)
If this is the result used to select a toMany relationship,
the mappedByValue is value of the owner of the toMany relationship.
|
int |
size()
Return the number of rows in this result.
|
void |
startDataRequest(Object mapping)
Informs this receiver about the application element for which a
subsequent data request will be made.
|
boolean |
supportsRandomAccess()
Return true if the result supports random access.
|
boolean |
wasNull()
Return true if the last value fetched was null.
|
Object getEager(FieldMapping key)
void putEager(FieldMapping key, Object res)
Joins newJoins()
void close()
void setLocking(boolean locking)
boolean isLocking()
boolean supportsRandomAccess()
throws SQLException
SQLExceptionboolean absolute(int row)
throws SQLException
SQLExceptionboolean next()
throws SQLException
SQLExceptionvoid pushBack()
throws SQLException
next(). After the first time this method is called,
additional calls before a call to next() or absolute(int)
should have no further affect.SQLExceptionint size() throws SQLException
SQLExceptionboolean contains(Object obj) throws SQLException
SQLExceptionboolean containsAll(Object[] objs) throws SQLException
SQLExceptionboolean contains(Column col, Joins joins) throws SQLException
SQLExceptionboolean containsAll(Column[] cols, Joins joins) throws SQLException
SQLExceptionClassMapping getBaseMapping()
void setBaseMapping(ClassMapping mapping)
FieldMapping getMappedByFieldMapping()
void setMappedByFieldMapping(FieldMapping fieldMapping)
Object getMappedByValue()
void setMappedByValue(Object mappedByValue)
int indexOf()
Object load(ClassMapping mapping, JDBCStore store, JDBCFetchConfiguration fetch) throws SQLException
SQLExceptionObject load(ClassMapping mapping, JDBCStore store, JDBCFetchConfiguration fetch, Joins joins) throws SQLException
SQLExceptionArray getArray(Object obj) throws SQLException
SQLExceptionInputStream getAsciiStream(Object obj) throws SQLException
SQLExceptionBigDecimal getBigDecimal(Object obj) throws SQLException
SQLExceptionBigInteger getBigInteger(Object obj) throws SQLException
SQLExceptionInputStream getBinaryStream(Object obj) throws SQLException
SQLExceptionInputStream getLOBStream(JDBCStore store, Object obj) throws SQLException
SQLExceptionBlob getBlob(Object obj) throws SQLException
SQLExceptionboolean getBoolean(Object obj) throws SQLException
SQLExceptionbyte getByte(Object obj) throws SQLException
SQLExceptionbyte[] getBytes(Object obj) throws SQLException
SQLExceptionCalendar getCalendar(Object obj) throws SQLException
SQLExceptionLocalDate getLocalDate(Object obj) throws SQLException
SQLExceptionLocalTime getLocalTime(Object obj) throws SQLException
SQLExceptionLocalDateTime getLocalDateTime(Object obj) throws SQLException
SQLExceptionOffsetTime getOffsetTime(Object obj) throws SQLException
SQLExceptionOffsetDateTime getOffsetDateTime(Object obj) throws SQLException
SQLExceptionchar getChar(Object obj) throws SQLException
SQLExceptionReader getCharacterStream(Object obj) throws SQLException
SQLExceptionClob getClob(Object obj) throws SQLException
SQLExceptionDate getDate(Object obj) throws SQLException
SQLExceptionDate getDate(Object obj, Calendar cal) throws SQLException
SQLExceptiondouble getDouble(Object obj) throws SQLException
SQLExceptionfloat getFloat(Object obj) throws SQLException
SQLExceptionint getInt(Object obj) throws SQLException
SQLExceptionLocale getLocale(Object obj) throws SQLException
SQLExceptionlong getLong(Object obj) throws SQLException
SQLExceptionNumber getNumber(Object obj) throws SQLException
SQLExceptionObject getObject(Object obj, int metaType, Object arg) throws SQLException
obj - the column or id whose data to fetchmetaType - the type code from
JavaTypes or JavaSQLTypes for the
type of the data; if obj is a column, you may specify -1
to use the column's recorded java typearg - some JDBC data access methods use an argument, such
as a Calendar or MapSQLExceptionObject getSQLObject(Object obj, Map map) throws SQLException
SQLExceptionRef getRef(Object obj, Map map) throws SQLException
SQLExceptionshort getShort(Object obj) throws SQLException
SQLExceptionString getString(Object obj) throws SQLException
SQLExceptionTime getTime(Object obj, Calendar cal) throws SQLException
SQLExceptionTimestamp getTimestamp(Object obj, Calendar cal) throws SQLException
SQLExceptionArray getArray(Column col, Joins joins) throws SQLException
SQLExceptionInputStream getAsciiStream(Column col, Joins joins) throws SQLException
SQLExceptionBigDecimal getBigDecimal(Column col, Joins joins) throws SQLException
SQLExceptionBigInteger getBigInteger(Column col, Joins joins) throws SQLException
SQLExceptionInputStream getBinaryStream(Column col, Joins joins) throws SQLException
SQLExceptionBlob getBlob(Column col, Joins joins) throws SQLException
SQLExceptionboolean getBoolean(Column col, Joins joins) throws SQLException
SQLExceptionbyte getByte(Column col, Joins joins) throws SQLException
SQLExceptionbyte[] getBytes(Column col, Joins joins) throws SQLException
SQLExceptionCalendar getCalendar(Column col, Joins joins) throws SQLException
SQLExceptionchar getChar(Column col, Joins joins) throws SQLException
SQLExceptionReader getCharacterStream(Column col, Joins joins) throws SQLException
SQLExceptionClob getClob(Column col, Joins joins) throws SQLException
SQLExceptionDate getDate(Column col, Joins joins) throws SQLException
SQLExceptionDate getDate(Column col, Calendar cal, Joins joins) throws SQLException
SQLExceptiondouble getDouble(Column col, Joins joins) throws SQLException
SQLExceptionfloat getFloat(Column col, Joins joins) throws SQLException
SQLExceptionint getInt(Column col, Joins joins) throws SQLException
SQLExceptionLocale getLocale(Column col, Joins joins) throws SQLException
SQLExceptionlong getLong(Column col, Joins joins) throws SQLException
SQLExceptionNumber getNumber(Column col, Joins joins) throws SQLException
SQLExceptionObject getObject(Column col, Object arg, Joins joins) throws SQLException
col - the column whose data to fetcharg - some JDBC data access methods use an argument, such
as a Calendar or MapSQLExceptionObject getSQLObject(Column col, Map map, Joins joins) throws SQLException
SQLExceptionRef getRef(Column col, Map map, Joins joins) throws SQLException
SQLExceptionshort getShort(Column col, Joins joins) throws SQLException
SQLExceptionString getString(Column col, Joins joins) throws SQLException
SQLExceptionTime getTime(Column col, Calendar cal, Joins joins) throws SQLException
SQLExceptionTimestamp getTimestamp(Column col, Calendar cal, Joins joins) throws SQLException
SQLExceptionboolean wasNull()
throws SQLException
SQLExceptionvoid startDataRequest(Object mapping)
void endDataRequest()
startDataRequest(java.lang.Object). The calls can be nested as follws startDataRequest (relation); startDataRequest (relationsField);
getObject("COLUMN_Y"); endDataRequest (); endDataRequest ();
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.