public class AnnotationBetweenRestriction extends AnnotationRestriction
Annotations
AnnotationRestriction.Options
Modifier and Type | Field and Description |
---|---|
private Object |
highValue |
private Object |
lowValue |
alias, annotationTypeId, options, valueType
Constructor and Description |
---|
AnnotationBetweenRestriction(String alias,
AnnotationType annotationType,
Object lowValue,
Object highValue,
AnnotationRestriction.Options options)
Create a new annotation restriction.
|
AnnotationBetweenRestriction(String alias,
AnnotationType annotationType,
Object lowValue,
Object highValue,
boolean includeInherited)
Deprecated.
|
AnnotationBetweenRestriction(String alias,
AnnotationType annotationType,
Object lowValue,
Object highValue,
boolean includePrimary,
boolean includeInherited)
Deprecated.
In 3.11, use
#AnnotationBetweenRestriction(String, AnnotationType, Object, Object, Options) instead |
AnnotationBetweenRestriction(String alias,
int annotationTypeId,
Type valueType,
Object lowValue,
Object highValue,
boolean includeInheriting)
Deprecated.
|
AnnotationBetweenRestriction(String alias,
int annotationTypeId,
Type valueType,
Object lowValue,
Object highValue,
boolean includePrimary,
boolean includeInherited)
Deprecated.
In 3.11, use
#AnnotationBetweenRestriction(String, AnnotationType, Object, Object, Options) instead |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other)
This restriction is equal to another AnnotationBetweenRestriction if they
have the same annotation type, upper and lower bound and inheritance setting.
|
(package private) String |
getRestrictionSql(Query query,
DbControl dc)
Get an SQL fragment that includes the actual restriction.
|
int |
hashCode() |
(package private) void |
setRestrictionParameters(SQLQuery query)
Set the value for all parameters defined in the SQL fragment
returned by
AnnotationRestriction.getRestrictionSql(Query, DbControl) . |
String |
toString() |
getChildren, maybeEquals, notAmongSelected, toQl
@Deprecated public AnnotationBetweenRestriction(String alias, AnnotationType annotationType, Object lowValue, Object highValue, boolean includeInherited) throws InvalidDataException
AnnotationBetweenRestriction(String, AnnotationType, Object, Object, boolean, boolean)
insteadInvalidDataException
@Deprecated public AnnotationBetweenRestriction(String alias, int annotationTypeId, Type valueType, Object lowValue, Object highValue, boolean includeInheriting) throws InvalidDataException
AnnotationBetweenRestriction(String, int, Type, Object, Object, boolean, boolean)
insteadInvalidDataException
@Deprecated public AnnotationBetweenRestriction(String alias, AnnotationType annotationType, Object lowValue, Object highValue, boolean includePrimary, boolean includeInherited) throws InvalidDataException
#AnnotationBetweenRestriction(String, AnnotationType, Object, Object, Options)
insteadInvalidDataException
@Deprecated public AnnotationBetweenRestriction(String alias, int annotationTypeId, Type valueType, Object lowValue, Object highValue, boolean includePrimary, boolean includeInherited) throws InvalidDataException
#AnnotationBetweenRestriction(String, AnnotationType, Object, Object, Options)
insteadInvalidDataException
public AnnotationBetweenRestriction(String alias, AnnotationType annotationType, Object lowValue, Object highValue, AnnotationRestriction.Options options) throws InvalidDataException
alias
- The alias of a joined item where the annotations are
located or null to use the root entity of the queryannotationType
- The annotation type to use in the querylowValue
- The low value to use in the query, it must be of the
correct value type for the annotation as defined by the
valueType propertyhighValue
- The high value to use in the query, it must be of the
correct value type for the annotation as defined by the
valueType propertyoptions
- Options that specify which annotations to consider when searchingInvalidDataException
- If any of the parameters are null
or not follow the rules above.String getRestrictionSql(Query query, DbControl dc) throws BaseException
AnnotationRestriction
v.value = :theValueThe
setRestrictionParameters
method is called to
allow the subclass to set the value of the parameters specified
in the SQL fragment.getRestrictionSql
in class AnnotationRestriction
query
- The query object we are about to executeBaseException
AnnotationRestriction.setRestrictionParameters(SQLQuery)
void setRestrictionParameters(SQLQuery query)
AnnotationRestriction
AnnotationRestriction.getRestrictionSql(Query, DbControl)
.setRestrictionParameters
in class AnnotationRestriction
query
- The Hibernate SQLQuery
object which is
used to query the databasepublic boolean equals(Object other)
public int hashCode()
hashCode
in class AnnotationRestriction