Package net.sf.basedb.core.query
Interface AutoJoiner<Q extends Query,E extends QueryElement>
-
- All Known Implementing Classes:
DynamicPositionQueryJoiners.ExtraValueJoiner
,DynamicPositionQueryJoiners.ReporterJoiner
,DynamicPositionQueryJoiners.ReporterListJoiner
,DynamicRawDataQuery.RawBioAssayJoiner
,DynamicRawDataQuery.ReporterJoiner
,DynamicRawDataQuery.ReporterListJoiner
,DynamicReporterQuery.MasterReporterJoiner
,DynamicReporterQuery.ReporterListJoiner
,DynamicSpotQueryJoiners.ExtraValueJoiner
,DynamicSpotQueryJoiners.RawDataJoiner
,DynamicSpotQueryJoiners.ReporterJoiner
,DynamicSpotQueryJoiners.ReporterListJoiner
,HqlQueryJoiners.AnnotationJoiner
,HqlQueryJoiners.ReporterListJoiner
public interface AutoJoiner<Q extends Query,E extends QueryElement>
AnAutoJoiner
is an object that automatically joins other tables in query depending on other query elements. For example, if we use theDynamic.select(net.sf.basedb.core.ExtraValue, String)
to select an extra value, theDynamicSpotQueryJoiners
makes sure that the table containing the extra values is joined to the query by calling theDynamicSpotQuery.joinExtraValue(net.sf.basedb.core.ExtraValue, JoinType)
method.How to programmatically join the correct table differs from query type to query type and from query element to query element. Each combination of query and query element usually needs it's own implementation of this interface.
- Version:
- 2.0
- Author:
- nicklas
- Last modified
- $Date: 2012-03-23 08:57:12 +0100 (fr, 23 mar 2012) $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Class<E>
getElementClass()
The type of the query element the implementation works for.Class<Q>
getQueryClass()
The type of the query the implementation works for.void
joinIfNeeded(Q query, E element)
Automatically join the tables that is is needed by the query element unless they are already joined.void
reset(Q query)
Called to indicate thatQuery.reset()
has been called on the given query.
-
-
-
Method Detail
-
getQueryClass
Class<Q> getQueryClass()
The type of the query the implementation works for. This can be an actual subclass or a superclass.- Returns:
- A class object representing the query type
-
getElementClass
Class<E> getElementClass()
The type of the query element the implementation works for. This can be an actual subclass or a superclass.- Returns:
- A class object representing the query element type
-
joinIfNeeded
void joinIfNeeded(Q query, E element)
Automatically join the tables that is is needed by the query element unless they are already joined.- Parameters:
query
- The queryelement
- The query element
-
reset
void reset(Q query)
Called to indicate thatQuery.reset()
has been called on the given query.- Parameters:
query
- The query- Since:
- 3.2
-
-