Purpose: Contains the implementation of the CommonAbstractCriteria interface of the JPA criteria API.
Description: This is the container class for the components that define a query. This is the superclass of CriteriaQuery, SubQuery, CriteriaDelete and CriteriaUpdate.
CommonAbstractCriteria
| Modifier and Type | Field and Description |
|---|---|
| protected Metamodel | |
| protected Set | |
| protected CriteriaBuilderImpl | |
| protected Class | |
| private static final long | |
| protected Expression |
| Access | Constructor and Description |
|---|---|
| public | CommonAbstractCriteriaImpl(Metamodel metamodel, CriteriaBuilderImpl queryBuilder, Class<T> resultType)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| protected void | |
| protected void | |
| protected abstract Expression | |
| protected abstract DatabaseQuery | |
| public Set | |
| public Predicate | Returns: where clause predicateImplements jakarta. |
| public Class | |
| protected abstract void | |
| public Root | Returns: query root corresponding to the given entitymetamodel entity representing the entity of type X entity)Add a query root corresponding to the given entity, forming a Cartesian product with any existing roots. |
| public Root | Returns: query root corresponding to the given entitythe entity class entityClass)Add a query root corresponding to the given entity, forming a Cartesian product with any existing roots. |
| public <U> Subquery | Returns: subquery corresponding to the querythe subquery result type type)Implements jakarta. |
| public DatabaseQuery | |
| public CommonAbstractCriteria | Returns: the modified querya simple or compound boolean expression restriction)Modify the query to restrict the query results according to the specified boolean expression. |
| public CommonAbstractCriteria |
| metamodel | back to summary |
|---|---|
| protected Metamodel metamodel | |
| parameters | back to summary |
|---|---|
| protected Set<ParameterExpression<?>> parameters | |
| queryBuilder | back to summary |
|---|---|
| protected CriteriaBuilderImpl queryBuilder | |
| queryType | back to summary |
|---|---|
| protected Class<T> queryType | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| where | back to summary |
|---|---|
| protected Expression<Boolean> where | |
| CommonAbstractCriteriaImpl | back to summary |
|---|---|
| public CommonAbstractCriteriaImpl(Metamodel metamodel, CriteriaBuilderImpl queryBuilder, Class<T> resultType) | |
| addParameter | back to summary |
|---|---|
| public void addParameter(ParameterExpression<?> parameter) | |
| findRootAndParameters | back to summary |
|---|---|
| protected void findRootAndParameters(Expression<?> predicate) | |
| findRootAndParameters | back to summary |
|---|---|
| protected void findRootAndParameters(Order order) | |
| getBaseExpression | back to summary |
|---|---|
| protected abstract Expression getBaseExpression() | |
| getDatabaseQuery | back to summary |
|---|---|
| protected abstract DatabaseQuery getDatabaseQuery() | |
| getParameters | back to summary |
|---|---|
| public Set Return the parameters of the query
| |
| getRestriction | back to summary |
|---|---|
| public Predicate getRestriction() Implements jakarta. Return the predicate that corresponds to the where clause restriction(s). | |
| getResultType | back to summary |
|---|---|
| public Class Return the result type of the query. If a result type was specified as an argument to the createQuery method, that type will be returned. If the query was created using the createTupleQuery method, the result type is Tuple. Otherwise, the result type is Object.
| |
| integrateRoot | back to summary |
|---|---|
| protected abstract void integrateRoot(RootImpl<X> root) Used to use a root from a different query. | |
| internalFrom | back to summary |
|---|---|
| public Root Add a query root corresponding to the given entity, forming a Cartesian product with any existing roots.
| |
| internalFrom | back to summary |
|---|---|
| public Root Add a query root corresponding to the given entity, forming a Cartesian product with any existing roots. | |
| subquery | back to summary |
|---|---|
| public <U> Subquery Implements jakarta. Specify that the query is to be used as a subquery having the specified return type.
| |
| translate | back to summary |
|---|---|
| public DatabaseQuery translate() Translates from the criteria query to a EclipseLink Database Query. | |
| where | back to summary |
|---|---|
| public CommonAbstractCriteria where(Expression<Boolean> restriction) Modify the query to restrict the query results according to the specified boolean expression. Replaces the previously added restriction(s), if any.
| |
| where | back to summary |
|---|---|
| public CommonAbstractCriteria where(Predicate... restrictions) Modify the query to restrict the query results according to the conjunction of the specified restriction predicates. Replaces the previously added restriction(s), if any. If no restrictions are specified, any previously added restrictions are simply removed.
| |