Package org.apache.openjpa.jdbc.sql
Class LogicalUnion.UnionSelect
java.lang.Object
org.apache.openjpa.jdbc.sql.LogicalUnion.UnionSelect
- All Implemented Interfaces:
Select,SelectExecutor
- Enclosing class:
- LogicalUnion
A select that is part of a logical union.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Listprotected intprotected final intprotected final SelectImplFields inherited from interface org.apache.openjpa.jdbc.sql.Select
EAGER_INNER, EAGER_OUTER, EAGER_PARALLEL, FROM_SELECT_ALIAS, SUBS_ANY_JOINABLE, SUBS_EXACT, SUBS_JOINABLE, SUBS_NONE, TYPE_JOINLESS, TYPE_TWO_PART -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidApply class conditions from relation joins.AND the given joins together.voidAppend the given joins to the given buffer.voidClear odering conditions.voidClear the existing column selects.ctx()Return the JPQL query context of this selecteagerClone(FieldMapping key, int eagerType, boolean toMany, int sels) Return a select that will be eagerly executed with this one, or null if the select cannot be created for the given key and join type.execute(JDBCStore store, JDBCFetchConfiguration fetch) Execute this select in the context of the given store manager.execute(JDBCStore store, JDBCFetchConfiguration fetch, int lockLevel) Execute this select in the context of the given store manager.fullClone(int sels) Return a SELECT that is a complete clone of this one.booleanWhether to automatically make results distinct when relational joins would otherwise introduce duplicates.getColumnAlias(String col, Table table) Return the alias for the given column.getColumnAlias(String col, Table table, Joins joins) Return the alias for the given column.getColumnAlias(Column col) Return the alias for the given column.getColumnAlias(Column col, Object alias) Return the alias for the given column, without creating new table aliasgetColumnAlias(Column col, Joins joins) Return the alias for the given column.Return the select configuration.intReturn the number of instances matching this select.Delegate select.getEager(FieldMapping key) Return the eager select for the given key.longThe result end index.get joined table metadatas excluded for polymorphic queriesintThe expected result count for the query.Another select instance that creates a temporary table from which this select pulls data.Return the grouping SQL for this select.booleanReturn the flag to indicate whether this Select has internally generated subselectReturn the HAVING clause, or null if none.Get the aliases for identifier columns that can be used in COUNT selects to find the number of matches.get joined table metadatas for polymorphic queriesReturn the top-levelJoinelements for this select.getJoins()Return the top-level joins for this select.intThe join syntax for this select, as one of the syntax constants fromJoinSyntaxes.Return the ordering SQL for this select.Return the parent of this select, if it is a subselect.Return the aliases of all selected columns and all selected buffers, in the order they were selected.Return the indexes of the data in the select clause this query is ordered by.Return the actualVals andColumns that were selected, in the order that they were selected.getSQL()Get the buffer if it has been computed by a previous call toSelectExecutor.toSelect(boolean, JDBCFetchConfiguration), if any.longThe result start index.Return the subselect path for this select, if it is a subselect.Return this select's subselects, or empty collection if none.Return the set of all used table aliases.get table-per-class metadata for polymorphic queriesgetWhere()Return the WHERE clause, minus any necessary end joins.voidAdd a GROUP BY clause.voidAdd a GROUP BY clause.voidgroupBy(ClassMapping mapping, int subclasses, JDBCStore store, JDBCFetchConfiguration fetch) Group by the columns of the given mapping, possibly including subclasses.voidgroupBy(ClassMapping mapping, int subclasses, JDBCStore store, JDBCFetchConfiguration fetch, Joins joins) Group by the columns of the given mapping, possibly including subclasses.voidGroup by the given column.voidGroup by the given columns.voidGroup by the given columns.voidGroup by the given column.voidAdd a GROUP BY clause.voidAdd a GROUP BY clause.booleanhasEagerJoin(boolean toMany) Whether this select has an eager join of the specified type.booleanhasJoin(boolean toMany) Whether this select has a join of the specified type.booleanAffirm if this receiver requires more than one selects to fetch its data.voidAdd the given having conditions.voidAdd the given having conditions.voidAdd the given having conditions.voidAdd the given having conditions.intindexOf()The index of this select within the UNION, or 0.booleanReturn true if this is an aggregate select.booleanWhether this is a SELECT DISTINCT / UNION ALL.booleanisLob()Return true if this select includes a LOB.booleanisLRS()Whether the result of this select should be treated as a large result set.booleanisSelected(Table table) Return whether the given table is being used in this select.voidExtended trace that logs eager relationsnewJoins()Return a new instance to use for joining.Return a new instance to use for outer joining.OR the given joins together.booleanAdd an ORDER BY clause.booleanAdd an ORDER BY clause.intOrder by the given columns.intOrder by the given columns.booleanOrder by the given column.booleanOrder by the given column.booleanAdd an ORDER BY clause.booleanAdd an ORDER BY clause.intorderByPrimaryKey(ClassMapping mapping, boolean asc, boolean select) Order on the primary key columns of the given mapping, joining to superclasses as necessary to get all columns needed to construct an object id.intorderByPrimaryKey(ClassMapping mapping, boolean asc, Joins joins, boolean select) Select and order on the primary key columns of the given mapping, joining to superclasses as necessary to get all columns needed to construct an object id.Return a join set making the given joins outer joins.protected voidrecordOrder(Object ord, boolean asc) Record that we're ordering by a SQL expression.protected voidrecordOrderColumns(Column[] cols, boolean asc) Record that we're ordering by the given columns.booleanSelect the given SQL; the given id object is an identifier to use when retrieving the corresponding value from aResult.booleanSelect the given SQL; the given id object is an identifier to use when retrieving the corresponding value from aResult.voidselect(ClassMapping mapping, int subclasses, JDBCStore store, JDBCFetchConfiguration fetch, int eager) Select the columns of the given mapping, possibly including subclasses.voidselect(ClassMapping mapping, int subclasses, JDBCStore store, JDBCFetchConfiguration fetch, int eager, Joins joins) Select the columns of the given mapping, possibly including subclasses.booleanSelect the given column.intSelect the given columns.intSelect the given columns.booleanSelect the given column.booleanSelect the given SQL; the given id object is an identifier to use when retrieving the corresponding value from aResult.booleanSelect the given SQL; the given id object is an identifier to use when retrieving the corresponding value from aResult.voidselectIdentifier(ClassMapping mapping, int subclasses, JDBCStore store, JDBCFetchConfiguration fetch, int eager) Select the columns of the given mapping, possibly including subclasses.voidselectIdentifier(ClassMapping mapping, int subclasses, JDBCStore store, JDBCFetchConfiguration fetch, int eager, Joins joins) Select the columns of the given mapping, possibly including subclasses.booleanselectIdentifier(Column col) Select the given column as one that can be used to get a count of distinct matches.intselectIdentifier(Column[] cols) Select the given columns as ones that can be used to get a count of distinct matches.intselectIdentifier(Column[] cols, Joins joins) Select the given columns as ones that can be used to get a count of distinct matches.booleanselectIdentifier(Column col, Joins joins) Select the given column as one that can be used to get a count of distinct matches.voidselectPlaceholder(String sql) Select the given SQL as a placeholder for a UNION element.intselectPrimaryKey(ClassMapping mapping) Select the primary key columns of the given mapping, joining to superclasses as necessary to get all columns needed to construct an object id.intselectPrimaryKey(ClassMapping mapping, Joins joins) Select the primary key columns of the given mapping, joining to superclasses as necessary to get all columns needed to construct an object id.voidsetAggregate(boolean agg) Set to true for aggregate selects.voidsetAutoDistinct(boolean distinct) Whether to automatically make results distinct when relational joins would otherwise introduce duplicates.voidsetContext(Context context) Set JPQL query context for this selectvoidsetDistinct(boolean distinct) Whether this is a SELECT DISTINCT / UNION ALL.voidSet joined table metadatas excluded for polymorphic queriesvoidsetExpectedResultCount(int expectedResultCount, boolean force) The expected result count for the query.voidsetFromSelect(Select sel) Another select instance that creates a temporary table from which this select pulls data.voidsetHasSubselect(boolean hasSub) Set the flag to indicate whether this Select has internally generated subselectvoidsetJoinedTableClassMeta(List meta) Set joined table metadatas for polymorphic queriesvoidsetJoinSyntax(int joinSyntax) The join syntax for this select, as one of the syntax constants fromJoinSyntaxes.voidsetLob(boolean lob) Set to true for selects that include LOB columns.voidsetLRS(boolean lrs) Whether the result of this select should be treated as a large result set.voidTurn this select into a subselect of the given instance.voidsetRange(long start, long end) Set the result range for this select.voidsetSchemaAlias(String schemaAlias) Record the initial schemaAlias of a join pathvoidSet table-per-class metadata for polymorphic queriesbooleanWhether this select can be executed for update.booleansupportsRandomAccess(boolean forUpdate) Return whether this select can support a random access result set type.toSelect(boolean forUpdate, JDBCFetchConfiguration fetch) Return this select as a SQL statement formatted for the current dictionary.Return this select as a COUNT SQL statement formatted for the current dictionary.toString()Implement toString to generate SQL string for profiling/debuggging.voidAdd the given where conditions.voidAdd the given where conditions.voidAdd the given where conditions.voidAdd the given where conditions.voidAdd the given where conditions.whereClone(int sels) Return a SELECT with the same joins and where conditions as this one.voidwhereForeignKey(ForeignKey fk, Object oid, ClassMapping mapping, JDBCStore store) Add where conditions setting the given foreign key to the given oid values.voidwherePrimaryKey(Object oid, ClassMapping mapping, JDBCStore store) Add where conditions setting the mapping's primary key to the given oid values.
-
Field Details
-
sel
-
pos
protected final int pos -
orders
protected int orders -
orderIdxs
-
-
Constructor Details
-
UnionSelect
-
-
Method Details
-
getDelegate
Delegate select. -
getSelectedOrderIndexes
Return the indexes of the data in the select clause this query is ordered by. -
getConfiguration
Description copied from interface:SelectExecutorReturn the select configuration.- Specified by:
getConfigurationin interfaceSelectExecutor
-
indexOf
public int indexOf()Description copied from interface:SelectThe index of this select within the UNION, or 0. -
toSelect
Description copied from interface:SelectExecutorReturn this select as a SQL statement formatted for the current dictionary.- Specified by:
toSelectin interfaceSelectExecutor
-
getSQL
Description copied from interface:SelectExecutorGet the buffer if it has been computed by a previous call toSelectExecutor.toSelect(boolean, JDBCFetchConfiguration), if any.- Specified by:
getSQLin interfaceSelectExecutor
-
toSelectCount
Description copied from interface:SelectExecutorReturn this select as a COUNT SQL statement formatted for the current dictionary.- Specified by:
toSelectCountin interfaceSelectExecutor
-
getAutoDistinct
public boolean getAutoDistinct()Description copied from interface:SelectExecutorWhether to automatically make results distinct when relational joins would otherwise introduce duplicates.- Specified by:
getAutoDistinctin interfaceSelectExecutor
-
setAutoDistinct
public void setAutoDistinct(boolean distinct) Description copied from interface:SelectExecutorWhether to automatically make results distinct when relational joins would otherwise introduce duplicates.- Specified by:
setAutoDistinctin interfaceSelectExecutor
-
isDistinct
public boolean isDistinct()Description copied from interface:SelectExecutorWhether this is a SELECT DISTINCT / UNION ALL.- Specified by:
isDistinctin interfaceSelectExecutor
-
setDistinct
public void setDistinct(boolean distinct) Description copied from interface:SelectExecutorWhether this is a SELECT DISTINCT / UNION ALL.- Specified by:
setDistinctin interfaceSelectExecutor
-
isLRS
public boolean isLRS()Description copied from interface:SelectExecutorWhether the result of this select should be treated as a large result set.- Specified by:
isLRSin interfaceSelectExecutor
-
setLRS
public void setLRS(boolean lrs) Description copied from interface:SelectExecutorWhether the result of this select should be treated as a large result set.- Specified by:
setLRSin interfaceSelectExecutor
-
getJoinSyntax
public int getJoinSyntax()Description copied from interface:SelectExecutorThe join syntax for this select, as one of the syntax constants fromJoinSyntaxes.- Specified by:
getJoinSyntaxin interfaceSelectExecutor
-
setJoinSyntax
public void setJoinSyntax(int joinSyntax) Description copied from interface:SelectExecutorThe join syntax for this select, as one of the syntax constants fromJoinSyntaxes.- Specified by:
setJoinSyntaxin interfaceSelectExecutor
-
supportsRandomAccess
public boolean supportsRandomAccess(boolean forUpdate) Description copied from interface:SelectExecutorReturn whether this select can support a random access result set type.- Specified by:
supportsRandomAccessin interfaceSelectExecutor
-
supportsLocking
public boolean supportsLocking()Description copied from interface:SelectExecutorWhether this select can be executed for update.- Specified by:
supportsLockingin interfaceSelectExecutor
-
hasMultipleSelects
public boolean hasMultipleSelects()Description copied from interface:SelectExecutorAffirm if this receiver requires more than one selects to fetch its data.- Specified by:
hasMultipleSelectsin interfaceSelectExecutor
-
getCount
Description copied from interface:SelectExecutorReturn the number of instances matching this select.- Specified by:
getCountin interfaceSelectExecutor- Throws:
SQLException
-
execute
Description copied from interface:SelectExecutorExecute this select in the context of the given store manager.- Specified by:
executein interfaceSelectExecutor- Throws:
SQLException
-
execute
public Result execute(JDBCStore store, JDBCFetchConfiguration fetch, int lockLevel) throws SQLException Description copied from interface:SelectExecutorExecute this select in the context of the given store manager.- Specified by:
executein interfaceSelectExecutor- Throws:
SQLException
-
getSubselects
Description copied from interface:SelectReturn this select's subselects, or empty collection if none.- Specified by:
getSubselectsin interfaceSelect
-
getParent
Description copied from interface:SelectReturn the parent of this select, if it is a subselect. -
getSubselectPath
Description copied from interface:SelectReturn the subselect path for this select, if it is a subselect.- Specified by:
getSubselectPathin interfaceSelect
-
setParent
Description copied from interface:SelectTurn this select into a subselect of the given instance. -
setHasSubselect
public void setHasSubselect(boolean hasSub) Description copied from interface:SelectSet the flag to indicate whether this Select has internally generated subselect- Specified by:
setHasSubselectin interfaceSelect
-
getHasSubselect
public boolean getHasSubselect()Description copied from interface:SelectReturn the flag to indicate whether this Select has internally generated subselect- Specified by:
getHasSubselectin interfaceSelect
-
getFromSelect
Description copied from interface:SelectAnother select instance that creates a temporary table from which this select pulls data.- Specified by:
getFromSelectin interfaceSelect
-
setFromSelect
Description copied from interface:SelectAnother select instance that creates a temporary table from which this select pulls data.- Specified by:
setFromSelectin interfaceSelect
-
hasEagerJoin
public boolean hasEagerJoin(boolean toMany) Description copied from interface:SelectWhether this select has an eager join of the specified type.- Specified by:
hasEagerJoinin interfaceSelect
-
hasJoin
public boolean hasJoin(boolean toMany) Description copied from interface:SelectWhether this select has a join of the specified type. -
isSelected
Description copied from interface:SelectReturn whether the given table is being used in this select.- Specified by:
isSelectedin interfaceSelect
-
getTableAliases
Description copied from interface:SelectReturn the set of all used table aliases.- Specified by:
getTableAliasesin interfaceSelect
-
getSelects
Description copied from interface:SelectReturn the actualVals andColumns that were selected, in the order that they were selected.- Specified by:
getSelectsin interfaceSelect
-
getSelectAliases
Description copied from interface:SelectReturn the aliases of all selected columns and all selected buffers, in the order they were selected. Each alias may be either a string or aSQLBuffer.- Specified by:
getSelectAliasesin interfaceSelect
-
getIdentifierAliases
Description copied from interface:SelectGet the aliases for identifier columns that can be used in COUNT selects to find the number of matches. Each alias will be a string. If no identifier columns have been nominated, then all column alises are returned.- Specified by:
getIdentifierAliasesin interfaceSelect
-
getOrdering
Description copied from interface:SelectReturn the ordering SQL for this select.- Specified by:
getOrderingin interfaceSelect
-
getGrouping
Description copied from interface:SelectReturn the grouping SQL for this select.- Specified by:
getGroupingin interfaceSelect
-
getWhere
Description copied from interface:SelectReturn the WHERE clause, minus any necessary end joins. -
getHaving
Description copied from interface:SelectReturn the HAVING clause, or null if none. -
addJoinClassConditions
public void addJoinClassConditions()Description copied from interface:SelectApply class conditions from relation joins. This may affect the return values ofSelect.getJoins(),Select.getJoinIterator(), andSelect.getWhere().- Specified by:
addJoinClassConditionsin interfaceSelect
-
getJoins
Description copied from interface:SelectReturn the top-level joins for this select. -
getJoinIterator
Description copied from interface:SelectReturn the top-levelJoinelements for this select.- Specified by:
getJoinIteratorin interfaceSelect
-
getStartIndex
public long getStartIndex()Description copied from interface:SelectThe result start index.- Specified by:
getStartIndexin interfaceSelect
-
getEndIndex
public long getEndIndex()Description copied from interface:SelectThe result end index.- Specified by:
getEndIndexin interfaceSelect
-
setRange
public void setRange(long start, long end) Description copied from interface:SelectSet the result range for this select. -
getColumnAlias
Description copied from interface:SelectReturn the alias for the given column.- Specified by:
getColumnAliasin interfaceSelect
-
getColumnAlias
Description copied from interface:SelectReturn the alias for the given column.- Specified by:
getColumnAliasin interfaceSelect
-
getColumnAlias
Description copied from interface:SelectReturn the alias for the given column, without creating new table alias- Specified by:
getColumnAliasin interfaceSelect
-
getColumnAlias
Description copied from interface:SelectReturn the alias for the given column.- Specified by:
getColumnAliasin interfaceSelect
-
getColumnAlias
Description copied from interface:SelectReturn the alias for the given column.- Specified by:
getColumnAliasin interfaceSelect
-
isAggregate
public boolean isAggregate()Description copied from interface:SelectReturn true if this is an aggregate select.- Specified by:
isAggregatein interfaceSelect
-
setAggregate
public void setAggregate(boolean agg) Description copied from interface:SelectSet to true for aggregate selects.- Specified by:
setAggregatein interfaceSelect
-
isLob
public boolean isLob()Description copied from interface:SelectReturn true if this select includes a LOB. -
setLob
public void setLob(boolean lob) Description copied from interface:SelectSet to true for selects that include LOB columns. -
selectPlaceholder
Description copied from interface:SelectSelect the given SQL as a placeholder for a UNION element.- Specified by:
selectPlaceholderin interfaceSelect
-
clearSelects
public void clearSelects()Description copied from interface:SelectClear the existing column selects.- Specified by:
clearSelectsin interfaceSelect
-
select
Description copied from interface:SelectSelect the given SQL; the given id object is an identifier to use when retrieving the corresponding value from aResult. -
select
Description copied from interface:SelectSelect the given SQL; the given id object is an identifier to use when retrieving the corresponding value from aResult. -
select
Description copied from interface:SelectSelect the given SQL; the given id object is an identifier to use when retrieving the corresponding value from aResult. -
select
Description copied from interface:SelectSelect the given SQL; the given id object is an identifier to use when retrieving the corresponding value from aResult. -
select
Description copied from interface:SelectSelect the given column. -
select
Description copied from interface:SelectSelect the given column. -
select
Description copied from interface:SelectSelect the given columns. -
select
Description copied from interface:SelectSelect the given columns. -
select
public void select(ClassMapping mapping, int subclasses, JDBCStore store, JDBCFetchConfiguration fetch, int eager) Description copied from interface:SelectSelect the columns of the given mapping, possibly including subclasses. This method should be called after all where conditions are added in case the given mapping batches other selects. -
select
public void select(ClassMapping mapping, int subclasses, JDBCStore store, JDBCFetchConfiguration fetch, int eager, Joins joins) Description copied from interface:SelectSelect the columns of the given mapping, possibly including subclasses. This method should be called after all where conditions are added in case the given mapping batches other selects. -
selectIdentifier
Description copied from interface:SelectSelect the given column as one that can be used to get a count of distinct matches. It is not necessary to designate distinct identifiers when eagerly traversing the entire result of the select or when not using an LRSSize setting ofcount.- Specified by:
selectIdentifierin interfaceSelect- Returns:
- true if selected
-
selectIdentifier
Description copied from interface:SelectSelect the given column as one that can be used to get a count of distinct matches. It is not necessary to designate distinct identifiers when eagerly traversing the entire result of the select or when not using an LRSSize setting ofcount.- Specified by:
selectIdentifierin interfaceSelect- Returns:
- true if selected
-
selectIdentifier
Description copied from interface:SelectSelect the given columns as ones that can be used to get a count of distinct matches. It is not necessary to designate distinct identifiers when eagerly traversing the entire result of the select or when not using an LRSSize setting ofcount.- Specified by:
selectIdentifierin interfaceSelect- Returns:
- bit set of indexes of columns that were selected
-
selectIdentifier
Description copied from interface:SelectSelect the given columns as ones that can be used to get a count of distinct matches. It is not necessary to designate distinct identifiers when eagerly traversing the entire result of the select or when not using an LRSSize setting ofcount.- Specified by:
selectIdentifierin interfaceSelect- Returns:
- bit set of indexes of columns that were selected
-
selectIdentifier
public void selectIdentifier(ClassMapping mapping, int subclasses, JDBCStore store, JDBCFetchConfiguration fetch, int eager) Description copied from interface:SelectSelect the columns of the given mapping, possibly including subclasses. This method should be called after all where conditions are added in case the given mapping batches other selects. The primary key columns of the mapping can be used to get a count of distinct matches. It is not necessary to designate distinct identifiers when eagerly traversing the entire result of the select or when not using an LRSSize setting ofcount.- Specified by:
selectIdentifierin interfaceSelect
-
selectIdentifier
public void selectIdentifier(ClassMapping mapping, int subclasses, JDBCStore store, JDBCFetchConfiguration fetch, int eager, Joins joins) Description copied from interface:SelectSelect the columns of the given mapping, possibly including subclasses. This method should be called after all where conditions are added in case the given mapping batches other selects. The primary key columns of the mapping can be used to get a count of distinct matches. It is not necessary to designate distinct identifiers when eagerly traversing the entire result of the select or when not using an LRSSize setting ofcount.- Specified by:
selectIdentifierin interfaceSelect
-
selectPrimaryKey
Description copied from interface:SelectSelect the primary key columns of the given mapping, joining to superclasses as necessary to get all columns needed to construct an object id.- Specified by:
selectPrimaryKeyin interfaceSelect- Returns:
- bit set of indexes of pk columns that were selected
-
selectPrimaryKey
Description copied from interface:SelectSelect the primary key columns of the given mapping, joining to superclasses as necessary to get all columns needed to construct an object id.- Specified by:
selectPrimaryKeyin interfaceSelect- Returns:
- bit set of indexes of pk columns that were selected
-
orderByPrimaryKey
Description copied from interface:SelectOrder on the primary key columns of the given mapping, joining to superclasses as necessary to get all columns needed to construct an object id. Optionally selects ordering data if not already selected.- Specified by:
orderByPrimaryKeyin interfaceSelect
-
orderByPrimaryKey
Description copied from interface:SelectSelect and order on the primary key columns of the given mapping, joining to superclasses as necessary to get all columns needed to construct an object id. Optionally selects ordering data if not already selected.- Specified by:
orderByPrimaryKeyin interfaceSelect
-
recordOrder
Record that we're ordering by a SQL expression. -
recordOrderColumns
Record that we're ordering by the given columns. -
orderBy
Description copied from interface:SelectOrder by the given column. Optionally selects ordering data if not already selected. -
orderBy
Description copied from interface:SelectOrder by the given column. Optionally selects ordering data if not already selected. -
orderBy
Description copied from interface:SelectOrder by the given columns. Optionally selects ordering data if not already selected. -
orderBy
Description copied from interface:SelectOrder by the given columns. Optionally selects ordering data if not already selected. -
orderBy
Description copied from interface:SelectAdd an ORDER BY clause. Optionally selects ordering data if not already selected. -
orderBy
Description copied from interface:SelectAdd an ORDER BY clause. Optionally selects ordering data if not already selected. -
orderBy
Description copied from interface:SelectAdd an ORDER BY clause. Optionally selects ordering data if not already selected. -
orderBy
Description copied from interface:SelectAdd an ORDER BY clause. Optionally selects ordering data if not already selected. -
clearOrdering
public void clearOrdering()Description copied from interface:SelectClear odering conditions.- Specified by:
clearOrderingin interfaceSelect
-
wherePrimaryKey
Description copied from interface:SelectAdd where conditions setting the mapping's primary key to the given oid values. If the given mapping does not use oid values for its primary key, we will recursively join to its superclass until we find an ancestor that does.- Specified by:
wherePrimaryKeyin interfaceSelect
-
whereForeignKey
Description copied from interface:SelectAdd where conditions setting the given foreign key to the given oid values.- Specified by:
whereForeignKeyin interfaceSelect- See Also:
-
where
Description copied from interface:SelectAdd the given where conditions. -
where
Description copied from interface:SelectAdd the given where conditions. -
where
Description copied from interface:SelectAdd the given where conditions. -
where
Description copied from interface:SelectAdd the given where conditions. -
where
Description copied from interface:SelectAdd the given where conditions. -
having
Description copied from interface:SelectAdd the given having conditions. -
having
Description copied from interface:SelectAdd the given having conditions. -
having
Description copied from interface:SelectAdd the given having conditions. -
having
Description copied from interface:SelectAdd the given having conditions. -
groupBy
Description copied from interface:SelectAdd a GROUP BY clause. -
groupBy
Description copied from interface:SelectAdd a GROUP BY clause. -
groupBy
Description copied from interface:SelectAdd a GROUP BY clause. -
groupBy
Description copied from interface:SelectAdd a GROUP BY clause. -
groupBy
Description copied from interface:SelectGroup by the given column. -
groupBy
Description copied from interface:SelectGroup by the given column. -
groupBy
Description copied from interface:SelectGroup by the given columns. -
groupBy
Description copied from interface:SelectGroup by the given columns. -
groupBy
public void groupBy(ClassMapping mapping, int subclasses, JDBCStore store, JDBCFetchConfiguration fetch) Description copied from interface:SelectGroup by the columns of the given mapping, possibly including subclasses. Assumes EAGER_NONE. -
groupBy
public void groupBy(ClassMapping mapping, int subclasses, JDBCStore store, JDBCFetchConfiguration fetch, Joins joins) Description copied from interface:SelectGroup by the columns of the given mapping, possibly including subclasses. Assumes EAGER_NONE. -
whereClone
Description copied from interface:SelectReturn a SELECT with the same joins and where conditions as this one.- Specified by:
whereClonein interfaceSelect- Parameters:
sels- number of selects to UNION together; ignored if <= 1
-
fullClone
Description copied from interface:SelectReturn a SELECT that is a complete clone of this one. -
eagerClone
Description copied from interface:SelectReturn a select that will be eagerly executed with this one, or null if the select cannot be created for the given key and join type. If the join type is inner or outer, then this select instance will be returned. Otherwise, the returned select will have a clone of this select's where conditions and joins but will be independent.- Specified by:
eagerClonein interfaceSelect- Parameters:
key- the key for the eager selecteagerType- one of the EAGER_* constantstoMany- whether the eager join is to-manysels- number of selects to UNION together; ignored if <= 1
-
getEager
Description copied from interface:SelectReturn the eager select for the given key. -
newJoins
Description copied from interface:SelectReturn a new instance to use for joining. -
newOuterJoins
Description copied from interface:SelectReturn a new instance to use for outer joining.- Specified by:
newOuterJoinsin interfaceSelect
-
append
Description copied from interface:SelectAppend the given joins to the given buffer. -
and
Description copied from interface:SelectAND the given joins together. The given joins will be hollowed in the process. -
or
Description copied from interface:SelectOR the given joins together. The common joins will be removed in the process. -
outer
Description copied from interface:SelectReturn a join set making the given joins outer joins. -
toString
Description copied from interface:SelectImplement toString to generate SQL string for profiling/debuggging. -
getExpectedResultCount
public int getExpectedResultCount()Description copied from interface:SelectExecutorThe expected result count for the query.- Specified by:
getExpectedResultCountin interfaceSelectExecutor
-
setExpectedResultCount
public void setExpectedResultCount(int expectedResultCount, boolean force) Description copied from interface:SelectExecutorThe expected result count for the query.- Specified by:
setExpectedResultCountin interfaceSelectExecutorforce- if false, the count will be discarded if this select has any to-many eager joins that would throw off the result count
-
setContext
Description copied from interface:SelectSet JPQL query context for this select- Specified by:
setContextin interfaceSelect
-
ctx
Description copied from interface:SelectReturn the JPQL query context of this select -
setSchemaAlias
Description copied from interface:SelectRecord the initial schemaAlias of a join path- Specified by:
setSchemaAliasin interfaceSelect
-
logEagerRelations
public void logEagerRelations()Description copied from interface:SelectExtended trace that logs eager relations- Specified by:
logEagerRelationsin interfaceSelect
-
setTablePerClassMeta
Description copied from interface:SelectSet table-per-class metadata for polymorphic queries- Specified by:
setTablePerClassMetain interfaceSelect
-
getTablePerClassMeta
Description copied from interface:Selectget table-per-class metadata for polymorphic queries- Specified by:
getTablePerClassMetain interfaceSelect
-
setJoinedTableClassMeta
Description copied from interface:SelectSet joined table metadatas for polymorphic queries- Specified by:
setJoinedTableClassMetain interfaceSelect
-
getJoinedTableClassMeta
Description copied from interface:Selectget joined table metadatas for polymorphic queries- Specified by:
getJoinedTableClassMetain interfaceSelect
-
setExcludedJoinedTableClassMeta
Description copied from interface:SelectSet joined table metadatas excluded for polymorphic queries- Specified by:
setExcludedJoinedTableClassMetain interfaceSelect
-
getExcludedJoinedTableClassMeta
Description copied from interface:Selectget joined table metadatas excluded for polymorphic queries- Specified by:
getExcludedJoinedTableClassMetain interfaceSelect
-
getDictionary
- Specified by:
getDictionaryin interfaceSelect
-