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>
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.

Version:
2.0
Author:
nicklas
Last modified
$Date: 2012-03-23 08:57:12 +0100 (fr, 23 mar 2012) $
  • Method Summary

    Modifier and Type
    Method
    Description
    The type of the query element the implementation works for.
    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 that Query.reset() has been called on the given query.
  • Method Details

    • 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 query
      element - The query element
    • reset

      void reset(Q query)
      Called to indicate that Query.reset() has been called on the given query.
      Parameters:
      query - The query
      Since:
      3.2