3.0.4: 2012-03-05

net.sf.basedb.core
Class DynamicReporterQuery

java.lang.Object
  extended by net.sf.basedb.core.AbstractQuery
      extended by net.sf.basedb.core.AbstractSqlQuery
          extended by net.sf.basedb.core.DynamicReporterQuery
All Implemented Interfaces:
Query, SqlQuery

public class DynamicReporterQuery
extends AbstractSqlQuery

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: 2011-08-30 15:49:58 +0200 (Tue, 30 Aug 2011) $

Nested Class Summary
private static class DynamicReporterQuery.ReporterListJoiner
          Auto joiner for reporter lists.
 
Field Summary
private  Set<Object> joinedItems
           
private  RealTable rootTable
           
 
Constructor Summary
DynamicReporterQuery()
          Create a new dynamic query for reporter data.
 
Method Summary
(package private)  Select[] getDefaultSelects()
          No default selection.
static DynamicReporterQuery.ReporterListJoiner getReporterListJoiner(JoinType joinType)
          Get a joiner instance for reporter lists for the specified join type.
 String getRootAlias()
          The alias of the item that is returned by this query.
(package private)  RealTable getRootTable()
           
 boolean isReadonly()
          If this query is readonly and cannot be structurally modified.
 void joinReporterList(ReporterList reporterList, JoinType joinType)
          Makes a join with a ReporterList
 void setAutoJoinType(JoinType joinType)
          Specify the join type of automatic joins.
 
Methods inherited from class net.sf.basedb.core.AbstractSqlQuery
bindLimits, count, getQueryType, iterate, parseParameters, setParameters
 
Methods inherited from class net.sf.basedb.core.AbstractQuery
addAutoJoiner, getCountQuery, getFirstResult, getMainQuery, getMaxResults, getParameterNames, getParameters, getParameterType, getParameterValue, getPermanentSelects, getQueryParameter, getQuerySection, getSelects, group, groupPermanent, hasParameterValue, having, havingPermanent, isCounting, isDistinct, isReturningTotalCount, join, joinPermanent, order, orderPermanent, postProcessQuery, reset, resetTemporary, restrict, restrictPermanent, select, selectPermanent, setCounting, setDistinct, setFirstResult, setMaxResults, setParameter, setPermanentParameter, setReturnTotalCount, temporaryJoin, temporarySelect, toQl, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.basedb.core.query.Query
addAutoJoiner, getFirstResult, getMaxResults, getParameterNames, getQueryParameter, getQuerySection, group, groupPermanent, hasParameterValue, having, havingPermanent, isCounting, isDistinct, isReturningTotalCount, join, joinPermanent, order, orderPermanent, reset, restrict, restrictPermanent, select, selectPermanent, setDistinct, setFirstResult, setMaxResults, setParameter, setPermanentParameter, setReturnTotalCount, toQl
 

Field Detail

rootTable

private final RealTable rootTable

joinedItems

private Set<Object> joinedItems
Constructor Detail

DynamicReporterQuery

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

Method Detail

getRootAlias

public String getRootAlias()
The alias of the item that is returned by this query.

See Also:
Item.getAlias()

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

getRootTable

RealTable getRootTable()

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

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

3.0.4: 2012-03-05