Package org.apache.openjpa.jdbc.sql
Class SelectImpl.SelectResult
java.lang.Object
org.apache.openjpa.jdbc.sql.AbstractResult
org.apache.openjpa.jdbc.sql.ResultSetResult
org.apache.openjpa.jdbc.sql.SelectImpl.SelectResult
- Enclosing class:
- SelectImpl
A
Result implementation wrapped around this select.-
Constructor Summary
ConstructorsConstructorDescriptionSelectResult(Connection conn, Statement stmnt, ResultSet rs, DBDictionary dict) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanabsoluteInternal(int row) Throws an exception by default.protected booleancontainsAllInternal(Object[] objs, Joins joins) Return whether this result contains data for all the given ids or columns.protected booleancontainsInternal(Object obj, Joins joins) Return whether this result contains data for the given id or column.Perform a cross join on the given tables.protected intfindObject(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.Return correlated variable namegetEager(FieldMapping key) The eager result for the given key, or null if none.Select for this result.booleanisDirty()booleanisEmpty()Whether we have any joins.booleanisOuter()Whether this joins path results in outer joins.join(ForeignKey fk, boolean inverse, boolean toMany) Join the columns of the given foreign key.intjoinRelation(String name, ForeignKey fk, ClassMapping target, int subs, boolean inverse, boolean toMany) Join the columns of the given foreign key, which represents a relation via the given field name.org.apache.openjpa.jdbc.sql.JoinSetjoins()load(ClassMapping mapping, JDBCStore store, JDBCFetchConfiguration fetch, Joins joins) Load a pc object using the given store manager.voidMove joins that belong to subquery's parentnewJoins()Returns a no-op joins object by default.protected booleanAdvance this row.voidouterJoin(ForeignKey fk, boolean inverse, boolean toMany) Join the columns of the given foreign key.outerJoinRelation(String name, ForeignKey fk, ClassMapping target, int subs, boolean inverse, boolean toMany) Join the columns of the given foreign key, which represents a relation via the given field name.path()voidpushBack()Push back the last result.voidputEager(FieldMapping key, Object res) The eager result for the given key, or null if none.Set the correlated variable name being traversed into with the next join.setJoinContext(Context ctx) Set subquery context when traversing into the next join is in transition from parent context to subquery.org.apache.openjpa.jdbc.sql.PathJoinssetOuter(boolean outer) voidsetSelect(SelectImpl sel) Select for this result.setSubselect(String alias) Set the subquery alias.setVariable(String var) Set the variable name being traversed into with the next join.Methods inherited from class org.apache.openjpa.jdbc.sql.ResultSetResult
close, getArrayInternal, getAsciiStreamInternal, getBigDecimalInternal, getBigIntegerInternal, getBinaryStreamInternal, getBlobInternal, getBooleanInternal, getByteInternal, getBytesInternal, getCalendarInternal, getCharacterStreamInternal, getCharInternal, getClobInternal, getCloseConnection, getDateInternal, getDateInternal, getDBDictionary, getDoubleInternal, getFloatInternal, getIntInternal, getLOBStreamInternal, getLocalDateInternal, getLocalDateTimeInternal, getLocaleInternal, getLocalTimeInternal, getLongInternal, getNumberInternal, getObjectInternal, getOffsetDateTimeInternal, getOffsetTimeInternal, getRefInternal, getResultSet, getShortInternal, getSQLObjectInternal, getStatement, getStore, getStreamInternal, getStringInternal, getTimeInternal, getTimestampInternal, setCloseConnection, setCloseStatement, setStore, size, supportsRandomAccess, translate, wasNullMethods inherited from class org.apache.openjpa.jdbc.sql.AbstractResult
absolute, checkNull, closeEagerMap, contains, contains, containsAll, containsAll, 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, getEagerMap, getFloat, getFloat, getInt, getInt, getLOBStream, getLocalDate, getLocalDateTime, getLocale, getLocale, getLocalTime, getLong, getLong, getMappedByFieldMapping, getMappedByValue, getNumber, getNumber, getObject, getObject, getOffsetDateTime, getOffsetTime, getRef, getRef, getShort, getShort, getSQLObject, getSQLObject, getString, getString, getTime, getTime, getTimestamp, getTimestamp, indexOf, isLocking, load, next, setBaseMapping, setEagerMap, setIndexOf, setLocking, setMappedByFieldMapping, setMappedByValue, startDataRequest
-
Constructor Details
-
SelectResult
Constructor.
-
-
Method Details
-
getSelect
Select for this result. -
setSelect
Select for this result. -
getEager
Description copied from interface:ResultThe eager result for the given key, or null if none.- Specified by:
getEagerin interfaceResult- Overrides:
getEagerin classAbstractResult
-
putEager
Description copied from interface:ResultThe eager result for the given key, or null if none.- Specified by:
putEagerin interfaceResult- Overrides:
putEagerin classAbstractResult
-
load
public Object load(ClassMapping mapping, JDBCStore store, JDBCFetchConfiguration fetch, Joins joins) throws SQLException Description copied from interface:ResultLoad a pc object using the given store manager.- Specified by:
loadin interfaceResult- Overrides:
loadin classAbstractResult- Throws:
SQLException
-
newJoins
Description copied from class:AbstractResultReturns a no-op joins object by default.- Specified by:
newJoinsin interfaceResult- Overrides:
newJoinsin classAbstractResult
-
containsInternal
Description copied from class:AbstractResultReturn whether this result contains data for the given id or column. The id or column has not beed passed throughAbstractResult.translate(java.lang.Object, org.apache.openjpa.jdbc.sql.Joins).- Overrides:
containsInternalin classResultSetResult
-
containsAllInternal
Description copied from class:AbstractResultReturn whether this result contains data for all the given ids or columns. The ids or columns have not been passed throughAbstractResult.translate(java.lang.Object, org.apache.openjpa.jdbc.sql.Joins). Delegates toAbstractResult.containsInternal(java.lang.Object, org.apache.openjpa.jdbc.sql.Joins)by default.- Overrides:
containsAllInternalin classAbstractResult- Throws:
SQLException
-
pushBack
Description copied from interface:ResultPush back the last result. In other words, just ignore the next call toResult.next(). After the first time this method is called, additional calls before a call toResult.next()orResult.absolute(int)should have no further affect.- Specified by:
pushBackin interfaceResult- Overrides:
pushBackin classAbstractResult- Throws:
SQLException
-
absoluteInternal
Description copied from class:AbstractResultThrows an exception by default.- Overrides:
absoluteInternalin classResultSetResult- Throws:
SQLException
-
nextInternal
Description copied from class:AbstractResultAdvance this row.- Overrides:
nextInternalin classResultSetResult- Throws:
SQLException
-
findObject
Description copied from class:ResultSetResultReturn 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.- Overrides:
findObjectin classResultSetResult- Throws:
SQLException
-
isOuter
public boolean isOuter()Description copied from interface:JoinsWhether this joins path results in outer joins. -
setOuter
public org.apache.openjpa.jdbc.sql.PathJoins setOuter(boolean outer) -
isDirty
public boolean isDirty() -
path
-
getPathStr
-
joins
public org.apache.openjpa.jdbc.sql.JoinSet joins() -
joinCount
public int joinCount() -
nullJoins
public void nullJoins() -
isEmpty
public boolean isEmpty()Description copied from interface:JoinsWhether we have any joins. -
crossJoin
Description copied from interface:JoinsPerform a cross join on the given tables. -
join
Description copied from interface:JoinsJoin the columns of the given foreign key. -
outerJoin
Description copied from interface:JoinsJoin the columns of the given foreign key. -
joinRelation
public Joins joinRelation(String name, ForeignKey fk, ClassMapping target, int subs, boolean inverse, boolean toMany) Description copied from interface:JoinsJoin the columns of the given foreign key, which represents a relation via the given field name.- Specified by:
joinRelationin interfaceJoins
-
outerJoinRelation
public Joins outerJoinRelation(String name, ForeignKey fk, ClassMapping target, int subs, boolean inverse, boolean toMany) Description copied from interface:JoinsJoin the columns of the given foreign key, which represents a relation via the given field name.- Specified by:
outerJoinRelationin interfaceJoins
-
setVariable
Description copied from interface:JoinsSet the variable name being traversed into with the next join.- Specified by:
setVariablein interfaceJoins
-
setSubselect
Description copied from interface:JoinsSet the subquery alias.- Specified by:
setSubselectin interfaceJoins
-
setJoinContext
Description copied from interface:JoinsSet subquery context when traversing into the next join is in transition from parent context to subquery.- Specified by:
setJoinContextin interfaceJoins
-
moveJoinsToParent
public void moveJoinsToParent()Description copied from interface:JoinsMove joins that belong to subquery's parent- Specified by:
moveJoinsToParentin interfaceJoins
-