Package io.micronaut.data.model.query
Interface QueryModel
-
- All Superinterfaces:
Criteria
- All Known Implementing Classes:
AssociationQuery,DefaultQuery
public interface QueryModel extends Criteria
Main interface for constructing queries at either compilation or runtime.- Since:
- 1.0
- Author:
- graemerocher
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classQueryModel.AvgProjectionComputes the average value of a property.static classQueryModel.BetweenCriterion used to restrict the result to be between values (range query).static classQueryModel.ConjunctionA Criterion used to combine to criterion in a logical AND.static classQueryModel.ContainsCriterion used to restrict the results based on a result containing the given value.static classQueryModel.CountDistinctProjectionProjection to count distinct property names.static classQueryModel.CountProjectionUsed to count the results of a query.static interfaceQueryModel.CriterionRepresents a criterion to be used in a criteria query.static classQueryModel.DisjunctionA Criterion used to combine to criterion in a logical OR.static classQueryModel.DistinctProjectionDistinct result projection.static classQueryModel.DistinctPropertyProjectionProjection to return distinct property names.static classQueryModel.EndsWithCriterion used to restrict the results based on starting with a given value.static classQueryModel.EqualsA criterion that restricts the results based on equality.static classQueryModel.EqualsAllRestricts a value to be equal to all the given values.static classQueryModel.EqualsPropertyA criterion for one property equaling another.static classQueryModel.ExistsUsed for exists subquery.static classQueryModel.GreaterThanUsed to restrict a value to be greater than the given value.static classQueryModel.GreaterThanAllRestricts a value to be greater than all the given values.static classQueryModel.GreaterThanEqualsUsed to restrict a value to be greater than or equal to the given value.static classQueryModel.GreaterThanEqualsAllRestricts a value to be greater than or equal to all the given values.static classQueryModel.GreaterThanEqualsPropertyA criterion for one property being greater than or equal to another.static classQueryModel.GreaterThanEqualsSomeRestricts a value to be greater than some of the given values.static classQueryModel.GreaterThanPropertyA criterion for one property being greater than another.static classQueryModel.GreaterThanSomeRestricts a value to be greater than some of the given values.static classQueryModel.GroupPropertyProjectionGroup by property projection.static classQueryModel.IdEqualsA criterion that restricts the results based on the equality of the identifier.static classQueryModel.IdProjectionA projection used to obtain the identifier of an object.static classQueryModel.ILikeCriterion used to restrict the results based on a pattern (likeness).static classQueryModel.InCriterion used to restrict the results based on a list of values.static classQueryModel.IsEmptyRestricts a property to be empty (such as a blank string).static classQueryModel.IsFalseRestricts a property to be false.static classQueryModel.IsNotEmptyRestricts a property to be empty (such as a blank string).static classQueryModel.IsNotNullRestricts a property to be not null.static classQueryModel.IsNullRestricts a property to be null.static classQueryModel.IsTrueRestricts a property to be true.static classQueryModel.Junctionbase class for a junction (AND or OR or NOT).static classQueryModel.LessThanUsed to restrict a value to be less than the given value.static classQueryModel.LessThanAllRestricts a value to be less than all the given values.static classQueryModel.LessThanEqualsUsed to restrict a value to be less than the given value.static classQueryModel.LessThanEqualsAllRestricts a value to be less than or equal to all the given values.static classQueryModel.LessThanEqualsPropertyA criterion for one property being less than or equal to another.static classQueryModel.LessThanEqualsSomeRestricts a value to be less than some of the given values.static classQueryModel.LessThanPropertyA criterion for one property being less than another.static classQueryModel.LessThanSomeRestricts a value to be less than some of the given values.static classQueryModel.LikeCriterion used to restrict the results based on a pattern (likeness).static classQueryModel.LiteralProjectionA projection of a simple literal.static classQueryModel.MaxProjectionComputes the pageSize value of a property.static classQueryModel.MinProjectionComputes the min value of a property.static classQueryModel.NegationA criterion used to negate several other criterion.static classQueryModel.NotEqualsA criterion that restricts the results based on equality.static classQueryModel.NotEqualsAllRestricts a value to be not equal to all the given values.static classQueryModel.NotEqualsPropertyA criterion for one property not equaling another.static classQueryModel.NotExistsUsed for exists subquery.static classQueryModel.NotInCriterion used to restrict the results based on a list of values.static classQueryModel.ProjectionA projection.static classQueryModel.PropertyComparisonCriterionA Criterion that compares to properties.static classQueryModel.PropertyCriterionCriterion that applies to a property and value.static classQueryModel.PropertyNameCriterionA Criterion that applies to a property.static classQueryModel.PropertyProjectionA projection that obtains the value of a property of an entity.static classQueryModel.RegexCriterion used to restrict the results based on a regex pattern.static classQueryModel.RLikeCriterion used to restrict the results based on a regular expression pattern.static classQueryModel.SizeEqualsSize equals criterion.static classQueryModel.SizeGreaterThanSize greater than criterion.static classQueryModel.SizeGreaterThanEqualsSize greater than equals criterion.static classQueryModel.SizeLessThanSize less than criterion.static classQueryModel.SizeLessThanEqualsSize less than equals criterion.static classQueryModel.SizeNotEqualsSize not equals criterion.static classQueryModel.StartsWithCriterion used to restrict the results based on starting with a given value.static classQueryModel.SubqueryCriterionUsed to differentiate criterion that require a subquery.static classQueryModel.SumProjectionComputes the sum of a property.static classQueryModel.VersionEqualsA criterion that restricts the results based on the equality of the version.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description QueryModeladd(QueryModel.Criterion criterion)Adds the specified criterion instance to the query.QueryModelallEq(java.util.Map<java.lang.String,java.lang.Object> propertyValues)Apply an "equals" constraint to each property in the key set of a Map.QueryModeland(Criteria other)Creates a logical conjunction.QueryModelbetween(java.lang.String propertyName, java.lang.Object start, java.lang.Object finish)Restricts the results by the given property value range (inclusive).QueryModelcontains(java.lang.String propertyName, java.lang.Object parameter)Restricts the property match to strings containing with the given value.QueryModelendsWith(java.lang.String propertyName, java.lang.Object parameter)Restricts the property match to strings ending with the given value.QueryModeleq(java.lang.String propertyName, java.lang.Object parameter)Creates an "equals" Criterion based on the specified property name and value.QueryModeleqAll(java.lang.String propertyName, Criteria propertyValue)Creates a subquery criterion that ensures the given property is equals to all the given returned values.QueryModeleqProperty(java.lang.String propertyName, java.lang.String otherPropertyName)Constrains a property to be equal to a specified other property.voidforUpdate()Lock the selected entities.static QueryModelfrom(PersistentEntity entity)Creates a query from the given entity.QueryModelge(java.lang.String property, java.lang.Object parameter)Used to restrict a value to be greater than or equal to the given value.QueryModelgeAll(java.lang.String propertyName, Criteria propertyValue)Creates a subquery criterion that ensures the given property is greater than or equals to all the given returned values.QueryModelgeProperty(java.lang.String propertyName, java.lang.String otherPropertyName)Constrains a property to be greater than or equal to a specified other property.QueryModelgeSome(java.lang.String propertyName, Criteria propertyValue)Creates a subquery criterion that ensures the given property is greater than or equal to some of the given values.QueryModel.JunctiongetCriteria()java.util.Optional<JoinPath>getJoinPath(java.lang.String path)Obtain the join type for the given association.java.util.Collection<JoinPath>getJoinPaths()intgetMax()Get the pageSize results to return.longgetOffset()Get the offset of the query.PersistentEntitygetPersistentEntity()java.util.List<QueryModel.Projection>getProjections()default SortgetSort()The sort to apply.QueryModelgt(java.lang.String property, java.lang.Object parameter)Used to restrict a value to be greater than or equal to the given value.QueryModelgtAll(java.lang.String propertyName, Criteria propertyValue)Creates a subquery criterion that ensures the given property is greater than all the given returned values.QueryModelgte(java.lang.String property, java.lang.Object parameter)Used to restrict a value to be greater than or equal to the given value.QueryModelgtProperty(java.lang.String propertyName, java.lang.String otherPropertyName)Constrains a property to be greater than a specified other property.QueryModelgtSome(java.lang.String propertyName, Criteria propertyValue)Creates a subquery criterion that ensures the given property is greater than some of the given values.QueryModelidEq(java.lang.Object parameter)Creates an "equals" Criterion based on the specified property name and value.QueryModelilike(java.lang.String propertyName, java.lang.Object parameter)Creates an ilike Criterion based on the specified property name and value.QueryModelinList(java.lang.String propertyName, QueryModel subquery)Creates an "in" Criterion using a subquery.QueryModelinList(java.lang.String propertyName, java.lang.Object parameter)Creates an "in" Criterion based on the specified property name and list of values.QueryModelisEmpty(java.lang.String propertyName)Creates a criterion that asserts the given property is empty (such as a blank string).QueryModelisFalse(java.lang.String propertyName)Creates a criterion that asserts the given property is false.booleanisForUpdate()Whether to lock the selected entities.QueryModelisNotEmpty(java.lang.String propertyName)Creates a criterion that asserts the given property is not empty.QueryModelisNotNull(java.lang.String propertyName)Creates a criterion that asserts the given property is not null.QueryModelisNull(java.lang.String propertyName)Creates a criterion that asserts the given property is null.QueryModelisTrue(java.lang.String propertyName)Creates a criterion that asserts the given property is true.default JoinPathjoin(Association association)Join on the given association.default JoinPathjoin(Association association, Join.Type joinType)Join on the given association.default JoinPathjoin(java.lang.String path, Join.Type joinType, java.lang.String alias)Join on the given association.JoinPathjoin(java.lang.String path, Association association, Join.Type joinType, java.lang.String alias)Deprecated.QueryModelle(java.lang.String property, java.lang.Object parameter)Used to restrict a value to be less than or equal to the given value.QueryModelleAll(java.lang.String propertyName, Criteria propertyValue)Creates a subquery criterion that ensures the given property is less than or equal to all the given returned values.QueryModelleProperty(java.lang.String propertyName, java.lang.String otherPropertyName)Constrains a property to be less than or equal to a specified other property.QueryModelleSome(java.lang.String propertyName, Criteria propertyValue)Creates a subquery criterion that ensures the given property is less than or equal to some of the given values.QueryModellike(java.lang.String propertyName, java.lang.Object parameter)Creates a like Criterion based on the specified property name and value.QueryModellt(java.lang.String property, java.lang.Object parameter)Used to restrict a value to be less than or equal to the given value.QueryModelltAll(java.lang.String propertyName, Criteria propertyValue)Creates a subquery criterion that ensures the given property is less than all the given returned values.QueryModellte(java.lang.String property, java.lang.Object parameter)Used to restrict a value to be less than or equal to the given value.QueryModelltProperty(java.lang.String propertyName, java.lang.String otherPropertyName)Constrains a property to be less than a specified other property.QueryModelltSome(java.lang.String propertyName, Criteria propertyValue)Creates a subquery criterion that ensures the given property is less than some of the given values.QueryModelmax(int max)Limits the maximum result.QueryModelne(java.lang.String propertyName, java.lang.Object parameter)Creates a "not equals" Criterion based on the specified property name and value.QueryModelneProperty(java.lang.String propertyName, java.lang.String otherPropertyName)Constrains a property to be not equal to a specified other property.QueryModelnot(Criteria other)Creates a logical negation.QueryModelnotIn(java.lang.String propertyName, QueryModel subquery)Creates a negated "in" Criterion using a subquery.QueryModeloffset(long offset)Sets the offset.QueryModelor(Criteria other)Creates a logical disjunction.ProjectionListprojections()QueryModelrlike(java.lang.String propertyName, java.lang.Object parameter)Creates an rlike Criterion based on the specified property name and value.QueryModelsizeEq(java.lang.String propertyName, java.lang.Object size)Creates a Criterion that constrains a collection property by size.QueryModelsizeGe(java.lang.String propertyName, java.lang.Object size)Creates a Criterion that constrains a collection property to be greater than or equal to the given size.QueryModelsizeGt(java.lang.String propertyName, java.lang.Object size)Creates a Criterion that constrains a collection property to be greater than the given size.QueryModelsizeLe(java.lang.String propertyName, java.lang.Object size)Creates a Criterion that constrains a collection property to be less than or equal to the given size.QueryModelsizeLt(java.lang.String propertyName, java.lang.Object size)Creates a Criterion that constrains a collection property to be less than to the given size.QueryModelsizeNe(java.lang.String propertyName, java.lang.Object size)Creates a Criterion that constrains a collection property to be not equal to the given size.QueryModelsort(Sort sort)Apply the given sort.QueryModelstartsWith(java.lang.String propertyName, java.lang.Object parameter)Restricts the property match to strings starting with the given value.QueryModelversionEq(java.lang.Object parameter)Creates that restricts the version to the given value.
-
-
-
Method Detail
-
idEq
@NonNull QueryModel idEq(java.lang.Object parameter)
Description copied from interface:CriteriaCreates an "equals" Criterion based on the specified property name and value.
-
versionEq
@NonNull QueryModel versionEq(java.lang.Object parameter)
Description copied from interface:CriteriaCreates that restricts the version to the given value.
-
isEmpty
@NonNull QueryModel isEmpty(@NonNull java.lang.String propertyName)
Description copied from interface:CriteriaCreates a criterion that asserts the given property is empty (such as a blank string).
-
isNotEmpty
@NonNull QueryModel isNotEmpty(@NonNull java.lang.String propertyName)
Description copied from interface:CriteriaCreates a criterion that asserts the given property is not empty.- Specified by:
isNotEmptyin interfaceCriteria- Parameters:
propertyName- The property name- Returns:
- The criteria
-
isNull
@NonNull QueryModel isNull(@NonNull java.lang.String propertyName)
Description copied from interface:CriteriaCreates a criterion that asserts the given property is null.
-
isTrue
@NonNull QueryModel isTrue(@NonNull java.lang.String propertyName)
Description copied from interface:CriteriaCreates a criterion that asserts the given property is true.
-
isFalse
@NonNull QueryModel isFalse(@NonNull java.lang.String propertyName)
Description copied from interface:CriteriaCreates a criterion that asserts the given property is false.
-
isNotNull
@NonNull QueryModel isNotNull(java.lang.String propertyName)
Description copied from interface:CriteriaCreates a criterion that asserts the given property is not null.
-
eq
@NonNull QueryModel eq(java.lang.String propertyName, java.lang.Object parameter)
Description copied from interface:CriteriaCreates an "equals" Criterion based on the specified property name and value.
-
ne
@NonNull QueryModel ne(@NonNull java.lang.String propertyName, @NonNull java.lang.Object parameter)
Description copied from interface:CriteriaCreates a "not equals" Criterion based on the specified property name and value.
-
between
@NonNull QueryModel between(@NonNull java.lang.String propertyName, @NonNull java.lang.Object start, @NonNull java.lang.Object finish)
Description copied from interface:CriteriaRestricts the results by the given property value range (inclusive).
-
gte
@NonNull QueryModel gte(@NonNull java.lang.String property, @NonNull java.lang.Object parameter)
Description copied from interface:CriteriaUsed to restrict a value to be greater than or equal to the given value.
-
ge
@NonNull QueryModel ge(@NonNull java.lang.String property, @NonNull java.lang.Object parameter)
Description copied from interface:CriteriaUsed to restrict a value to be greater than or equal to the given value.
-
gt
@NonNull QueryModel gt(@NonNull java.lang.String property, @NonNull java.lang.Object parameter)
Description copied from interface:CriteriaUsed to restrict a value to be greater than or equal to the given value.
-
lte
@NonNull QueryModel lte(@NonNull java.lang.String property, @NonNull java.lang.Object parameter)
Description copied from interface:CriteriaUsed to restrict a value to be less than or equal to the given value.
-
le
@NonNull QueryModel le(@NonNull java.lang.String property, @NonNull java.lang.Object parameter)
Description copied from interface:CriteriaUsed to restrict a value to be less than or equal to the given value.
-
lt
@NonNull QueryModel lt(@NonNull java.lang.String property, @NonNull java.lang.Object parameter)
Description copied from interface:CriteriaUsed to restrict a value to be less than or equal to the given value.
-
like
@NonNull QueryModel like(@NonNull java.lang.String propertyName, @NonNull java.lang.Object parameter)
Description copied from interface:CriteriaCreates a like Criterion based on the specified property name and value.
-
startsWith
@NonNull QueryModel startsWith(@NonNull java.lang.String propertyName, @NonNull java.lang.Object parameter)
Description copied from interface:CriteriaRestricts the property match to strings starting with the given value.- Specified by:
startsWithin interfaceCriteria- Parameters:
propertyName- The property nameparameter- The parameter that provides the value- Returns:
- The criteria
-
endsWith
@NonNull QueryModel endsWith(@NonNull java.lang.String propertyName, @NonNull java.lang.Object parameter)
Description copied from interface:CriteriaRestricts the property match to strings ending with the given value.
-
contains
@NonNull QueryModel contains(@NonNull java.lang.String propertyName, @NonNull java.lang.Object parameter)
Description copied from interface:CriteriaRestricts the property match to strings containing with the given value.
-
ilike
@NonNull QueryModel ilike(@NonNull java.lang.String propertyName, @NonNull java.lang.Object parameter)
Description copied from interface:CriteriaCreates an ilike Criterion based on the specified property name and value. Unlike a like condition, ilike is case insensitive.
-
rlike
@NonNull QueryModel rlike(@NonNull java.lang.String propertyName, @NonNull java.lang.Object parameter)
Description copied from interface:CriteriaCreates an rlike Criterion based on the specified property name and value.
-
and
@NonNull QueryModel and(@NonNull Criteria other)
Description copied from interface:CriteriaCreates a logical conjunction.
-
or
@NonNull QueryModel or(@NonNull Criteria other)
Description copied from interface:CriteriaCreates a logical disjunction.
-
not
@NonNull QueryModel not(@NonNull Criteria other)
Description copied from interface:CriteriaCreates a logical negation.
-
inList
@NonNull QueryModel inList(@NonNull java.lang.String propertyName, @NonNull QueryModel subquery)
Description copied from interface:CriteriaCreates an "in" Criterion using a subquery.
-
inList
@NonNull QueryModel inList(@NonNull java.lang.String propertyName, @NonNull java.lang.Object parameter)
Description copied from interface:CriteriaCreates an "in" Criterion based on the specified property name and list of values.
-
notIn
@NonNull QueryModel notIn(@NonNull java.lang.String propertyName, @NonNull QueryModel subquery)
Description copied from interface:CriteriaCreates a negated "in" Criterion using a subquery.
-
sizeEq
@NonNull QueryModel sizeEq(@NonNull java.lang.String propertyName, @NonNull java.lang.Object size)
Description copied from interface:CriteriaCreates a Criterion that constrains a collection property by size.
-
sizeGt
@NonNull QueryModel sizeGt(@NonNull java.lang.String propertyName, @NonNull java.lang.Object size)
Description copied from interface:CriteriaCreates a Criterion that constrains a collection property to be greater than the given size.
-
sizeGe
@NonNull QueryModel sizeGe(@NonNull java.lang.String propertyName, @NonNull java.lang.Object size)
Description copied from interface:CriteriaCreates a Criterion that constrains a collection property to be greater than or equal to the given size.
-
sizeLe
@NonNull QueryModel sizeLe(@NonNull java.lang.String propertyName, @NonNull java.lang.Object size)
Description copied from interface:CriteriaCreates a Criterion that constrains a collection property to be less than or equal to the given size.
-
sizeLt
@NonNull QueryModel sizeLt(@NonNull java.lang.String propertyName, @NonNull java.lang.Object size)
Description copied from interface:CriteriaCreates a Criterion that constrains a collection property to be less than to the given size.
-
sizeNe
@NonNull QueryModel sizeNe(@NonNull java.lang.String propertyName, @NonNull java.lang.Object size)
Description copied from interface:CriteriaCreates a Criterion that constrains a collection property to be not equal to the given size.
-
eqProperty
@NonNull QueryModel eqProperty(@NonNull java.lang.String propertyName, @NonNull java.lang.String otherPropertyName)
Description copied from interface:CriteriaConstrains a property to be equal to a specified other property.- Specified by:
eqPropertyin interfaceCriteria- Parameters:
propertyName- The propertyotherPropertyName- The other property- Returns:
- This criteria
-
neProperty
@NonNull QueryModel neProperty(@NonNull java.lang.String propertyName, @NonNull java.lang.String otherPropertyName)
Description copied from interface:CriteriaConstrains a property to be not equal to a specified other property.- Specified by:
nePropertyin interfaceCriteria- Parameters:
propertyName- The propertyotherPropertyName- The other property- Returns:
- This criteria
-
gtProperty
@NonNull QueryModel gtProperty(@NonNull java.lang.String propertyName, @NonNull java.lang.String otherPropertyName)
Description copied from interface:CriteriaConstrains a property to be greater than a specified other property.- Specified by:
gtPropertyin interfaceCriteria- Parameters:
propertyName- The propertyotherPropertyName- The other property- Returns:
- This criteria
-
geProperty
@NonNull QueryModel geProperty(@NonNull java.lang.String propertyName, @NonNull java.lang.String otherPropertyName)
Description copied from interface:CriteriaConstrains a property to be greater than or equal to a specified other property.- Specified by:
gePropertyin interfaceCriteria- Parameters:
propertyName- The propertyotherPropertyName- The other property- Returns:
- This criteria
-
ltProperty
@NonNull QueryModel ltProperty(@NonNull java.lang.String propertyName, @NonNull java.lang.String otherPropertyName)
Description copied from interface:CriteriaConstrains a property to be less than a specified other property.- Specified by:
ltPropertyin interfaceCriteria- Parameters:
propertyName- The propertyotherPropertyName- The other property- Returns:
- This criteria
-
leProperty
@NonNull QueryModel leProperty(java.lang.String propertyName, @NonNull java.lang.String otherPropertyName)
Description copied from interface:CriteriaConstrains a property to be less than or equal to a specified other property.- Specified by:
lePropertyin interfaceCriteria- Parameters:
propertyName- The propertyotherPropertyName- The other property- Returns:
- This criteria
-
allEq
@NonNull QueryModel allEq(@NonNull java.util.Map<java.lang.String,java.lang.Object> propertyValues)
Description copied from interface:CriteriaApply an "equals" constraint to each property in the key set of a Map.
-
eqAll
@NonNull QueryModel eqAll(@NonNull java.lang.String propertyName, @NonNull Criteria propertyValue)
Description copied from interface:CriteriaCreates a subquery criterion that ensures the given property is equals to all the given returned values.
-
gtAll
@NonNull QueryModel gtAll(@NonNull java.lang.String propertyName, @NonNull Criteria propertyValue)
Description copied from interface:CriteriaCreates a subquery criterion that ensures the given property is greater than all the given returned values.
-
ltAll
@NonNull QueryModel ltAll(@NonNull java.lang.String propertyName, @NonNull Criteria propertyValue)
Description copied from interface:CriteriaCreates a subquery criterion that ensures the given property is less than all the given returned values.
-
geAll
@NonNull QueryModel geAll(@NonNull java.lang.String propertyName, @NonNull Criteria propertyValue)
Description copied from interface:CriteriaCreates a subquery criterion that ensures the given property is greater than or equals to all the given returned values.
-
leAll
@NonNull QueryModel leAll(@NonNull java.lang.String propertyName, @NonNull Criteria propertyValue)
Description copied from interface:CriteriaCreates a subquery criterion that ensures the given property is less than or equal to all the given returned values.
-
gtSome
@NonNull QueryModel gtSome(@NonNull java.lang.String propertyName, @NonNull Criteria propertyValue)
Description copied from interface:CriteriaCreates a subquery criterion that ensures the given property is greater than some of the given values.
-
geSome
@NonNull QueryModel geSome(@NonNull java.lang.String propertyName, @NonNull Criteria propertyValue)
Description copied from interface:CriteriaCreates a subquery criterion that ensures the given property is greater than or equal to some of the given values.
-
ltSome
@NonNull QueryModel ltSome(@NonNull java.lang.String propertyName, @NonNull Criteria propertyValue)
Description copied from interface:CriteriaCreates a subquery criterion that ensures the given property is less than some of the given values.
-
leSome
@NonNull QueryModel leSome(@NonNull java.lang.String propertyName, @NonNull Criteria propertyValue)
Description copied from interface:CriteriaCreates a subquery criterion that ensures the given property is less than or equal to some of the given values.
-
getJoinPaths
java.util.Collection<JoinPath> getJoinPaths()
- Returns:
- The join paths.
-
getPersistentEntity
@NonNull PersistentEntity getPersistentEntity()
- Returns:
- The entity the criteria applies to
-
getCriteria
@NonNull QueryModel.Junction getCriteria()
- Returns:
- The criteria for this query
-
getProjections
@NonNull java.util.List<QueryModel.Projection> getProjections()
- Returns:
- The projections that apply to this query.
-
getJoinPath
java.util.Optional<JoinPath> getJoinPath(java.lang.String path)
Obtain the join type for the given association.- Parameters:
path- The path- Returns:
- The join type for the association.
-
join
@NonNull @Deprecated JoinPath join(java.lang.String path, Association association, @NonNull Join.Type joinType, @Nullable java.lang.String alias)
Deprecated.Join on the given association.- Parameters:
path- The join pathassociation- The associationjoinType- The join typealias- The alias to use.- Returns:
- The query
-
join
@NonNull default JoinPath join(java.lang.String path, @NonNull Join.Type joinType, @Nullable java.lang.String alias)
Join on the given association.- Parameters:
path- The join pathjoinType- The join typealias- The alias to use.- Returns:
- The query
-
join
@NonNull default JoinPath join(@NonNull Association association, @NonNull Join.Type joinType)
Join on the given association.- Parameters:
association- The association, never nulljoinType- The join type- Returns:
- The query
-
join
@NonNull default JoinPath join(@NonNull Association association)
Join on the given association.- Parameters:
association- The association, never null- Returns:
- The query
-
projections
@NonNull ProjectionList projections()
- Returns:
- The projection list.
-
add
@NonNull QueryModel add(@NonNull QueryModel.Criterion criterion)
Adds the specified criterion instance to the query.- Parameters:
criterion- The criterion instance- Returns:
- This query
-
max
QueryModel max(int max)
Limits the maximum result.- Parameters:
max- The pageSize- Returns:
- This query
-
offset
QueryModel offset(long offset)
Sets the offset.- Parameters:
offset- The offset- Returns:
- This query
-
getSort
default Sort getSort()
The sort to apply.- Returns:
- The sort
-
sort
@NonNull QueryModel sort(@NonNull Sort sort)
Apply the given sort.- Parameters:
sort- The sort to apply- Returns:
- This query
-
from
@NonNull static QueryModel from(@NonNull PersistentEntity entity)
Creates a query from the given entity.- Parameters:
entity- The entity- Returns:
- The query
-
getMax
int getMax()
Get the pageSize results to return.- Returns:
- The pageSize results
-
getOffset
long getOffset()
Get the offset of the query.- Returns:
- The offset
-
forUpdate
void forUpdate()
Lock the selected entities.
-
isForUpdate
boolean isForUpdate()
Whether to lock the selected entities.- Returns:
- true if the the selected entities should be locked
-
-