2.17.2: 2011-06-17

net.sf.basedb.core.query
Class Dynamic

java.lang.Object
  extended by net.sf.basedb.core.query.Dynamic

public class Dynamic
extends Object

A factory class to create expressions, joins, etc. that are only used by queries in the dynamic database. The elements will throw an UnsupportedOperationException if passed to a HQL query.

Version:
2.0
Author:
Nicklas
Last modified
$Date: 2009-04-06 14:52:39 +0200 (Mon, 06 Apr 2009) $

Constructor Summary
Dynamic()
           
 
Method Summary
static Expression column(VirtualColumn column)
          Create an expression representing a column in the root table: expression = rootAlias.columnName.
static Expression column(VirtualTable table, VirtualColumn column)
          Create an expression representing a column in a table: expression = tableAlias.columnName.
static Expression extraValue(ExtraValue extraValue)
          Create an expression representing the extra value of a spot or position.
static Restriction isNotPartOf(ReporterList reporterList)
           
static Restriction isPartOf(ReporterList reporterList)
           
static Expression meanRawData(String property)
          Create an expression representing the mean value of a property of a raw data spot. expression = mean(rawdata.property).
static Expression rawData(String property)
          Create an expression representing a property of a raw data spot.
static Expression reporter(String property)
          Create an expression representing a property of a reporter.
static Expression score(ReporterList reporterList)
           
static Select select(ExtraValue extraValue, String alias)
          Select an extra value.
static Select select(VirtualColumn column)
          Select a column in the root table.
static Select select(VirtualTable table, VirtualColumn column)
          Select a column in a joined or the root table.
static Select selectRawData(String property)
          Select a column in the raw data table.
static Select selectReporter(String property)
          Select a column in the reporters table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dynamic

public Dynamic()
Method Detail

select

public static Select select(VirtualColumn column)
                     throws InvalidDataException
Select a column in the root table.

Parameters:
column - The column to select
Returns:
The new selection element
Throws:
InvalidDataException - If the column is null
See Also:
select(VirtualTable, VirtualColumn)

select

public static Select select(VirtualTable table,
                            VirtualColumn column)
                     throws InvalidDataException
Select a column in a joined or the root table.

Parameters:
table - The joined table where the column is located, or null to use the root table
column - The column to select
Returns:
The new selection element
Throws:
InvalidDataException - If the column is null

selectReporter

public static Select selectReporter(String property)
                             throws InvalidDataException
Select a column in the reporters table. It is expected that reporters has been joined to the query.

Parameters:
property - The name of the property
Throws:
InvalidDataException - If the property is null
See Also:
DynamicSpotQuery.joinReporters(JoinType)

selectRawData

public static Select selectRawData(String property)
                            throws InvalidDataException
Select a column in the raw data table. It is expected that raw data has been joined to the query.

Parameters:
property - The name of the property
Throws:
InvalidDataException - If the property is null
See Also:
DynamicSpotQuery.joinRawData(JoinType)

select

public static Select select(ExtraValue extraValue,
                            String alias)
                     throws InvalidDataException
Select an extra value. It is expected that the extra value has been joined to the query.

Parameters:
extraValue - The extra value to select
alias - The alias of the extra value
Throws:
InvalidDataException - If the extraValue or alias is null
See Also:
DynamicSpotQuery.joinExtraValue(ExtraValue, JoinType)

column

public static Expression column(VirtualColumn column)
                         throws InvalidDataException
Create an expression representing a column in the root table: expression = rootAlias.columnName.

Parameters:
column - The column
Returns:
The new expression
Throws:
InvalidDataException - If the column is null
See Also:
column(VirtualTable, VirtualColumn)

column

public static Expression column(VirtualTable table,
                                VirtualColumn column)
                         throws InvalidDataException
Create an expression representing a column in a table: expression = tableAlias.columnName. It is expected that the specified table is the root table or is already joined by the query.

Parameters:
table - The table the column is located in or null if the column is located in the root table
column - The column
Returns:
The new expression
Throws:
InvalidDataException - If the column is null

reporter

public static Expression reporter(String property)
                           throws InvalidDataException
Create an expression representing a property of a reporter. expression = reporter.property. It is expected that the reporters table is already joined by the query.

Parameters:
property - The name of the property
Returns:
The new expression
Throws:
InvalidDataException - If the property is null
See Also:
DynamicSpotQuery.joinReporters(JoinType)

rawData

public static Expression rawData(String property)
                          throws InvalidDataException
Create an expression representing a property of a raw data spot. expression = rawdata.property. It is expected that the raw data table is already joined by the query.

Parameters:
property - The name of the property
Returns:
The new expression
Throws:
InvalidDataException - If the property is null
See Also:
DynamicSpotQuery.joinRawData(JoinType)

meanRawData

public static Expression meanRawData(String property)
                              throws InvalidDataException
Create an expression representing the mean value of a property of a raw data spot. expression = mean(rawdata.property). It is expected that the raw data table is already joined by the query.

Parameters:
property - The name of the property
Returns:
The new expression
Throws:
InvalidDataException - If the property is null
See Also:
DynamicSpotQuery.joinRawData(JoinType)

extraValue

public static Expression extraValue(ExtraValue extraValue)
Create an expression representing the extra value of a spot or position. It is expected that the extra value is already joined by the query.

Parameters:
extraValue - The extra value
Returns:
The new expression
Throws:
InvalidDataException - If the extra value is null
See Also:
DynamicSpotQuery.joinExtraValue(ExtraValue, JoinType)

isPartOf

public static Restriction isPartOf(ReporterList reporterList)

isNotPartOf

public static Restriction isNotPartOf(ReporterList reporterList)

score

public static Expression score(ReporterList reporterList)

2.17.2: 2011-06-17