2.9.0: 2008-11-26

net.sf.basedb.core
Class DynamicSpotQuery

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

public class DynamicSpotQuery
extends DynamicQuery

Represents a query for spot information in the dynamic database. A single query object may query against data in one bioassayset at a time. Use factory methods in the Dynamic class to join other tables and create restrictions based on the data in those tables. You may of course also use the regular expressions and restrictions from the Expressions, Restrictions and other classes.

This type of query is executed by the AbstractSqlQuery.iterate(DbControl) method and returns the result as a DynamicResultIterator.

Version:
2.0
Author:
Nicklas
See Also:
BioAssaySet.getSpotData()
Last modified
$Date: 2008-09-11 22:11:02 +0200 (Thu, 11 Sep 2008) $

Field Summary
private  Select[] defaultSelects
           
private  Set<Object> joinedItems
           
 
Constructor Summary
DynamicSpotQuery(DataCube cube)
          Create a new dynamic query.
 
Method Summary
(package private)  Select[] getDefaultSelects()
          Default selection: column, postion, ch1, ch2, ...
 void joinExtraValue(ExtraValue extraValue, JoinType joinType)
          Join extra values in the query.
 void joinRawData(JoinType joinType)
          Join information about raw data in the query.
 void joinReporterList(ReporterList reporterList, JoinType joinType)
          Makes a join with a ReporterList
 void joinReporters(JoinType joinType)
          Join information about reporters in the query.
 void reset()
          Reset join information.
 void setAutoJoinType(JoinType joinType)
          Specify the join type of automatic joins.
 
Methods inherited from class net.sf.basedb.core.DynamicQuery
getDataCube, getRootAlias, getRootTable, getVirtualDb
 
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, isReadonly, isReturningTotalCount, join, joinPermanent, order, orderPermanent, 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, isReadonly, isReturningTotalCount, join, joinPermanent, order, orderPermanent, restrict, restrictPermanent, select, selectPermanent, setDistinct, setFirstResult, setMaxResults, setParameter, setPermanentParameter, setReturnTotalCount, toQl
 

Field Detail

defaultSelects

private Select[] defaultSelects

joinedItems

private Set<Object> joinedItems
Constructor Detail

DynamicSpotQuery

DynamicSpotQuery(DataCube cube)
Create a new dynamic query.

Parameters:
cube - The cube to query against
Method Detail

getDefaultSelects

Select[] getDefaultSelects()
Default selection: column, postion, ch1, ch2, ...

Specified by:
getDefaultSelects in class AbstractSqlQuery

reset

public void reset()
Reset join information.

Specified by:
reset in interface Query
Overrides:
reset in class AbstractQuery

joinReporters

public void joinReporters(JoinType joinType)
                   throws InvalidDataException
Join information about reporters in the query. Now it becomes possible to select reporter data or restrict the results based on reporter information.

Parameters:
joinType - The type of join. Can not be null.
Throws:
InvalidDataException - If joinType parameter is null.
See Also:
Dynamic.selectReporter(String), Dynamic.reporter(String)

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.
See Also:
JoinType

joinRawData

public void joinRawData(JoinType joinType)
                 throws InvalidDataException
Join information about raw data in the query. Now it becomes possible to select raw data or restrict the results based on values in the raw data.

Parameters:
joinType - The type of join. Can not be null.
Throws:
InvalidDataException - If joinType parameter is null.
See Also:
Dynamic.selectRawData(String), Dynamic.rawData(String)

joinExtraValue

public void joinExtraValue(ExtraValue extraValue,
                           JoinType joinType)
                    throws InvalidDataException
Join extra values in the query. Now it becomes possible to select those extra values or use them for restrictions.

Parameters:
extraValue - The extra values to join. Can not be null.
joinType - The type of join. Can not be null.
Throws:
InvalidDataException - If any of the required parameters are null.
See Also:
Dynamic.select(ExtraValue, String), Dynamic.extraValue(ExtraValue)

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

Parameters:
joinType - The type of the automatic joins

2.9.0: 2008-11-26