|
3.2.4: 2013-12-06 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.basedb.core.query.Annotations
public class Annotations
A factory class to create restrictions based on annotation values.
Constructor Summary | |
---|---|
Annotations()
|
Method Summary | |
---|---|
static Restriction |
between(String alias,
AnnotationType annotationType,
Object lowValue,
Object highValue,
boolean includeInheriting)
Create a restriction that searches for annotations between two given values on the root or a joined entity of a query. |
static Restriction |
eq(String alias,
AnnotationType annotationType,
Object value,
boolean includeInheriting)
Create a restriction that searches for annotations equal to a given value on the root or a joined entity of a query. |
static Expression |
expression(AnnotationType annotationType)
Create an expression representing the value of an annotation to the root item of the query. |
static Expression |
expression(String alias,
AnnotationType annotationType)
Create an expression representing the value of an annotation to a joined item of the query. |
static Restriction |
gt(String alias,
AnnotationType annotationType,
Object value,
boolean includeInheriting)
Create a restriction that searches for annotations greater than a given value on the root or a joined entity of a query. |
static Restriction |
gteq(String alias,
AnnotationType annotationType,
Object value,
boolean includeInheriting)
Create a restriction that searches for annotations greater than or equal to a given value on the root or a joined entity of a query. |
static Restriction |
in(String alias,
AnnotationType annotationType,
boolean includeInheriting,
Object... values)
Create a restriction that searches for annotations on the root or a joined entity equal to any value in a list of given values. |
static Join |
innerJoin(AnnotationType annotationType,
String joinedAlias)
Create an inner join between the root element of a query and the annotation values for the given annotation type. |
static Join |
innerJoin(String alias,
AnnotationType annotationType,
String joinedAlias)
Create an inner join between an already joined element of a query and the annotation values for the given annotation type. |
static Join |
leftJoin(AnnotationType annotationType)
Create a left join between the root element of a query and the annotation values for the given annotation type. |
static Join |
leftJoin(String alias,
AnnotationType annotationType,
String joinedAlias)
Create a left join between an already joined element of a query and the annotation values for the given annotation type. |
static Restriction |
like(String alias,
AnnotationType annotationType,
Object value,
boolean includeInheriting)
Create a restriction that searches for annotations matching a given value on the root or a joined entity of a query. |
static Restriction |
lt(String alias,
AnnotationType annotationType,
Object value,
boolean includeInheriting)
Create a restriction that searches for annotations less than a given value on the root or a joined entity of a query. |
static Restriction |
lteq(String alias,
AnnotationType annotationType,
Object value,
boolean includeInheriting)
Create a restriction that searches for annotations less than or equal to a given value on the root or a joined entity of a query. |
static Restriction |
neq(String alias,
AnnotationType annotationType,
Object value,
boolean includeInheriting)
Create a restriction that searches for annotations not equal to a given value on the root or a joined entity of a query. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Annotations()
Method Detail |
---|
public static Restriction eq(String alias, AnnotationType annotationType, Object value, boolean includeInheriting) throws InvalidDataException
alias
- The alias of the joined entity or null to use the root elementannotationType
- The annotation type to search. Can not be null.value
- The value to search for. Can not be null.includeInheriting
- If items inheriting the annotation should be returned
by the query or not
InvalidDataException
- If annotationType or value are null.public static Restriction neq(String alias, AnnotationType annotationType, Object value, boolean includeInheriting) throws InvalidDataException
alias
- The alias of the joined entity or null to use the root elementannotationType
- The annotation type to search. Can not be null.value
- The value to search for. Can not be null.includeInheriting
- If items inheriting the annotation should be returned
by the query or not
InvalidDataException
- If annotationType or value are null.public static Restriction lt(String alias, AnnotationType annotationType, Object value, boolean includeInheriting) throws InvalidDataException
alias
- The alias of the joined entity or null to use the root elementannotationType
- The annotation type to search. Can not be null.value
- The value to search for. Can not be null.includeInheriting
- If items inheriting the annotation should be returned
by the query or not
InvalidDataException
- If annotationType parameter or value parameter are null.public static Restriction lteq(String alias, AnnotationType annotationType, Object value, boolean includeInheriting) throws InvalidDataException
alias
- The alias of the joined entity or null to use the root elementannotationType
- The annotation type to search. Can not be null.value
- The value to search for. Can not be null.includeInheriting
- If items inheriting the annotation should be returned
by the query or not
InvalidDataException
- If annotationType parameter or value parameter are null.public static Restriction gt(String alias, AnnotationType annotationType, Object value, boolean includeInheriting) throws InvalidDataException
alias
- The alias of the joined entity or null to use the root elementannotationType
- The annotation type to search. Can not be null.value
- The value to search for. Can not be null.includeInheriting
- If items inheriting the annotation should be returned
by the query or not
InvalidDataException
- If annotationType parameter or value parameter are null.public static Restriction gteq(String alias, AnnotationType annotationType, Object value, boolean includeInheriting) throws InvalidDataException
alias
- The alias of the joined entity or null to use the root elementannotationType
- The annotation type to search. Can not be null.value
- The value to search for. Can not be null.includeInheriting
- If items inheriting the annotation should be returned
by the query or not
InvalidDataException
- If annotationType parameter or value parameter are null.public static Restriction like(String alias, AnnotationType annotationType, Object value, boolean includeInheriting) throws InvalidDataException
alias
- The alias of the joined entity or null to use the root elementannotationType
- The annotation type to search. Can not be null.value
- The value to search for. Can not be null.includeInheriting
- If items inheriting the annotation should be returned
by the query or not
InvalidDataException
- If annotationType parameter or value parameter are null.public static Restriction between(String alias, AnnotationType annotationType, Object lowValue, Object highValue, boolean includeInheriting) throws InvalidDataException
alias
- The alias of the joined entity or null to use the root elementannotationType
- The annotation type to search. Can not be null.lowValue
- The lower bound. Can not be null.highValue
- The higher bound. Can not be null.includeInheriting
- If items inheriting the annotation should be returned
by the query or not
InvalidDataException
- If any of the required parameters are null.public static Restriction in(String alias, AnnotationType annotationType, boolean includeInheriting, Object... values) throws InvalidDataException
alias
- The alias of the joined entity or null to use the root elementannotationType
- The annotation type to search. Can not be null.includeInheriting
- If items inheriting the annotation should be returned
by the query or notvalues
- An array of values. Can not be null.
InvalidDataException
- If annotationType parameter or values parameter are nullpublic static Expression expression(AnnotationType annotationType)
annotationType
- The annotation type to generate an expression for
InvalidDataException
- If the annotationType is nullpublic static Expression expression(String alias, AnnotationType annotationType)
alias
- The alias of a joined item or null to use the root itemannotationType
- The annotation type to generate an expression for
InvalidDataException
- If the annotationType is nullpublic static Join innerJoin(AnnotationType annotationType, String joinedAlias)
annotationType
- The annotation type to to joinjoinedAlias
- The alias to use for the joined annotation values
InvalidDataException
- If the annotationType or joinedAlias is nullpublic static Join innerJoin(String alias, AnnotationType annotationType, String joinedAlias)
alias
- The alias of a joined item or null to use the root itemannotationType
- The annotation type to to joinjoinedAlias
- The alias to use for the joined annotation values
InvalidDataException
- If the annotationType or joinedAlias is nullpublic static Join leftJoin(AnnotationType annotationType)
annotationType
- The annotation type to to joinjoinedAlias
- The alias to use for the joined annotation values
InvalidDataException
- If the annotationType or joinedAlias is nullpublic static Join leftJoin(String alias, AnnotationType annotationType, String joinedAlias)
alias
- The alias of a joined item or null to use the root itemannotationType
- The annotation type to to joinjoinedAlias
- The alias to use for the joined annotation values
InvalidDataException
- If the annotationType or joinedAlias is null
|
3.2.4: 2013-12-06 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |