|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.qi4j.api.query.QueryExpressions
public final class QueryExpressions
Static factory methods for query expressions and operators.
Constructor Summary | |
---|---|
QueryExpressions()
|
Method Summary | ||
---|---|---|
static Conjunction |
and(BooleanExpression left,
BooleanExpression right,
BooleanExpression... optionalRight)
Conjunction factory method. |
|
static
|
contains(ManyAssociation<T> manyAssoc,
T value)
|
|
static
|
contains(Property<C> property,
T value)
|
|
static
|
containsAll(Property<C> property,
C value)
|
|
static
|
eq(Association<T> property,
T value)
EqualsPredicate factory method. |
|
static
|
eq(Association<T> property,
VariableValueExpression<T> valueExpression)
EqualsPredicate factory method. |
|
static
|
eq(Property<T> property,
T value)
EqualsPredicate factory method. |
|
static
|
eq(Property<T> property,
VariableValueExpression<T> valueExpression)
EqualsPredicate factory method. |
|
static
|
ge(Property<T> property,
T value)
GreaterOrEqualPredicate factory method. |
|
static
|
ge(Property<T> property,
VariableValueExpression<T> valueExpression)
GreaterOrEqualPredicate factory method. |
|
static
|
gt(Property<T> property,
T value)
GreaterThanPredicate factory method. |
|
static
|
gt(Property<T> property,
VariableValueExpression<T> valueExpression)
GreaterThanPredicate factory method. |
|
static AssociationIsNotNullPredicate |
isNotNull(Association<?> association)
AssociationIsNotNullPredicate factory method. |
|
static
|
isNotNull(Property<T> property)
PropertyIsNotNullPredicate factory method. |
|
static AssociationIsNullPredicate |
isNull(Association<?> association)
AssociationIsNullPredicate factory method. |
|
static
|
isNull(Property<T> property)
PropertyIsNullPredicate factory method. |
|
static
|
le(Property<T> property,
T value)
LessOrEqualPredicate factory method. |
|
static
|
le(Property<T> property,
VariableValueExpression<T> valueExpression)
LessOrEqualPredicate factory method. |
|
static
|
lt(Property<T> property,
T value)
LessThanPredicate factory method. |
|
static
|
lt(Property<T> property,
VariableValueExpression<T> valueExpression)
LessThanPredicate factory method. |
|
static MatchesPredicate |
matches(Property<String> property,
String regexp)
MatchesPredicate factory method. |
|
static Negation |
not(BooleanExpression expression)
Negation factory method. |
|
static
|
notEq(Property<T> property,
T value)
NotEqualsPredicate factory method. |
|
static
|
notEq(Property<T> property,
VariableValueExpression<T> valueExpression)
NotEqualsPredicate factory method. |
|
static
|
oneOf(ManyAssociation<T> association)
When querying for a member of an association, use this to get a template for a single element, which can then be used in expressions. |
|
static Disjunction |
or(BooleanExpression left,
BooleanExpression right,
BooleanExpression... optionalRight)
Disjunction factory method. |
|
static
|
orderBy(Property<T> property)
OrderBy factory method (ascending order). |
|
static
|
orderBy(Property<T> property,
OrderBy.Order order)
OrderBy factory method. |
|
static void |
setProvider(QueryExpressionsProvider provider)
Set the provider to be used. |
|
static
|
templateFor(Class<T> mixinType)
Creates a template for the a mixin type to be used to access properties in type safe fashion. |
|
static
|
templateFor(Class<T> mixinType,
Object associatedEntity)
|
|
static
|
variable(String name)
VariableValueExpression factory method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueryExpressions()
Method Detail |
---|
public static void setProvider(QueryExpressionsProvider provider)
provider
- the QueryExpressionsProviderpublic static <T> T oneOf(ManyAssociation<T> association)
T
- association
-
public static <T> T templateFor(Class<T> mixinType)
mixinType
- mixin type
public static <T> T templateFor(Class<T> mixinType, Object associatedEntity)
public static <T> VariableValueExpression<T> variable(String name)
VariableValueExpression
factory method.
name
- variable name; cannot be null
VariableValueExpression
expression
IllegalArgumentException
- - If name is null or emptypublic static <T> PropertyIsNullPredicate<T> isNull(Property<T> property)
PropertyIsNullPredicate
factory method.
property
- filtered property; cannot be null
PropertyIsNullPredicate
expression
IllegalArgumentException
- - If property is nullpublic static AssociationIsNullPredicate isNull(Association<?> association)
AssociationIsNullPredicate
factory method.
association
- filtered association; cannot be null
AssociationIsNullPredicate
expression
IllegalArgumentException
- - If association is nullpublic static <T> PropertyIsNotNullPredicate<T> isNotNull(Property<T> property)
PropertyIsNotNullPredicate
factory method.
property
- filtered property; cannot be null
PropertyIsNotNullPredicate
expression
IllegalArgumentException
- - If property is nullpublic static AssociationIsNotNullPredicate isNotNull(Association<?> association)
AssociationIsNotNullPredicate
factory method.
association
- filtered association; cannot be null
AssociationIsNotNullPredicate
expression
IllegalArgumentException
- - If association is nullpublic static <T> EqualsPredicate<T> eq(Property<T> property, T value)
EqualsPredicate
factory method.
property
- filtered property; cannot be nullvalue
- expected value that property is equal to; cannot be null
EqualsPredicate
IllegalArgumentException
- - If property or value are nullpublic static <T> EqualsPredicate<T> eq(Property<T> property, VariableValueExpression<T> valueExpression)
EqualsPredicate
factory method.
property
- filtered property; cannot be nullvalueExpression
- expected value that property is equal to; cannot be null
EqualsPredicate
IllegalArgumentException
- - If property or value are nullpublic static <T> EqualsPredicate<String> eq(Association<T> property, T value)
EqualsPredicate
factory method.
property
- filtered property; cannot be nullvalue
- expected value that property is equal to; cannot be null
EqualsPredicate
IllegalArgumentException
- - If property or value are nullpublic static <T> EqualsPredicate<String> eq(Association<T> property, VariableValueExpression<T> valueExpression)
EqualsPredicate
factory method.
property
- filtered property; cannot be nullvalueExpression
- expected value that property is equal to; cannot be null
EqualsPredicate
IllegalArgumentException
- - If property or value are nullpublic static <T> NotEqualsPredicate<T> notEq(Property<T> property, T value)
NotEqualsPredicate
factory method.
property
- filtered property; cannot be nullvalue
- expected value that property is not equal to; cannot be null
NotEqualsPredicate
expression
IllegalArgumentException
- - If property or value are nullpublic static <T> NotEqualsPredicate<T> notEq(Property<T> property, VariableValueExpression<T> valueExpression)
NotEqualsPredicate
factory method.
property
- filtered property; cannot be nullvalueExpression
- expected value that property is not equal to; cannot be null
NotEqualsPredicate
expression
IllegalArgumentException
- - If property or value are nullpublic static <T> LessThanPredicate<T> lt(Property<T> property, T value)
LessThanPredicate
factory method.
property
- filtered property; cannot be nullvalue
- expected value that property is less than; cannot be null
LessThanPredicate
expression
IllegalArgumentException
- - If property or value are nullpublic static <T> LessThanPredicate<T> lt(Property<T> property, VariableValueExpression<T> valueExpression)
LessThanPredicate
factory method.
property
- filtered property; cannot be nullvalueExpression
- expected value that property is less than; cannot be null
LessThanPredicate
expression
IllegalArgumentException
- - If property or value are nullpublic static <T> LessOrEqualPredicate<T> le(Property<T> property, T value)
LessOrEqualPredicate
factory method.
property
- filtered property; cannot be nullvalue
- expected value that property is less than or equal to; cannot be null
LessOrEqualPredicate
expression
IllegalArgumentException
- - If property or value are nullpublic static <T> LessOrEqualPredicate<T> le(Property<T> property, VariableValueExpression<T> valueExpression)
LessOrEqualPredicate
factory method.
property
- filtered property; cannot be nullvalueExpression
- expected value that property is less than or equal to; cannot be null
LessOrEqualPredicate
expression
IllegalArgumentException
- - If property or value are nullpublic static <T> GreaterThanPredicate<T> gt(Property<T> property, T value)
GreaterThanPredicate
factory method.
property
- filtered property; cannot be nullvalue
- expected value that property is greater than; cannot be null
GreaterThanPredicate
expression
IllegalArgumentException
- - If property or value are nullpublic static <T> GreaterThanPredicate<T> gt(Property<T> property, VariableValueExpression<T> valueExpression)
GreaterThanPredicate
factory method.
property
- filtered property; cannot be nullvalueExpression
- expected value that property is greater than; cannot be null
GreaterThanPredicate
expression
IllegalArgumentException
- - If property or value are nullpublic static <T> GreaterOrEqualPredicate<T> ge(Property<T> property, T value)
GreaterOrEqualPredicate
factory method.
property
- filtered property; cannot be nullvalue
- expected value that property is greater than or equal; cannot be null
GreaterOrEqualPredicate
expression
IllegalArgumentException
- - If property or value are nullpublic static <T> GreaterOrEqualPredicate<T> ge(Property<T> property, VariableValueExpression<T> valueExpression)
GreaterOrEqualPredicate
factory method.
property
- filtered property; cannot be nullvalueExpression
- expected value that property is greater than or equal; cannot be null
GreaterOrEqualPredicate
expression
IllegalArgumentException
- - If property or value are nullpublic static MatchesPredicate matches(Property<String> property, String regexp)
MatchesPredicate
factory method.
property
- filtered property; cannot be nullregexp
- expected regexp that property should match to; cannot be null
MatchesPredicate
IllegalArgumentException
- - If property or value are nullpublic static Conjunction and(BooleanExpression left, BooleanExpression right, BooleanExpression... optionalRight)
Conjunction
factory method. Apply a logical "AND" between two (or more)
boolean expressions. Also known as "conjunction".
left
- left side boolean expression; cannot be nullright
- right side boolean expression; cannot be nulloptionalRight
- optional additional right side boolean expressions
Conjunction
operator
IllegalArgumentException
- - If left or right expressions are nullpublic static Disjunction or(BooleanExpression left, BooleanExpression right, BooleanExpression... optionalRight)
Disjunction
factory method. Apply a logical "OR" between two (or more) boolean
expressions. Also known as disjunction.
left
- left side boolean expression; cannot be nullright
- right side boolean expression; cannot be nulloptionalRight
- optional additional right side boolean expressions
Disjunction
operator
IllegalArgumentException
- - If left or right expressions are nullpublic static Negation not(BooleanExpression expression)
Negation
factory method. Apply a logical "NOT" to a boolean expression.
expression
- boolean expression; cannot be null; cannot be null
Negation
operator
IllegalArgumentException
- - If expression is nullpublic static <T,C extends Collection<T>> ContainsPredicate<T,C> contains(Property<C> property, T value)
public static <T> ManyAssociationContainsPredicate<T> contains(ManyAssociation<T> manyAssoc, T value)
public static <T,C extends Collection<T>> ContainsAllPredicate<T,C> containsAll(Property<C> property, C value)
public static <T> OrderBy orderBy(Property<T> property)
OrderBy
factory method (ascending order).
property
- sorting property; cannot be null
OrderBy
IllegalArgumentException
- - If property is nullpublic static <T> OrderBy orderBy(Property<T> property, OrderBy.Order order)
OrderBy
factory method.
property
- sorting property; cannot be nullorder
- sorting direction
OrderBy
IllegalArgumentException
- - If property is null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |