public class DefaultQueryBuilder extends Object implements IdentityQueryBuilder
Constructor and Description |
---|
DefaultQueryBuilder(ContextualIdentityManager identityManager,
StoreSelector storeSelector) |
Modifier and Type | Method and Description |
---|---|
Sort |
asc(QueryParameter parameter)
Create an ascending order for the given
parameter . |
Condition |
between(QueryParameter parameter,
Object x,
Object y)
Create a condition for testing whether the query parameter is between the given values.
|
<T extends IdentityType> |
createIdentityQuery(Class<T> identityType)
Create an
IdentityQuery that can be used to query for IdentityType instances of a the given identityType . |
Sort |
desc(QueryParameter parameter)
Create an descending order for the given
parameter . |
Condition |
equal(QueryParameter parameter,
Object value)
Create a condition for testing the arguments for equality.
|
Condition |
greaterThan(QueryParameter parameter,
Object x)
Create a condition for testing whether the query parameter is grater than the given value..
|
Condition |
greaterThanOrEqualTo(QueryParameter parameter,
Object x)
Create a condition for testing whether the query parameter is grater than or equal to the given value..
|
Condition |
in(QueryParameter parameter,
Object... x)
Create a condition for testing whether the query parameter is contained in a list of values.
|
Condition |
lessThan(QueryParameter parameter,
Object x)
Create a condition for testing whether the query parameter is less than the given value..
|
Condition |
lessThanOrEqualTo(QueryParameter parameter,
Object x)
Create a condition for testing whether the query parameter is less than or equal to the given value..
|
Condition |
like(QueryParameter parameter,
String pattern)
Create a condition for testing the whether the query parameter satisfies the given pattern..
|
public DefaultQueryBuilder(ContextualIdentityManager identityManager, StoreSelector storeSelector)
public Condition like(QueryParameter parameter, String pattern)
IdentityQueryBuilder
Create a condition for testing the whether the query parameter satisfies the given pattern..
like
in interface IdentityQueryBuilder
parameter
- The query parameter.pattern
- The pattern to match.public Condition equal(QueryParameter parameter, Object value)
IdentityQueryBuilder
Create a condition for testing the arguments for equality.
equal
in interface IdentityQueryBuilder
parameter
- The query parameter.value
- The value to compare.public Condition greaterThan(QueryParameter parameter, Object x)
IdentityQueryBuilder
Create a condition for testing whether the query parameter is grater than the given value..
greaterThan
in interface IdentityQueryBuilder
parameter
- The query parameter.x
- The value to compare.public Condition greaterThanOrEqualTo(QueryParameter parameter, Object x)
IdentityQueryBuilder
Create a condition for testing whether the query parameter is grater than or equal to the given value..
greaterThanOrEqualTo
in interface IdentityQueryBuilder
parameter
- The query parameter.x
- The value to compare.public Condition lessThan(QueryParameter parameter, Object x)
IdentityQueryBuilder
Create a condition for testing whether the query parameter is less than the given value..
lessThan
in interface IdentityQueryBuilder
parameter
- The query parameter.x
- The value to compare.public Condition lessThanOrEqualTo(QueryParameter parameter, Object x)
IdentityQueryBuilder
Create a condition for testing whether the query parameter is less than or equal to the given value..
lessThanOrEqualTo
in interface IdentityQueryBuilder
parameter
- The query parameter.x
- The value to compare.public Condition between(QueryParameter parameter, Object x, Object y)
IdentityQueryBuilder
Create a condition for testing whether the query parameter is between the given values.
between
in interface IdentityQueryBuilder
parameter
- The query parameter.x
- The first value.public Condition in(QueryParameter parameter, Object... x)
IdentityQueryBuilder
Create a condition for testing whether the query parameter is contained in a list of values.
in
in interface IdentityQueryBuilder
parameter
- The query parameter.x
- A list of values.public Sort asc(QueryParameter parameter)
IdentityQueryBuilder
Create an ascending order for the given parameter
. Once created, you can use it to sort the results of a
query.
asc
in interface IdentityQueryBuilder
parameter
- The query parameter to sort.public Sort desc(QueryParameter parameter)
IdentityQueryBuilder
Create an descending order for the given parameter
. Once created, you can use it to sort the results of a
query.
desc
in interface IdentityQueryBuilder
parameter
- The query parameter to sort.public <T extends IdentityType> IdentityQuery createIdentityQuery(Class<T> identityType)
IdentityQueryBuilder
Create an IdentityQuery
that can be used to query for IdentityType
instances of a the given identityType
.
createIdentityQuery
in interface IdentityQueryBuilder
identityType
- The type to search. If you provide the IdentityType
base interface any of its sub-types will be returned.Copyright © 2018 JBoss by Red Hat. All rights reserved.