|
3.2.1: 2012-12-13 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.basedb.core.AbstractQuery
net.sf.basedb.core.AbstractSqlQuery
net.sf.basedb.core.DynamicReporterQuery
public class DynamicReporterQuery
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.
Reporter.getDynamicQuery()
Nested Class Summary | |
---|---|
(package private) static class |
DynamicReporterQuery.MasterReporterJoiner
Auto joiner for master reporter table. |
(package private) static class |
DynamicReporterQuery.ReporterListJoiner
Auto joiner for reporter lists. |
Nested classes/interfaces inherited from class net.sf.basedb.core.AbstractSqlQuery |
---|
AbstractSqlQuery.CountWork |
Field Summary | |
---|---|
private boolean |
hasClonedReporters
|
private Set<Object> |
joinedItems
|
private String |
rootAlias
|
private boolean |
useClonedReporters
|
private VirtualDb |
virtualDb
|
Constructor Summary | |
---|---|
DynamicReporterQuery()
Create a new dynamic query for reporter data. |
|
DynamicReporterQuery(VirtualDb vdb)
Create a new dynamic query for reporter data using cloned reporter information. |
Method Summary | |
---|---|
(package private) Select[] |
getDefaultSelects()
No default selection. |
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. |
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. |
VirtualDb |
getVirtualDb()
Get the virtual database that this query is using. |
boolean |
hasClonedReporters()
Check if the virtual database that this query is using has cloned reporter annotations or not. |
boolean |
isReadonly()
If this query is readonly and cannot be structurally modified. |
void |
joinMasterReporters(JoinType joinType)
Join the master reporter table into this query. |
void |
joinReporterList(ReporterList reporterList,
JoinType joinType)
Makes a join with a ReporterList |
void |
setAutoJoinType(JoinType joinType)
Specify the join type of automatic joins. |
void |
setUseClonedReporters(boolean useClonedReporters)
Set if cloned reporters should be used by default or not. |
boolean |
useClonedReporters()
Checks if this query is using cloned reporter or not by default. |
Methods inherited from class net.sf.basedb.core.AbstractSqlQuery |
---|
bindLimits, closeResultSet, closeStatement, count, getQueryType, iterate, parseParameters, releaseSavepoint, rollbackToSavepoint, setParameters |
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, isFailSafe, isReturningTotalCount, join, joinPermanent, order, orderPermanent, reset, restrict, restrictPermanent, select, selectPermanent, setDistinct, setFailSafe, setFirstResult, setMaxResults, setParameter, setPermanentParameter, setReturnTotalCount, toQl |
Field Detail |
---|
private final String rootAlias
private final VirtualDb virtualDb
private final boolean hasClonedReporters
private boolean useClonedReporters
private Set<Object> joinedItems
Constructor Detail |
---|
DynamicReporterQuery()
DynamicReporterQuery(VirtualDb vdb)
Method Detail |
---|
public String getRootAlias()
getRootAlias
in interface Query
Item.getAlias()
public boolean isReadonly()
Query
Query.reset()
would unlock the query and allow it to be modified again.
isReadonly
in interface Query
isReadonly
in class AbstractQuery
Select[] getDefaultSelects()
getDefaultSelects
in class AbstractSqlQuery
public boolean hasClonedReporters()
hasClonedReporters
in interface ClonableReporterQuery
public boolean useClonedReporters()
useClonedReporters
in interface ClonableReporterQuery
public void setUseClonedReporters(boolean useClonedReporters)
setUseClonedReporters
in interface ClonableReporterQuery
useClonedReporters
- TRUE to use cloned reporters by default, FALSE
to use the master reporterspublic VirtualDb getVirtualDb()
getVirtualDb
in interface ClonableReporterQuery
public void joinReporterList(ReporterList reporterList, JoinType joinType)
ReporterList
reporterList
- To do the join on.joinType
- The join type to use.JoinType
public void joinMasterReporters(JoinType joinType)
joinType
- The join type to usepublic void setAutoJoinType(JoinType joinType)
JoinType.LEFT
. This setting doesn't affect joins that has been made
directly to the query.
joinType
- The type of the automatic joinspublic static DynamicReporterQuery.ReporterListJoiner getReporterListJoiner(JoinType joinType)
joinType
- The type of joinpublic static DynamicReporterQuery.MasterReporterJoiner getMasterReporterJoiner(JoinType joinType)
joinType
- The type of join
|
3.2.1: 2012-12-13 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |