|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AutoJoiner<Q extends Query,E extends QueryElement>
An AutoJoiner
is an object that automatically joins
other tables in query depending on other query elements. For example,
if we use the Dynamic.select(net.sf.basedb.core.ExtraValue, String)
to select
an extra value, the DynamicSpotQueryJoiners
makes sure that the table containing the extra values is joined to the
query by calling the
DynamicSpotQuery.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.
Method Summary | |
---|---|
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. |
Method Detail |
---|
Class<Q> getQueryClass()
Class<E> getElementClass()
void joinIfNeeded(Q query, E element)
query
- The queryelement
- The query element
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |