|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.qi4j.api.query.QueryExpressions
public final class QueryExpressions
Static factory methods for query expressions and operators.
Constructor Summary | |
---|---|
QueryExpressions()
|
Method Summary | ||
---|---|---|
static AndSpecification |
and(Specification<Composite> left,
Specification<Composite> right,
Specification<Composite>... optionalRight)
Create a new AND specification. |
|
static
|
association(Association<T> association)
Create a new Query Template AssociationFunction. |
|
static
|
contains(ManyAssociation<T> manyAssoc,
T value)
Create a new CONTAINS specification for a ManyAssociation. |
|
static
|
contains(Property<? extends java.util.Collection<T>> collectionProperty,
T value)
Create a new CONTAINS specification for a Collection Property. |
|
static
|
contains(Property<? extends java.util.Collection<T>> collectionProperty,
Variable variable)
Create a new CONTAINS specification for a Collection Property using named Variables. |
|
static
|
containsAll(Property<? extends java.util.Collection<T>> collectionProperty,
java.lang.Iterable<T> values)
Create a new CONTAINS ALL specification for a Collection Property. |
|
static
|
containsAllVariables(Property<? extends java.util.Collection<T>> collectionProperty,
java.lang.Iterable<Variable> variables)
Create a new CONTAINS ALL specification for a Collection Property using named Variables. |
|
static
|
eq(Association<T> association,
T value)
Create a new EQUALS specification for an Association. |
|
static
|
eq(Property<T> property,
T value)
Create a new EQUALS specification for a Property. |
|
static
|
eq(Property<T> property,
Variable variable)
Create a new EQUALS specification for a Property using a named Variable. |
|
static
|
ge(Property<T> property,
T value)
Create a new GREATER OR EQUALS specification for a Property. |
|
static
|
ge(Property<T> property,
Variable variable)
Create a new GREATER OR EQUALS specification for a Property using a named Variable. |
|
static
|
gt(Property<T> property,
T value)
Create a new GREATER THAN specification for a Property. |
|
static
|
gt(Property<T> property,
Variable variable)
Create a new GREATER THAN specification for a Property using a named Variable. |
|
static
|
isNotNull(Association<T> association)
Create a new NOT NULL specification for an Association. |
|
static
|
isNotNull(Property<T> property)
Create a new NOT NULL specification for a Property. |
|
static
|
isNull(Association<T> association)
Create a new NULL specification for an Association. |
|
static
|
isNull(Property<T> property)
Create a new NULL specification for a Property. |
|
static
|
le(Property<T> property,
T value)
Create a new LESS OR EQUALS specification for a Property. |
|
static
|
le(Property<T> property,
Variable variable)
Create a new LESS OR EQUALS specification for a Property using a named Variable. |
|
static
|
lt(Property<T> property,
T value)
Create a new LESSER THAN specification for a Property. |
|
static
|
lt(Property<T> property,
Variable variable)
Create a new LESSER THAN specification for a Property using a named Variable. |
|
static
|
manyAssociation(ManyAssociation<T> association)
Create a new Query Template ManyAssociationFunction. |
|
static MatchesSpecification |
matches(Property<java.lang.String> property,
java.lang.String regexp)
Create a new REGULAR EXPRESSION specification for a Property. |
|
static MatchesSpecification |
matches(Property<java.lang.String> property,
Variable variable)
Create a new REGULAR EXPRESSION specification for a Property using a named Variable. |
|
static
|
ne(Property<T> property,
T value)
Create a new NOT EQUALS specification for a Property. |
|
static
|
ne(Property<T> property,
Variable variable)
Create a new NOT EQUALS specification for a Property using a named Variable. |
|
static NotSpecification |
not(Specification<Composite> operand)
Create a new NOT specification. |
|
static
|
oneOf(ManyAssociation<T> association)
|
|
static OrSpecification |
or(Specification<Composite> left,
Specification<Composite> right,
Specification<Composite>... optionalRight)
Create a new OR specification. |
|
static
|
orderBy(Property<T> property)
Create a new Query ascending order segment for a Property. |
|
static
|
orderBy(Property<T> property,
OrderBy.Order order)
Create a new Query ordering segment for a Property. |
|
static
|
property(java.lang.Class<?> mixinClass,
java.lang.String fieldName)
Create a new Query Property instance. |
|
static
|
property(Property<T> property)
Create a new Query Template PropertyFunction. |
|
static
|
templateFor(java.lang.Class<T> clazz)
Create a Query Template using the given type. |
|
static
|
templateFor(java.lang.Class<T> mixinType,
Association<?> association)
Create a Query Template using the given mixin class and association. |
|
static Variable |
variable(java.lang.String name)
Create a new Query Variable. |
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 <T> T templateFor(java.lang.Class<T> clazz)
T
- the type of the templateclazz
- a class declaring the type of the template
public static <T> T templateFor(java.lang.Class<T> mixinType, Association<?> association)
T
- the type of the templatemixinType
- a class declaring the type of the templateassociation
- an association
public static <T> T oneOf(ManyAssociation<T> association)
public static Variable variable(java.lang.String name)
name
- a name for the Variable
public static <T> PropertyFunction<T> property(Property<T> property)
T
- type of the Propertyproperty
- a Property
public static <T> Property<T> property(java.lang.Class<?> mixinClass, java.lang.String fieldName)
T
- type of the PropertymixinClass
- mixin of the PropertyfieldName
- name of the Property field
public static <T> AssociationFunction<T> association(Association<T> association)
T
- type of the Associationassociation
- an Association
public static <T> ManyAssociationFunction<T> manyAssociation(ManyAssociation<T> association)
T
- type of the ManyAssociationassociation
- a ManyAssociation
public static AndSpecification and(Specification<Composite> left, Specification<Composite> right, Specification<Composite>... optionalRight)
left
- first operandright
- second operandoptionalRight
- optional operands
public static OrSpecification or(Specification<Composite> left, Specification<Composite> right, Specification<Composite>... optionalRight)
left
- first operandright
- second operandoptionalRight
- optional operands
public static NotSpecification not(Specification<Composite> operand)
operand
- specification to be negated
public static <T> EqSpecification<T> eq(Property<T> property, T value)
property
- a Propertyvalue
- its value
public static <T> EqSpecification<T> eq(Property<T> property, Variable variable)
property
- a Propertyvariable
- a Query Variable
public static <T> EqSpecification<java.lang.String> eq(Association<T> association, T value)
association
- an Associationvalue
- its value
public static <T> GeSpecification<T> ge(Property<T> property, T value)
property
- a Propertyvalue
- its value
public static <T> GeSpecification<T> ge(Property<T> property, Variable variable)
property
- a Propertyvariable
- a Query Variable
public static <T> GtSpecification<T> gt(Property<T> property, T value)
property
- a Propertyvalue
- its value
public static <T> GtSpecification<T> gt(Property<T> property, Variable variable)
property
- a Propertyvariable
- a Query Variable
public static <T> LeSpecification<T> le(Property<T> property, T value)
property
- a Propertyvalue
- its value
public static <T> LeSpecification<T> le(Property<T> property, Variable variable)
property
- a Propertyvariable
- a Query Variable
public static <T> LtSpecification<T> lt(Property<T> property, T value)
property
- a Propertyvalue
- its value
public static <T> LtSpecification<T> lt(Property<T> property, Variable variable)
property
- a Propertyvariable
- a Query Variable
public static <T> NeSpecification<T> ne(Property<T> property, T value)
property
- a Propertyvalue
- its value
public static <T> NeSpecification<T> ne(Property<T> property, Variable variable)
property
- a Propertyvariable
- a Query Variable
public static MatchesSpecification matches(Property<java.lang.String> property, java.lang.String regexp)
property
- a Propertyregexp
- its value
public static MatchesSpecification matches(Property<java.lang.String> property, Variable variable)
property
- a Propertyvariable
- a Query Variable
public static <T> PropertyNotNullSpecification<T> isNotNull(Property<T> property)
property
- a Property
public static <T> PropertyNullSpecification<T> isNull(Property<T> property)
property
- a Property
public static <T> AssociationNotNullSpecification<T> isNotNull(Association<T> association)
association
- an Association
public static <T> AssociationNullSpecification<T> isNull(Association<T> association)
association
- an Association
public static <T> ContainsAllSpecification<T> containsAll(Property<? extends java.util.Collection<T>> collectionProperty, java.lang.Iterable<T> values)
collectionProperty
- a Collection Propertyvalues
- its values
public static <T> ContainsAllSpecification<T> containsAllVariables(Property<? extends java.util.Collection<T>> collectionProperty, java.lang.Iterable<Variable> variables)
collectionProperty
- a Collection Propertyvariables
- named Variables
public static <T> ContainsSpecification<T> contains(Property<? extends java.util.Collection<T>> collectionProperty, T value)
collectionProperty
- a Collection Propertyvalue
- the value
public static <T> ContainsSpecification<T> contains(Property<? extends java.util.Collection<T>> collectionProperty, Variable variable)
collectionProperty
- a Collection Propertyvariable
- named Variable
public static <T> ManyAssociationContainsSpecification<T> contains(ManyAssociation<T> manyAssoc, T value)
manyAssoc
- a ManyAssociationvalue
- the value
public static <T> OrderBy orderBy(Property<T> property)
T
- type of the Propertyproperty
- a Property
public static <T> OrderBy orderBy(Property<T> property, OrderBy.Order order)
T
- type of the Propertyproperty
- a Propertyorder
- ascending or descending
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |