Package net.sf.basedb.core
Class DynamicRawDataQuery
java.lang.Object
net.sf.basedb.core.AbstractQuery
net.sf.basedb.core.AbstractSqlQuery
net.sf.basedb.core.DynamicRawDataQuery
Represents a query for raw 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.
This type of query is needed to bridge the gap between the dynamic and regular parts of the database. For example, a query of this type can be used by a batcher to insert the original intensities in a raw bioassayset.
- Version:
- 2.0
- Author:
- Nicklas
- See Also:
- Last modified
- $Date: 2017-12-08 14:18:12 +0100 (fr, 08 dec 2017) $
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
Auto joiner for raw bioassays.(package private) static class
Auto joiner for reporters.(package private) static class
Auto joiner for reporter lists.Nested classes/interfaces inherited from class net.sf.basedb.core.AbstractSqlQuery
AbstractSqlQuery.CountWork
-
Field Summary
Modifier and TypeFieldDescriptionprivate RawBioAssay
private final RawDataType
private final RealTable
-
Constructor Summary
ConstructorDescriptionDynamicRawDataQuery
(RawBioAssay rawBioAssay) Create a new dynamic query for raw data.DynamicRawDataQuery
(RawDataType rawDataType) Create a new dynamic query for raw data. -
Method Summary
Modifier and TypeMethodDescription(package private) Select[]
No default selection.getJepFunctions
(DbControl dc, boolean restrictions) Create custom JEP function that can be used with the current query.static DynamicRawDataQuery
getQuery
(Collection<RawBioAssay> raw) Create a new dynamic query for raw data.static DynamicRawDataQuery
getQuery
(RawBioAssay raw) Create a new dynamic query for raw data.The alias of the item that is returned by this query.(package private) RealTable
boolean
If this query is readonly and cannot be structurally modified.void
joinRawBioAssay
(JoinType joinType) Join information about raw bioassays in the query.void
joinReporterList
(ReporterList reporterList, JoinType joinType) Makes a join with aReporterList
void
joinReporters
(JoinType joinType) Join information about reporters in the query.void
setAutoJoinType
(JoinType joinType) Specify the join type of automatic joins.Methods inherited from class net.sf.basedb.core.AbstractSqlQuery
closeResultSet, closeStatement, count, getLimitHandler, getQueryType, getRowSelectionForLimitHandler, iterate, parseParameters, releaseSavepoint, rollbackToSavepoint, setParameters
Methods inherited from class net.sf.basedb.core.AbstractQuery
addAutoJoiner, getCountQuery, getFirstResult, getIdQuery, getMainQuery, getMaxResults, getParameterNames, getParameters, getParameterType, getParameterValue, getPermanentSelects, getQueryParameter, getQuerySection, getSelects, group, groupPermanent, hasParameterValue, having, havingPermanent, isCounting, isDistinct, isFailSafe, isReturningTotalCount, join, joinPermanent, order, orderPermanent, postProcessQuery, reset, resetTemporary, restrict, restrictPermanent, select, selectPermanent, setCounting, setDistinct, setFailSafe, 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, isFailSafe, isReturningTotalCount, join, joinPermanent, order, orderPermanent, reset, restrict, restrictPermanent, select, selectPermanent, setDistinct, setFailSafe, setFirstResult, setMaxResults, setParameter, setPermanentParameter, setReturnTotalCount, toQl
-
Field Details
-
rawDataType
-
rootTable
-
joinedItems
-
rawBioAssay
-
-
Constructor Details
-
DynamicRawDataQuery
DynamicRawDataQuery(RawBioAssay rawBioAssay) Create a new dynamic query for raw data. NOTE! This constructor doesn't add any restriction to the query. This must be done by the caller.- Parameters:
rawBioAssay
- The raw bioassay to query on
-
DynamicRawDataQuery
DynamicRawDataQuery(RawDataType rawDataType) Create a new dynamic query for raw data.- Parameters:
rawDataType
- The raw data type- Since:
- 3.1
-
-
Method Details
-
getQuery
Create a new dynamic query for raw data.- Parameters:
raw
- The raw bioassay to query on- Since:
- 3.9
-
getQuery
Create a new dynamic query for raw data.- Parameters:
raw
- The raw bioassays to query on which must all be of the same raw data type- Since:
- 3.9
-
getRootAlias
The alias of the item that is returned by this 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 toQuery.reset()
would unlock the query and allow it to be modified again.- Specified by:
isReadonly
in interfaceQuery
- Overrides:
isReadonly
in classAbstractQuery
- Returns:
- TRUE if the query is readonly, FALSE otherwise
-
getDefaultSelects
Select[] getDefaultSelects()No default selection.- Specified by:
getDefaultSelects
in classAbstractSqlQuery
-
getJepFunctions
Description copied from class:AbstractSqlQuery
Create custom JEP function that can be used with the current query. The actual function need to implement eitherJepExpressionFunction
orJepRestrictionFunction
.- Specified by:
getJepFunctions
in classAbstractSqlQuery
restrictions
- If FALSE the metod should only return functions that can be used asExpression
:s, otherwise it should return both expression and restriction functions
-
getRawDataType
-
getRootTable
RealTable getRootTable() -
getRawBioAssay
-
setAutoJoinType
Specify the join type of automatic joins. The default join type isJoinType.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.9
-
joinReporters
Join information about reporters in the query.- Parameters:
joinType
- The type of join. Can not be null.- Throws:
InvalidDataException
- If joinType parameter is null.- Since:
- 3.1
- See Also:
-
joinReporterList
Makes a join with aReporterList
- Parameters:
reporterList
- To do the join on.joinType
- The join type to use.- Since:
- 3.9
- See Also:
-
joinRawBioAssay
Join information about raw bioassays in the query.- Parameters:
joinType
- The type of join. Can not be null.- Throws:
InvalidDataException
- If joinType parameter is null.- Since:
- 3.9
-