|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.basedb.core.AnnotationRestriction
net.sf.basedb.core.HasAnnotationRestriction
public class HasAnnotationRestriction
Restricts a query by the presence of absence of an annotation.
Annotations| Field Summary | |
|---|---|
private boolean |
hasBeenAnnotatated
|
| Fields inherited from class net.sf.basedb.core.AnnotationRestriction |
|---|
alias, annotationTypeId, includeInheriting, valueType |
| Constructor Summary | |
|---|---|
HasAnnotationRestriction(String alias,
AnnotationType annotationType,
boolean hasBeenAnnotatated,
boolean includeInheriting)
Create a new restriction that checks if an item has been annotatated or not. |
|
HasAnnotationRestriction(String alias,
int annotationTypeId,
boolean hasBeenAnnotatated,
boolean includeInheriting)
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object other)
This restriction is equal to another HasAnnotationRestriction if they have the same annotation type, inheritance setting and annotation check. |
(package private) String |
getRestrictionSql(Query query,
DbControl dc)
Get an SQL fragment that includes the actual restriction. |
int |
hashCode()
|
(package private) boolean |
notAmongSelected()
If the main restriction should match items that had annotations among the selected annotation sets, or not. |
(package private) void |
setRestrictionParameters(SQLQuery query)
Set the value for all parameters defined in the SQL fragment returned by AnnotationRestriction.getRestrictionSql(Query, DbControl). |
| Methods inherited from class net.sf.basedb.core.AnnotationRestriction |
|---|
getChildren, maybeEquals, toQl |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private boolean hasBeenAnnotatated
| Constructor Detail |
|---|
public HasAnnotationRestriction(String alias,
AnnotationType annotationType,
boolean hasBeenAnnotatated,
boolean includeInheriting)
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 queryhasBeenAnnotatated - TRUE to look for items that has been annotated with the given
annotation type, FALSE to look for items that hasn'tincludeInheriting - If items inherting the annotation should be returned
by the query or not
public HasAnnotationRestriction(String alias,
int annotationTypeId,
boolean hasBeenAnnotatated,
boolean includeInheriting)
HasAnnotationRestriction(String, AnnotationType, boolean, boolean)| Method Detail |
|---|
String getRestrictionSql(Query query,
DbControl dc)
throws BaseException
AnnotationRestriction
v.value = :theValue
The setRestrictionParameters method is called to
allow the subclass to set the value of the parameters specified
in the SQL fragment.
getRestrictionSql in class AnnotationRestrictionquery - The query object we are about to execute
BaseExceptionAnnotationRestriction.setRestrictionParameters(SQLQuery)void setRestrictionParameters(SQLQuery query)
AnnotationRestrictionAnnotationRestriction.getRestrictionSql(Query, DbControl).
setRestrictionParameters in class AnnotationRestrictionquery - The Hibernate SQLQuery object which is
used to query the databaseboolean notAmongSelected()
AnnotationRestriction
notAmongSelected in class AnnotationRestrictionpublic boolean equals(Object other)
equals in class Objectpublic int hashCode()
hashCode in class AnnotationRestriction
|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||