Class DynamicReporterQuery

All Implemented Interfaces:
ClonableReporterQuery, Query, SqlQuery

public class DynamicReporterQuery extends AbstractSqlQuery implements ClonableReporterQuery
Represents a query for reporter data in a "dynamic" way. The main difference from a client applications point of view, is that it is possible to specify which columns that should be selected. In a techinical point of view the difference is that we are using SQL instead of HQl.
Version:
2.4
Author:
Nicklas
See Also:
Last modified
$Date: 2017-12-08 14:18:12 +0100 (fr, 08 dec 2017) $
  • Field Details

    • rootAlias

      private final String rootAlias
    • virtualDb

      private final VirtualDb virtualDb
    • hasClonedReporters

      private final boolean hasClonedReporters
    • useClonedReporters

      private boolean useClonedReporters
    • joinedItems

      private Set<Object> joinedItems
  • Constructor Details

    • DynamicReporterQuery

      DynamicReporterQuery()
      Create a new dynamic query for reporter data.
    • DynamicReporterQuery

      DynamicReporterQuery(VirtualDb vdb)
      Create a new dynamic query for reporter data using cloned reporter information.
      Since:
      3.1
  • Method Details

    • getRootAlias

      public String getRootAlias()
      The alias of the item that is returned by this query.
      Specified by:
      getRootAlias in interface Query
      See Also:
    • isReadonly

      public boolean isReadonly()
      Description copied from interface: Query
      If this query is readonly and cannot be structurally modified. Ie. no more query elements can be added. It is still possible to set parameter values. A call to Query.reset() would unlock the query and allow it to be modified again.
      Specified by:
      isReadonly in interface Query
      Overrides:
      isReadonly in class AbstractQuery
      Returns:
      TRUE if the query is readonly, FALSE otherwise
    • getDefaultSelects

      Select[] getDefaultSelects()
      No default selection.
      Specified by:
      getDefaultSelects in class AbstractSqlQuery
    • getJepFunctions

      public JepFunction[] getJepFunctions(DbControl dc, boolean restrictions)
      The following JEP functions can be used:
      Specified by:
      getJepFunctions in class AbstractSqlQuery
      restrictions - If FALSE the metod should only return functions that can be used as Expression:s, otherwise it should return both expression and restriction functions
      Since:
      3.12
    • hasClonedReporters

      public boolean hasClonedReporters()
      Check if the virtual database that this query is using has cloned reporter annotations or not.
      Specified by:
      hasClonedReporters in interface ClonableReporterQuery
      Since:
      3.1
    • useClonedReporters

      public boolean useClonedReporters()
      Checks if this query is using cloned reporter or not by default. The default setting is to use cloned reporters if they are available in the experiment.
      Specified by:
      useClonedReporters in interface ClonableReporterQuery
      Returns:
      TRUE if this query is using cloned reporters, FALSE if not
      Since:
      3.1
    • setUseClonedReporters

      public void setUseClonedReporters(boolean useClonedReporters)
      Set if cloned reporters should be used by default or not.
      Specified by:
      setUseClonedReporters in interface ClonableReporterQuery
      Parameters:
      useClonedReporters - TRUE to use cloned reporters by default, FALSE to use the master reporters
      Since:
      3.1
    • getVirtualDb

      public VirtualDb getVirtualDb()
      Get the virtual database that this query is using.
      Specified by:
      getVirtualDb in interface ClonableReporterQuery
      Returns:
      A virtual database item (can be null if hasClonedReporter is false)
      Since:
      3.1
    • joinReporterList

      public void joinReporterList(ReporterList reporterList, JoinType joinType)
      Makes a join with a ReporterList
      Parameters:
      reporterList - To do the join on.
      joinType - The join type to use.
      Since:
      3.0
      See Also:
    • joinMasterReporters

      public void joinMasterReporters(JoinType joinType)
      Join the master reporter table into this query. This is ignored unless the query rooted at the cloned reporters table.
      Parameters:
      joinType - The join type to use
      Since:
      3.1
    • setAutoJoinType

      public void setAutoJoinType(JoinType joinType)
      Specify the join type of automatic joins. The default join type is JoinType.LEFT. This setting doesn't affect joins that has been made directly to the query.
      Parameters:
      joinType - The type of the automatic joins
      Since:
      3.0
    • getReporterListJoiner

      public static DynamicReporterQuery.ReporterListJoiner getReporterListJoiner(JoinType joinType)
      Get a joiner instance for reporter lists for the specified join type.
      Parameters:
      joinType - The type of join
      Since:
      3.0
    • getMasterReporterJoiner

      public static DynamicReporterQuery.MasterReporterJoiner getMasterReporterJoiner(JoinType joinType)
      Get a joiner instance for joining the master reporter table when the root query is against the cloned reporters table.
      Parameters:
      joinType - The type of join
      Since:
      3.1