public class AnnotationInRestriction extends AnnotationRestriction
Annotations
AnnotationRestriction.Options
Modifier and Type | Field and Description |
---|---|
private java.util.List<?> |
values |
alias, annotationTypeId, options, valueType
Constructor and Description |
---|
AnnotationInRestriction(java.lang.String alias,
AnnotationType annotationType,
AnnotationRestriction.Options options,
java.lang.Object... values)
Create a new annotation restriction.
|
AnnotationInRestriction(java.lang.String alias,
AnnotationType annotationType,
boolean includePrimary,
boolean includeInherited,
java.lang.Object... values)
Deprecated.
In 3.11, use
#AnnotationInRestriction(String, AnnotationType, Options, Object...) instead |
AnnotationInRestriction(java.lang.String alias,
AnnotationType annotationType,
boolean includeInheriting,
java.lang.Object... values)
Deprecated.
In 3.5; use
AnnotationInRestriction(String, AnnotationType, boolean, boolean, Object...) instead |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other)
This restriction is equal to another AnnotationInRestriction if they
have the same annotation type, list of values and inheritance setting.
|
(package private) java.lang.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) . |
getChildren, maybeEquals, notAmongSelected, toQl
@Deprecated public AnnotationInRestriction(java.lang.String alias, AnnotationType annotationType, boolean includeInheriting, java.lang.Object... values) throws InvalidDataException
AnnotationInRestriction(String, AnnotationType, boolean, boolean, Object...)
insteadInvalidDataException
@Deprecated public AnnotationInRestriction(java.lang.String alias, AnnotationType annotationType, boolean includePrimary, boolean includeInherited, java.lang.Object... values) throws InvalidDataException
#AnnotationInRestriction(String, AnnotationType, Options, Object...)
insteadInvalidDataException
public AnnotationInRestriction(java.lang.String alias, AnnotationType annotationType, AnnotationRestriction.Options options, java.lang.Object... values) throws InvalidDataException
alias
- The alias to use in the restriction.annotationType
- The annotation type to use in the queryoptions
- Options that specify which annotations to consider when searchingvalues
- An array of values, each value must be of the
correct value type for the annotation as defined by the
AnnotationType.getValueType()
propertyInvalidDataException
- If any of the parameters are null
or the array is empty or not follow the rules above.java.lang.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(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class AnnotationRestriction