Package net.sf.basedb.core
Class HqlQueryJoiners.AnnotationJoiner
- java.lang.Object
-
- net.sf.basedb.core.HqlQueryJoiners.AnnotationJoiner
-
- All Implemented Interfaces:
AutoJoiner<HqlQuery,AnnotationExpression>
- Enclosing class:
- HqlQueryJoiners
private static class HqlQueryJoiners.AnnotationJoiner extends Object implements AutoJoiner<HqlQuery,AnnotationExpression>
Joiner for annotations.- Since:
- 3.2
-
-
Field Summary
Fields Modifier and Type Field Description private Set<AnnotationType>
hasJoined
private JoinType
joinType
-
Constructor Summary
Constructors Modifier Constructor Description private
AnnotationJoiner(JoinType joinType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<AnnotationExpression>
getElementClass()
The type of the query element the implementation works for.Class<HqlQuery>
getQueryClass()
The type of the query the implementation works for.void
joinIfNeeded(HqlQuery query, AnnotationExpression element)
Automatically join the tables that is is needed by the query element unless they are already joined.void
reset(HqlQuery query)
Called to indicate thatQuery.reset()
has been called on the given query.
-
-
-
Field Detail
-
joinType
private final JoinType joinType
-
hasJoined
private final Set<AnnotationType> hasJoined
-
-
Constructor Detail
-
AnnotationJoiner
private AnnotationJoiner(JoinType joinType)
-
-
Method Detail
-
getQueryClass
public Class<HqlQuery> getQueryClass()
Description copied from interface:AutoJoiner
The type of the query the implementation works for. This can be an actual subclass or a superclass.- Specified by:
getQueryClass
in interfaceAutoJoiner<HqlQuery,AnnotationExpression>
- Returns:
- A class object representing the query type
-
getElementClass
public Class<AnnotationExpression> getElementClass()
Description copied from interface:AutoJoiner
The type of the query element the implementation works for. This can be an actual subclass or a superclass.- Specified by:
getElementClass
in interfaceAutoJoiner<HqlQuery,AnnotationExpression>
- Returns:
- A class object representing the query element type
-
joinIfNeeded
public void joinIfNeeded(HqlQuery query, AnnotationExpression element)
Description copied from interface:AutoJoiner
Automatically join the tables that is is needed by the query element unless they are already joined.- Specified by:
joinIfNeeded
in interfaceAutoJoiner<HqlQuery,AnnotationExpression>
- Parameters:
query
- The queryelement
- The query element
-
reset
public void reset(HqlQuery query)
Description copied from interface:AutoJoiner
Called to indicate thatQuery.reset()
has been called on the given query.- Specified by:
reset
in interfaceAutoJoiner<HqlQuery,AnnotationExpression>
- Parameters:
query
- The query
-
-