X
- The concrete builder typeFromBaseBuilder<X>
, FromProvider
BaseCriteriaBuilder<T,X>
, BaseCTECriteriaBuilder<X>
, BaseInsertCriteriaBuilder<T,X>
, BaseQueryBuilder<T,X>
, BaseSubqueryBuilder<X>
, CorrelationQueryBuilder<X>
, CriteriaBuilder<T>
, FullQueryBuilder<T,X>
, FullSelectCTECriteriaBuilder<X>
, InsertCriteriaBuilder<T>
, LeafOngoingSetOperationCriteriaBuilder<X>
, LeafOngoingSetOperationCTECriteriaBuilder<X>
, LeafOngoingSetOperationSubqueryBuilder<X>
, OngoingSetOperationCriteriaBuilder<T,Y>
, OngoingSetOperationCTECriteriaBuilder<T,Y>
, OngoingSetOperationSubqueryBuilder<T,Y>
, PaginatedCriteriaBuilder<T>
, QueryBuilder<T,X>
, ReturningInsertCriteriaBuilder<T,X>
, SelectBaseCTECriteriaBuilder<X>
, SelectCTECriteriaBuilder<X>
, SelectRecursiveCTECriteriaBuilder<X>
, StartOngoingSetOperationCriteriaBuilder<X,Y>
, StartOngoingSetOperationCTECriteriaBuilder<X,Y>
, StartOngoingSetOperationSubqueryBuilder<X,Y>
, SubqueryBuilder<T>
public interface FromBuilder<X extends FromBuilder<X>> extends FromBaseBuilder<X>, FromProvider
Modifier and Type | Method | Description |
---|---|---|
X |
from(Class<?> entityClass) |
Like
FromBaseBuilder.from(Class, String) with the
alias equivalent to the camel cased result of what Class.getSimpleName() of the entity class returns. |
X |
from(Class<?> entityClass,
String alias) |
Sets the entity class on which the query should be based on with the given alias.
|
X |
from(javax.persistence.metamodel.EntityType<?> entityType) |
Like
FromBaseBuilder.from(EntityType, String) with the
alias equivalent to the camel cased result of what EntityType.getName() of the entity class returns. |
X |
from(javax.persistence.metamodel.EntityType<?> entityType,
String alias) |
Sets the entity class on which the query should be based on with the given alias.
|
X |
fromIdentifiableValues(Class<?> valueClass,
String alias,
int valueCount) |
Add a VALUES clause for values of the given value class to the from clause.
|
X |
fromIdentifiableValues(Class<?> valueClass,
String identifierAttribute,
String alias,
int valueCount) |
Add a VALUES clause for values of the given value class to the from clause.
|
<T> X |
fromIdentifiableValues(Class<T> valueClass,
String identifierAttribute,
String alias,
Collection<T> values) |
Like
FromBaseBuilder.fromIdentifiableValues(Class, String, String, int) but passes the collection size
as valueCount and directly binds the collection as parameter via ParameterHolder.setParameter(String, Object) . |
<T> X |
fromIdentifiableValues(Class<T> valueClass,
String alias,
Collection<T> values) |
Like
FromBaseBuilder.fromIdentifiableValues(Class, String, int) but passes the collection size
as valueCount and directly binds the collection as parameter via ParameterHolder.setParameter(String, Object) . |
X |
fromNew(Class<?> entityClass) |
Like
FromBaseBuilder.from(Class) but explicitly queries the data after any side effects happen because of CTEs. |
X |
fromNew(Class<?> entityClass,
String alias) |
Like
FromBaseBuilder.from(Class, String) but explicitly queries the data after any side effects happen because of CTEs. |
X |
fromOld(Class<?> entityClass) |
Like
FromBaseBuilder.from(Class) but explicitly queries the data before any side effects happen because of CTEs. |
X |
fromOld(Class<?> entityClass,
String alias) |
Like
FromBaseBuilder.from(Class, String) but explicitly queries the data before any side effects happen because of CTEs. |
X |
fromValues(Class<?> valueClass,
String alias,
int valueCount) |
Add a VALUES clause for values of the given value class to the from clause.
|
X |
fromValues(Class<?> entityBaseClass,
String attributeName,
String alias,
int valueCount) |
Add a VALUES clause for values of the type as determined by the given entity attribute to the from clause.
|
X |
fromValues(Class<?> entityBaseClass,
String attributeName,
String alias,
Collection<?> values) |
Like
FromBaseBuilder.fromValues(Class, String, String, int) but passes the collection size
as valueCount and directly binds the collection as parameter via ParameterHolder.setParameter(String, Object) . |
<T> X |
fromValues(Class<T> valueClass,
String alias,
Collection<T> values) |
Like
FromBaseBuilder.fromValues(Class, String, int) but passes the collection size
as valueCount and directly binds the collection as parameter via ParameterHolder.setParameter(String, Object) . |
From |
getFrom(String alias) |
Returns the from element for the given alias or null.
|
From |
getFromByPath(String path) |
Returns the from element for the given path, creating it if necessary.
|
Path |
getPath(String path) |
Returns the path object for the given path string, creating it if necessary.
|
Set<From> |
getRoots() |
Returns the query roots.
|
X |
innerJoin(String path,
String alias) |
|
X |
innerJoinDefault(String path,
String alias) |
|
JoinOnBuilder<X> |
innerJoinDefaultOn(String path,
String alias) |
|
JoinOnBuilder<X> |
innerJoinOn(Class<?> entityClass,
String alias) |
|
JoinOnBuilder<X> |
innerJoinOn(String base,
Class<?> entityClass,
String alias) |
|
JoinOnBuilder<X> |
innerJoinOn(String path,
String alias) |
|
JoinOnBuilder<X> |
innerJoinOn(String base,
javax.persistence.metamodel.EntityType<?> entityType,
String alias) |
|
JoinOnBuilder<X> |
innerJoinOn(javax.persistence.metamodel.EntityType<?> entityType,
String alias) |
|
X |
join(String path,
String alias,
JoinType type) |
Adds a join to the query, possibly specializing implicit joins, and giving the joined element an alias.
|
X |
joinDefault(String path,
String alias,
JoinType type) |
Adds a join to the query, possibly specializing implicit joins, and giving the joined element an alias.
|
JoinOnBuilder<X> |
joinDefaultOn(String path,
String alias,
JoinType type) |
Adds a join with an on-clause to the query, possibly specializing implicit joins, and giving the joined element an alias.
|
JoinOnBuilder<X> |
joinOn(Class<?> entityClass,
String alias,
JoinType type) |
Like
joinOn(java.lang.String, java.lang.Class, java.lang.String, com.blazebit.persistence.JoinType) but with
the query root assumed as base. |
JoinOnBuilder<X> |
joinOn(String base,
Class<?> entityClass,
String alias,
JoinType type) |
Adds an entity join with an on-clause to the query and giving the joined element an alias.
|
JoinOnBuilder<X> |
joinOn(String path,
String alias,
JoinType type) |
Adds a join with an on-clause to the query, possibly specializing implicit joins, and giving the joined element an alias.
|
JoinOnBuilder<X> |
joinOn(String base,
javax.persistence.metamodel.EntityType<?> entityType,
String alias,
JoinType type) |
Adds an entity join with an on-clause to the query and giving the joined element an alias.
|
JoinOnBuilder<X> |
joinOn(javax.persistence.metamodel.EntityType<?> entityType,
String alias,
JoinType type) |
Like
joinOn(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType) but with
the query root assumed as base. |
X |
leftJoin(String path,
String alias) |
|
X |
leftJoinDefault(String path,
String alias) |
|
JoinOnBuilder<X> |
leftJoinDefaultOn(String path,
String alias) |
|
JoinOnBuilder<X> |
leftJoinOn(Class<?> entityClass,
String alias) |
|
JoinOnBuilder<X> |
leftJoinOn(String base,
Class<?> entityClass,
String alias) |
|
JoinOnBuilder<X> |
leftJoinOn(String path,
String alias) |
|
JoinOnBuilder<X> |
leftJoinOn(String base,
javax.persistence.metamodel.EntityType<?> entityType,
String alias) |
|
JoinOnBuilder<X> |
leftJoinOn(javax.persistence.metamodel.EntityType<?> entityType,
String alias) |
|
X |
rightJoin(String path,
String alias) |
|
X |
rightJoinDefault(String path,
String alias) |
|
JoinOnBuilder<X> |
rightJoinDefaultOn(String path,
String alias) |
|
JoinOnBuilder<X> |
rightJoinOn(Class<?> entityClass,
String alias) |
|
JoinOnBuilder<X> |
rightJoinOn(String base,
Class<?> entityClass,
String alias) |
|
JoinOnBuilder<X> |
rightJoinOn(String path,
String alias) |
|
JoinOnBuilder<X> |
rightJoinOn(String base,
javax.persistence.metamodel.EntityType<?> entityType,
String alias) |
|
JoinOnBuilder<X> |
rightJoinOn(javax.persistence.metamodel.EntityType<?> entityType,
String alias) |
Set<From> getRoots()
getRoots
in interface FromProvider
From getFrom(String alias)
getFrom
in interface FromProvider
alias
- The alias of the from elementFrom getFromByPath(String path)
getFromByPath
in interface FromProvider
path
- The path to the from elementPath getPath(String path)
getPath
in interface FromProvider
path
- The path stringX from(Class<?> entityClass)
FromBaseBuilder
FromBaseBuilder.from(Class, String)
with the
alias equivalent to the camel cased result of what Class.getSimpleName()
of the entity class returns.from
in interface FromBaseBuilder<X extends FromBuilder<X>>
entityClass
- The entity class which should be queriedX from(Class<?> entityClass, String alias)
FromBaseBuilder
from
in interface FromBaseBuilder<X extends FromBuilder<X>>
entityClass
- The entity class which should be queriedalias
- The alias for the entityX from(javax.persistence.metamodel.EntityType<?> entityType)
FromBaseBuilder
FromBaseBuilder.from(EntityType, String)
with the
alias equivalent to the camel cased result of what EntityType.getName()
of the entity class returns.from
in interface FromBaseBuilder<X extends FromBuilder<X>>
entityType
- The entity type which should be queriedX from(javax.persistence.metamodel.EntityType<?> entityType, String alias)
FromBaseBuilder
from
in interface FromBaseBuilder<X extends FromBuilder<X>>
entityType
- The entity type which should be queriedalias
- The alias for the entityX fromOld(Class<?> entityClass)
FromBaseBuilder
FromBaseBuilder.from(Class)
but explicitly queries the data before any side effects happen because of CTEs.fromOld
in interface FromBaseBuilder<X extends FromBuilder<X>>
entityClass
- The entity class which should be queriedX fromOld(Class<?> entityClass, String alias)
FromBaseBuilder
FromBaseBuilder.from(Class, String)
but explicitly queries the data before any side effects happen because of CTEs.fromOld
in interface FromBaseBuilder<X extends FromBuilder<X>>
entityClass
- The entity class which should be queriedalias
- The alias for the entityX fromNew(Class<?> entityClass)
FromBaseBuilder
FromBaseBuilder.from(Class)
but explicitly queries the data after any side effects happen because of CTEs.fromNew
in interface FromBaseBuilder<X extends FromBuilder<X>>
entityClass
- The entity class which should be queriedX fromNew(Class<?> entityClass, String alias)
FromBaseBuilder
FromBaseBuilder.from(Class, String)
but explicitly queries the data after any side effects happen because of CTEs.fromNew
in interface FromBaseBuilder<X extends FromBuilder<X>>
entityClass
- The entity class which should be queriedalias
- The alias for the entityX fromValues(Class<?> valueClass, String alias, int valueCount)
FromBaseBuilder
ParameterHolder.setParameter(String, Object)
or Query.setParameter(String, Object)
with the alias and a collection.fromValues
in interface FromBaseBuilder<X extends FromBuilder<X>>
valueClass
- The class of the basic or managed type for which to create a VALUES clausealias
- The alias for the entityvalueCount
- The number of values to use for the values clauseX fromValues(Class<?> entityBaseClass, String attributeName, String alias, int valueCount)
FromBaseBuilder
ParameterHolder.setParameter(String, Object)
or Query.setParameter(String, Object)
with the alias and a collection.fromValues
in interface FromBaseBuilder<X extends FromBuilder<X>>
entityBaseClass
- The entity class on which the attribute is locatedattributeName
- The attribute name within the entity class which to use for determining the values typealias
- The alias for the entityvalueCount
- The number of values to use for the values clauseX fromIdentifiableValues(Class<?> valueClass, String alias, int valueCount)
FromBaseBuilder
FromBaseBuilder.fromValues(Class, String, int)
this will only bind the id attribute.
To set the values invoke ParameterHolder.setParameter(String, Object)
or Query.setParameter(String, Object)
with the alias and a collection.fromIdentifiableValues
in interface FromBaseBuilder<X extends FromBuilder<X>>
valueClass
- The class of the identifiable type for which to create a VALUES clausealias
- The alias for the entityvalueCount
- The number of values to use for the values clauseX fromIdentifiableValues(Class<?> valueClass, String identifierAttribute, String alias, int valueCount)
FromBaseBuilder
FromBaseBuilder.fromValues(Class, String, int)
this will only bind the identifier attribute.
To set the values invoke ParameterHolder.setParameter(String, Object)
or Query.setParameter(String, Object)
with the alias and a collection.fromIdentifiableValues
in interface FromBaseBuilder<X extends FromBuilder<X>>
valueClass
- The class of the identifiable type for which to create a VALUES clauseidentifierAttribute
- The attribute of the entity type to consider as identifier attributealias
- The alias for the entityvalueCount
- The number of values to use for the values clause<T> X fromValues(Class<T> valueClass, String alias, Collection<T> values)
FromBaseBuilder
FromBaseBuilder.fromValues(Class, String, int)
but passes the collection size
as valueCount and directly binds the collection as parameter via ParameterHolder.setParameter(String, Object)
.fromValues
in interface FromBaseBuilder<X extends FromBuilder<X>>
T
- The type of the valuesvalueClass
- The class of the basic or managed type for which to create a VALUES clausealias
- The alias for the entityvalues
- The values to use for the values clauseX fromValues(Class<?> entityBaseClass, String attributeName, String alias, Collection<?> values)
FromBaseBuilder
FromBaseBuilder.fromValues(Class, String, String, int)
but passes the collection size
as valueCount and directly binds the collection as parameter via ParameterHolder.setParameter(String, Object)
.fromValues
in interface FromBaseBuilder<X extends FromBuilder<X>>
entityBaseClass
- The entity class on which the attribute is locatedattributeName
- The attribute name within the entity class which to use for determining the values typealias
- The alias for the entityvalues
- The values to use for the values clause<T> X fromIdentifiableValues(Class<T> valueClass, String alias, Collection<T> values)
FromBaseBuilder
FromBaseBuilder.fromIdentifiableValues(Class, String, int)
but passes the collection size
as valueCount and directly binds the collection as parameter via ParameterHolder.setParameter(String, Object)
.fromIdentifiableValues
in interface FromBaseBuilder<X extends FromBuilder<X>>
T
- The type of the valuesvalueClass
- The class of the identifiable type for which to create a VALUES clausealias
- The alias for the entityvalues
- The values to use for the values clause<T> X fromIdentifiableValues(Class<T> valueClass, String identifierAttribute, String alias, Collection<T> values)
FromBaseBuilder
FromBaseBuilder.fromIdentifiableValues(Class, String, String, int)
but passes the collection size
as valueCount and directly binds the collection as parameter via ParameterHolder.setParameter(String, Object)
.fromIdentifiableValues
in interface FromBaseBuilder<X extends FromBuilder<X>>
T
- The type of the valuesvalueClass
- The class of the identifiable type for which to create a VALUES clauseidentifierAttribute
- The attribute of the entity type to consider as identifier attributealias
- The alias for the entityvalues
- The values to use for the values clauseX join(String path, String alias, JoinType type)
path
- The path to joinalias
- The alias for the joined elementtype
- The join typeX joinDefault(String path, String alias, JoinType type)
path
- The path to joinalias
- The alias for the joined elementtype
- The join typeJoinOnBuilder<X> joinOn(String path, String alias, JoinType type)
The resulting join is different from a default join because it can only be referred to via it's alias. The absolute path can only be used if the joined path is a map and the on-clause contains a EQ predicate with the KEY on the left hand side.
path
- The path to joinalias
- The alias for the joined elementtype
- The join typeJoinOnBuilder<X> joinDefaultOn(String path, String alias, JoinType type)
path
- The path to joinalias
- The alias for the joined elementtype
- The join typeJoinOnBuilder<X> joinOn(Class<?> entityClass, String alias, JoinType type)
joinOn(java.lang.String, java.lang.Class, java.lang.String, com.blazebit.persistence.JoinType)
but with
the query root assumed as base.entityClass
- The entity class to joinalias
- The alias for the joined elementtype
- The join typeJoinOnBuilder<X> joinOn(String base, Class<?> entityClass, String alias, JoinType type)
base
- The base node on which to joinentityClass
- The entity class to joinalias
- The alias for the joined elementtype
- The join typeJoinOnBuilder<X> joinOn(javax.persistence.metamodel.EntityType<?> entityType, String alias, JoinType type)
joinOn(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType)
but with
the query root assumed as base.entityType
- The entity type to joinalias
- The alias for the joined elementtype
- The join typeJoinOnBuilder<X> joinOn(String base, javax.persistence.metamodel.EntityType<?> entityType, String alias, JoinType type)
base
- The base node on which to joinentityType
- The entity type to joinalias
- The alias for the joined elementtype
- The join typeX innerJoin(String path, String alias)
join(java.lang.String, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.INNER
.path
- The path to joinalias
- The alias for the joined elementX innerJoinDefault(String path, String alias)
joinDefault(java.lang.String, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.INNER
.path
- The path to joinalias
- The alias for the joined elementJoinOnBuilder<X> innerJoinOn(String path, String alias)
joinOn(java.lang.String, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.INNER
.path
- The path to joinalias
- The alias for the joined elementJoinOnBuilder<X> innerJoinDefaultOn(String path, String alias)
joinDefaultOn(java.lang.String, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.INNER
.path
- The path to joinalias
- The alias for the joined elementJoinOnBuilder<X> innerJoinOn(Class<?> entityClass, String alias)
joinOn(java.lang.Class, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.INNER
.entityClass
- The entity class to joinalias
- The alias for the joined elementJoinOnBuilder<X> innerJoinOn(String base, Class<?> entityClass, String alias)
joinOn(java.lang.String, java.lang.Class, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.INNER
.base
- The base node on which to joinentityClass
- The entity class to joinalias
- The alias for the joined elementJoinOnBuilder<X> innerJoinOn(javax.persistence.metamodel.EntityType<?> entityType, String alias)
joinOn(javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.INNER
.entityType
- The entity type to joinalias
- The alias for the joined elementJoinOnBuilder<X> innerJoinOn(String base, javax.persistence.metamodel.EntityType<?> entityType, String alias)
joinOn(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.INNER
.base
- The base node on which to joinentityType
- The entity type to joinalias
- The alias for the joined elementX leftJoin(String path, String alias)
join(java.lang.String, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.LEFT
.path
- The path to joinalias
- The alias for the joined elementX leftJoinDefault(String path, String alias)
joinDefault(java.lang.String, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.LEFT
.path
- The path to joinalias
- The alias for the joined elementJoinOnBuilder<X> leftJoinOn(String path, String alias)
joinOn(java.lang.String, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.LEFT
.path
- The path to joinalias
- The alias for the joined elementJoinOnBuilder<X> leftJoinDefaultOn(String path, String alias)
joinDefaultOn(java.lang.String, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.LEFT
.path
- The path to joinalias
- The alias for the joined elementJoinOnBuilder<X> leftJoinOn(Class<?> entityClass, String alias)
joinOn(java.lang.Class, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.LEFT
.entityClass
- The entity class to joinalias
- The alias for the joined elementJoinOnBuilder<X> leftJoinOn(String base, Class<?> entityClass, String alias)
joinOn(java.lang.String, java.lang.Class, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.LEFT
.base
- The base node on which to joinentityClass
- The entity class to joinalias
- The alias for the joined elementJoinOnBuilder<X> leftJoinOn(javax.persistence.metamodel.EntityType<?> entityType, String alias)
joinOn(javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.LEFT
.entityType
- The entity type to joinalias
- The alias for the joined elementJoinOnBuilder<X> leftJoinOn(String base, javax.persistence.metamodel.EntityType<?> entityType, String alias)
joinOn(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.LEFT
.base
- The base node on which to joinentityType
- The entity type to joinalias
- The alias for the joined elementX rightJoin(String path, String alias)
join(java.lang.String, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.RIGHT
.path
- The path to joinalias
- The alias for the joined elementX rightJoinDefault(String path, String alias)
joinDefault(java.lang.String, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.RIGHT
.path
- The path to joinalias
- The alias for the joined elementJoinOnBuilder<X> rightJoinOn(String path, String alias)
joinOn(java.lang.String, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.RIGHT
.path
- The path to joinalias
- The alias for the joined elementJoinOnBuilder<X> rightJoinDefaultOn(String path, String alias)
joinDefaultOn(java.lang.String, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.RIGHT
.path
- The path to joinalias
- The alias for the joined elementJoinOnBuilder<X> rightJoinOn(Class<?> entityClass, String alias)
joinOn(java.lang.Class, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.RIGHT
.entityClass
- The entity class to joinalias
- The alias for the joined elementJoinOnBuilder<X> rightJoinOn(String base, Class<?> entityClass, String alias)
joinOn(java.lang.String, java.lang.Class, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.RIGHT
.base
- The base node on which to joinentityClass
- The entity class to joinalias
- The alias for the joined elementJoinOnBuilder<X> rightJoinOn(javax.persistence.metamodel.EntityType<?> entityType, String alias)
joinOn(javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.RIGHT
.entityType
- The entity type to joinalias
- The alias for the joined elementJoinOnBuilder<X> rightJoinOn(String base, javax.persistence.metamodel.EntityType<?> entityType, String alias)
joinOn(java.lang.String, javax.persistence.metamodel.EntityType, java.lang.String, com.blazebit.persistence.JoinType)
but with
JoinType.RIGHT
.base
- The base node on which to joinentityType
- The entity type to joinalias
- The alias for the joined elementCopyright © 2014–2020 Blazebit. All rights reserved.