public interface QueryModel extends Criteria
Modifier and Type | Interface and Description |
---|---|
static class |
QueryModel.AvgProjection
Computes the average value of a property.
|
static class |
QueryModel.Between
Criterion used to restrict the result to be between values (range query).
|
static class |
QueryModel.Conjunction
A Criterion used to combine to criterion in a logical AND.
|
static class |
QueryModel.Contains
Criterion used to restrict the results based on a result containing the given value.
|
static class |
QueryModel.CountDistinctProjection
Projection to count distinct property names.
|
static class |
QueryModel.CountProjection
Used to count the results of a query.
|
static interface |
QueryModel.Criterion
Represents a criterion to be used in a criteria query.
|
static class |
QueryModel.Disjunction
A Criterion used to combine to criterion in a logical OR.
|
static class |
QueryModel.DistinctProjection
Distinct result projection.
|
static class |
QueryModel.DistinctPropertyProjection
Projection to return distinct property names.
|
static class |
QueryModel.EndsWith
Criterion used to restrict the results based on starting with a given value.
|
static class |
QueryModel.Equals
A criterion that restricts the results based on equality.
|
static class |
QueryModel.EqualsAll
Restricts a value to be equal to all the given values.
|
static class |
QueryModel.EqualsProperty
A criterion for one property equaling another.
|
static class |
QueryModel.Exists
Used for exists subquery.
|
static class |
QueryModel.GreaterThan
Used to restrict a value to be greater than the given value.
|
static class |
QueryModel.GreaterThanAll
Restricts a value to be greater than all the given values.
|
static class |
QueryModel.GreaterThanEquals
Used to restrict a value to be greater than or equal to the given value.
|
static class |
QueryModel.GreaterThanEqualsAll
Restricts a value to be greater than or equal to all the given values.
|
static class |
QueryModel.GreaterThanEqualsProperty
A criterion for one property being greater than or equal to another.
|
static class |
QueryModel.GreaterThanEqualsSome
Restricts a value to be greater than some of the given values.
|
static class |
QueryModel.GreaterThanProperty
A criterion for one property being greater than another.
|
static class |
QueryModel.GreaterThanSome
Restricts a value to be greater than some of the given values.
|
static class |
QueryModel.GroupPropertyProjection
Group by property projection.
|
static class |
QueryModel.IdEquals
A criterion that restricts the results based on the equality of the identifier.
|
static class |
QueryModel.IdProjection
A projection used to obtain the identifier of an object.
|
static class |
QueryModel.ILike
Criterion used to restrict the results based on a pattern (likeness).
|
static class |
QueryModel.In
Criterion used to restrict the results based on a list of values.
|
static class |
QueryModel.IsEmpty
Restricts a property to be empty (such as a blank string).
|
static class |
QueryModel.IsFalse
Restricts a property to be false.
|
static class |
QueryModel.IsNotEmpty
Restricts a property to be empty (such as a blank string).
|
static class |
QueryModel.IsNotNull
Restricts a property to be not null.
|
static class |
QueryModel.IsNull
Restricts a property to be null.
|
static class |
QueryModel.IsTrue
Restricts a property to be true.
|
static class |
QueryModel.Junction
base class for a junction (AND or OR or NOT).
|
static class |
QueryModel.LessThan
Used to restrict a value to be less than the given value.
|
static class |
QueryModel.LessThanAll
Restricts a value to be less than all the given values.
|
static class |
QueryModel.LessThanEquals
Used to restrict a value to be less than the given value.
|
static class |
QueryModel.LessThanEqualsAll
Restricts a value to be less than or equal to all the given values.
|
static class |
QueryModel.LessThanEqualsProperty
A criterion for one property being less than or equal to another.
|
static class |
QueryModel.LessThanEqualsSome
Restricts a value to be less than some of the given values.
|
static class |
QueryModel.LessThanProperty
A criterion for one property being less than another.
|
static class |
QueryModel.LessThanSome
Restricts a value to be less than some of the given values.
|
static class |
QueryModel.Like
Criterion used to restrict the results based on a pattern (likeness).
|
static class |
QueryModel.MaxProjection
Computes the pageSize value of a property.
|
static class |
QueryModel.MinProjection
Computes the min value of a property.
|
static class |
QueryModel.Negation
A criterion used to negate several other criterion.
|
static class |
QueryModel.NotEquals
A criterion that restricts the results based on equality.
|
static class |
QueryModel.NotEqualsAll
Restricts a value to be not equal to all the given values.
|
static class |
QueryModel.NotEqualsProperty
A criterion for one property not equaling another.
|
static class |
QueryModel.NotExists
Used for exists subquery.
|
static class |
QueryModel.NotIn
Criterion used to restrict the results based on a list of values.
|
static class |
QueryModel.Projection
A projection.
|
static class |
QueryModel.PropertyComparisonCriterion
A Criterion that compares to properties.
|
static class |
QueryModel.PropertyCriterion
Criterion that applies to a property and value.
|
static class |
QueryModel.PropertyNameCriterion
A Criterion that applies to a property.
|
static class |
QueryModel.PropertyProjection
A projection that obtains the value of a property of an entity.
|
static class |
QueryModel.RLike
Criterion used to restrict the results based on a regular expression pattern.
|
static class |
QueryModel.SizeEquals
Size equals criterion.
|
static class |
QueryModel.SizeGreaterThan
Size greater than criterion.
|
static class |
QueryModel.SizeGreaterThanEquals
Size greater than equals criterion.
|
static class |
QueryModel.SizeLessThan
Size less than criterion.
|
static class |
QueryModel.SizeLessThanEquals
Size less than equals criterion.
|
static class |
QueryModel.SizeNotEquals
Size not equals criterion.
|
static class |
QueryModel.StartsWith
Criterion used to restrict the results based on starting with a given value.
|
static class |
QueryModel.SubqueryCriterion
Used to differentiate criterion that require a subquery.
|
static class |
QueryModel.SumProjection
Computes the sum of a property.
|
Modifier and Type | Method and Description |
---|---|
QueryModel |
add(QueryModel.Criterion criterion)
Adds the specified criterion instance to the query.
|
static QueryModel |
from(PersistentEntity entity)
Creates a query from the given entity.
|
QueryModel.Junction |
getCriteria() |
java.util.Optional<JoinPath> |
getJoinPath(java.lang.String path)
Obtain the join type for the given association.
|
java.util.Collection<JoinPath> |
getJoinPaths() |
int |
getMax()
Get the pageSize results to return.
|
long |
getOffset()
Get the offset of the query.
|
PersistentEntity |
getPersistentEntity() |
java.util.List<QueryModel.Projection> |
getProjections() |
default Sort |
getSort()
The sort to apply.
|
default JoinPath |
join(Association association)
Join on the given association.
|
default JoinPath |
join(Association association,
Join.Type joinType)
Join on the given association.
|
JoinPath |
join(java.lang.String path,
Association association,
Join.Type joinType,
java.lang.String alias)
Join on the given association.
|
QueryModel |
max(int max)
Limits the maximum result.
|
QueryModel |
offset(long offset)
Sets the offset.
|
ProjectionList |
projections() |
QueryModel |
sort(Sort sort)
Apply the given sort.
|
allEq, and, between, contains, endsWith, eq, eqAll, eqProperty, ge, geAll, geProperty, geSome, gt, gtAll, gte, gtProperty, gtSome, idEq, idEquals, ilike, inList, inList, isEmpty, isFalse, isNotEmpty, isNotNull, isNull, isTrue, le, leAll, leProperty, leSome, like, lt, ltAll, lte, ltProperty, ltSome, ne, neProperty, not, notIn, or, rlike, sizeEq, sizeGe, sizeGt, sizeLe, sizeLt, sizeNe, startsWith
java.util.Collection<JoinPath> getJoinPaths()
@NonNull PersistentEntity getPersistentEntity()
@NonNull QueryModel.Junction getCriteria()
@NonNull java.util.List<QueryModel.Projection> getProjections()
java.util.Optional<JoinPath> getJoinPath(java.lang.String path)
path
- The path@NonNull JoinPath join(java.lang.String path, @NonNull Association association, @NonNull Join.Type joinType, @Nullable java.lang.String alias)
path
- The join pathassociation
- The association, never nulljoinType
- The join typealias
- The alias to use.@NonNull default JoinPath join(@NonNull Association association, @NonNull Join.Type joinType)
association
- The association, never nulljoinType
- The join type@NonNull default JoinPath join(@NonNull Association association)
association
- The association, never null@NonNull ProjectionList projections()
@NonNull QueryModel add(@NonNull QueryModel.Criterion criterion)
criterion
- The criterion instanceQueryModel max(int max)
max
- The pageSizeQueryModel offset(long offset)
offset
- The offsetdefault Sort getSort()
@NonNull QueryModel sort(@NonNull Sort sort)
sort
- The sort to apply@NonNull static QueryModel from(@NonNull PersistentEntity entity)
entity
- The entityint getMax()
long getOffset()