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:
    Reporter.getDynamicQuery()
    Last modified
    $Date: 2017-12-08 14:18:12 +0100 (fr, 08 dec 2017) $
    • Field Detail

      • 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 Detail

      • 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 Detail

      • 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
      • 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:
        JoinType
      • 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