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 class
QueryModel.ArrayContains
Criterion used to restrict the results based on belonging to an array.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.LiteralProjection
A projection of a simple literal.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.Regex
Criterion used to restrict the results based on a regex pattern.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.static class
QueryModel.VersionEquals
A 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 QueryModel
add(QueryModel.Criterion criterion)
Adds the specified criterion instance to the query.QueryModel
allEq(java.util.Map<java.lang.String,java.lang.Object> propertyValues)
Apply an "equals" constraint to each property in the key set of a Map.QueryModel
and(Criteria other)
Creates a logical conjunction.QueryModel
between(java.lang.String propertyName, java.lang.Object start, java.lang.Object finish)
Restricts the results by the given property value range (inclusive).QueryModel
contains(java.lang.String propertyName, java.lang.Object parameter)
Restricts the property match to strings containing with the given value.QueryModel
endsWith(java.lang.String propertyName, java.lang.Object parameter)
Restricts the property match to strings ending with the given value.QueryModel
eq(java.lang.String propertyName, java.lang.Object parameter)
Creates an "equals" Criterion based on the specified property name and value.QueryModel
eqAll(java.lang.String propertyName, Criteria propertyValue)
Creates a subquery criterion that ensures the given property is equals to all the given returned values.QueryModel
eqProperty(java.lang.String propertyName, java.lang.String otherPropertyName)
Constrains a property to be equal to a specified other property.void
forUpdate()
Lock the selected entities.static QueryModel
from(PersistentEntity entity)
Creates a query from the given entity.QueryModel
ge(java.lang.String property, java.lang.Object parameter)
Used to restrict a value to be greater than or equal to the given value.QueryModel
geAll(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.QueryModel
geProperty(java.lang.String propertyName, java.lang.String otherPropertyName)
Constrains a property to be greater than or equal to a specified other property.QueryModel
geSome(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.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.QueryModel
gt(java.lang.String property, java.lang.Object parameter)
Used to restrict a value to be greater than or equal to the given value.QueryModel
gtAll(java.lang.String propertyName, Criteria propertyValue)
Creates a subquery criterion that ensures the given property is greater than all the given returned values.QueryModel
gte(java.lang.String property, java.lang.Object parameter)
Used to restrict a value to be greater than or equal to the given value.QueryModel
gtProperty(java.lang.String propertyName, java.lang.String otherPropertyName)
Constrains a property to be greater than a specified other property.QueryModel
gtSome(java.lang.String propertyName, Criteria propertyValue)
Creates a subquery criterion that ensures the given property is greater than some of the given values.QueryModel
idEq(java.lang.Object parameter)
Creates an "equals" Criterion based on the specified property name and value.QueryModel
ilike(java.lang.String propertyName, java.lang.Object parameter)
Creates an ilike Criterion based on the specified property name and value.QueryModel
inList(java.lang.String propertyName, QueryModel subquery)
Creates an "in" Criterion using a subquery.QueryModel
inList(java.lang.String propertyName, java.lang.Object parameter)
Creates an "in" Criterion based on the specified property name and list of values.QueryModel
isEmpty(java.lang.String propertyName)
Creates a criterion that asserts the given property is empty (such as a blank string).QueryModel
isFalse(java.lang.String propertyName)
Creates a criterion that asserts the given property is false.boolean
isForUpdate()
Whether to lock the selected entities.QueryModel
isNotEmpty(java.lang.String propertyName)
Creates a criterion that asserts the given property is not empty.QueryModel
isNotNull(java.lang.String propertyName)
Creates a criterion that asserts the given property is not null.QueryModel
isNull(java.lang.String propertyName)
Creates a criterion that asserts the given property is null.QueryModel
isTrue(java.lang.String propertyName)
Creates a criterion that asserts the given property is true.default JoinPath
join(Association association)
Join on the given association.default JoinPath
join(Association association, Join.Type joinType)
Join on the given association.default JoinPath
join(java.lang.String path, Join.Type joinType, java.lang.String alias)
Join on the given association.JoinPath
join(java.lang.String path, Association association, Join.Type joinType, java.lang.String alias)
Deprecated.QueryModel
le(java.lang.String property, java.lang.Object parameter)
Used to restrict a value to be less than or equal to the given value.QueryModel
leAll(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.QueryModel
leProperty(java.lang.String propertyName, java.lang.String otherPropertyName)
Constrains a property to be less than or equal to a specified other property.QueryModel
leSome(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.QueryModel
like(java.lang.String propertyName, java.lang.Object parameter)
Creates a like Criterion based on the specified property name and value.QueryModel
lt(java.lang.String property, java.lang.Object parameter)
Used to restrict a value to be less than or equal to the given value.QueryModel
ltAll(java.lang.String propertyName, Criteria propertyValue)
Creates a subquery criterion that ensures the given property is less than all the given returned values.QueryModel
lte(java.lang.String property, java.lang.Object parameter)
Used to restrict a value to be less than or equal to the given value.QueryModel
ltProperty(java.lang.String propertyName, java.lang.String otherPropertyName)
Constrains a property to be less than a specified other property.QueryModel
ltSome(java.lang.String propertyName, Criteria propertyValue)
Creates a subquery criterion that ensures the given property is less than some of the given values.QueryModel
max(int max)
Limits the maximum result.QueryModel
ne(java.lang.String propertyName, java.lang.Object parameter)
Creates a "not equals" Criterion based on the specified property name and value.QueryModel
neProperty(java.lang.String propertyName, java.lang.String otherPropertyName)
Constrains a property to be not equal to a specified other property.QueryModel
not(Criteria other)
Creates a logical negation.QueryModel
notIn(java.lang.String propertyName, QueryModel subquery)
Creates a negated "in" Criterion using a subquery.QueryModel
offset(long offset)
Sets the offset.QueryModel
or(Criteria other)
Creates a logical disjunction.ProjectionList
projections()
QueryModel
rlike(java.lang.String propertyName, java.lang.Object parameter)
Creates an rlike Criterion based on the specified property name and value.QueryModel
sizeEq(java.lang.String propertyName, java.lang.Object size)
Creates a Criterion that constrains a collection property by size.QueryModel
sizeGe(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.QueryModel
sizeGt(java.lang.String propertyName, java.lang.Object size)
Creates a Criterion that constrains a collection property to be greater than the given size.QueryModel
sizeLe(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.QueryModel
sizeLt(java.lang.String propertyName, java.lang.Object size)
Creates a Criterion that constrains a collection property to be less than to the given size.QueryModel
sizeNe(java.lang.String propertyName, java.lang.Object size)
Creates a Criterion that constrains a collection property to be not equal to the given size.QueryModel
sort(Sort sort)
Apply the given sort.QueryModel
startsWith(java.lang.String propertyName, java.lang.Object parameter)
Restricts the property match to strings starting with the given value.QueryModel
versionEq(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:Criteria
Creates an "equals" Criterion based on the specified property name and value.
-
versionEq
@NonNull QueryModel versionEq(java.lang.Object parameter)
Description copied from interface:Criteria
Creates that restricts the version to the given value.
-
isEmpty
@NonNull QueryModel isEmpty(@NonNull java.lang.String propertyName)
Description copied from interface:Criteria
Creates 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:Criteria
Creates a criterion that asserts the given property is not empty.- Specified by:
isNotEmpty
in interfaceCriteria
- Parameters:
propertyName
- The property name- Returns:
- The criteria
-
isNull
@NonNull QueryModel isNull(@NonNull java.lang.String propertyName)
Description copied from interface:Criteria
Creates a criterion that asserts the given property is null.
-
isTrue
@NonNull QueryModel isTrue(@NonNull java.lang.String propertyName)
Description copied from interface:Criteria
Creates a criterion that asserts the given property is true.
-
isFalse
@NonNull QueryModel isFalse(@NonNull java.lang.String propertyName)
Description copied from interface:Criteria
Creates a criterion that asserts the given property is false.
-
isNotNull
@NonNull QueryModel isNotNull(java.lang.String propertyName)
Description copied from interface:Criteria
Creates 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:Criteria
Creates 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:Criteria
Creates 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:Criteria
Restricts 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:Criteria
Used 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:Criteria
Used 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:Criteria
Used 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:Criteria
Used 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:Criteria
Used 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:Criteria
Used 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:Criteria
Creates 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:Criteria
Restricts the property match to strings starting with the given value.- Specified by:
startsWith
in 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:Criteria
Restricts 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:Criteria
Restricts 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:Criteria
Creates 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:Criteria
Creates an rlike Criterion based on the specified property name and value.
-
and
@NonNull QueryModel and(@NonNull Criteria other)
Description copied from interface:Criteria
Creates a logical conjunction.
-
or
@NonNull QueryModel or(@NonNull Criteria other)
Description copied from interface:Criteria
Creates a logical disjunction.
-
not
@NonNull QueryModel not(@NonNull Criteria other)
Description copied from interface:Criteria
Creates a logical negation.
-
inList
@NonNull QueryModel inList(@NonNull java.lang.String propertyName, @NonNull QueryModel subquery)
Description copied from interface:Criteria
Creates an "in" Criterion using a subquery.
-
inList
@NonNull QueryModel inList(@NonNull java.lang.String propertyName, @NonNull java.lang.Object parameter)
Description copied from interface:Criteria
Creates 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:Criteria
Creates 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:Criteria
Creates 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:Criteria
Creates 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:Criteria
Creates 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:Criteria
Creates 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:Criteria
Creates 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:Criteria
Creates 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:Criteria
Constrains a property to be equal to a specified other property.- Specified by:
eqProperty
in 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:Criteria
Constrains a property to be not equal to a specified other property.- Specified by:
neProperty
in 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:Criteria
Constrains a property to be greater than a specified other property.- Specified by:
gtProperty
in 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:Criteria
Constrains a property to be greater than or equal to a specified other property.- Specified by:
geProperty
in 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:Criteria
Constrains a property to be less than a specified other property.- Specified by:
ltProperty
in 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:Criteria
Constrains a property to be less than or equal to a specified other property.- Specified by:
leProperty
in 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:Criteria
Apply 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:Criteria
Creates 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:Criteria
Creates 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:Criteria
Creates 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:Criteria
Creates 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:Criteria
Creates 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:Criteria
Creates 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:Criteria
Creates 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:Criteria
Creates 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:Criteria
Creates 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
-
-