2.17.2: 2011-06-17

net.sf.basedb.core
Enum VirtualTable

java.lang.Object
  extended by java.lang.Enum<VirtualTable>
      extended by net.sf.basedb.core.VirtualTable
All Implemented Interfaces:
Serializable, Comparable<VirtualTable>

public enum VirtualTable
extends Enum<VirtualTable>

This enumeration defines constants that are used to specify different virtual tables in the dynamic part of the database used for analysis. For each VirtualDb it is possible to create one real table for each VirtualTable constant.

The information in these objects are used by HibernateUtil.createVirtualTable(VirtualDb, VirtualTable) to create the extra tables needed by an experiment to store analysed data. These objects are also used in query elements by DynamicQuery:s when it needs to reference a certain column in one of the dynamic tables.

Version:
2.0
Author:
Nicklas
See Also:
VirtualColumn, Dynamic
Last modified
$Date: 2010-08-13 10:50:27 +0200 (Fri, 13 Aug 2010) $

Enum Constant Summary
COLUMN
          Table that maps columns coordinates in a data cube to raw bioassays.
COLUMN_EXTRA_FLOAT
          Table that stores float column extra values.
COLUMN_EXTRA_INT
          Table that stores integer column extra values.
COLUMN_EXTRA_STRING
          Table that stores string column extra values.
FILTER
          Table that holds column/position coordinates that remains after a filtering operation has been applied to a data cube layer.
POSITION
          Table that maps position coordinates in a data cube to reporters.
POSITION_EXTRA_FLOAT
          Table that stores float position extra values.
POSITION_EXTRA_INT
          Table that stores integer position extra values.
POSITION_EXTRA_STRING
          Table that stores string position extra values.
RAWPARENTS
          Table that maps column/position coordinates in a data cube to the id's of the raw spots their intensities where calculated from.
SPOT
          Table that stores spot intensities for each spot in a data cube.
SPOT_EXTRA_FLOAT
          Table that stores float spot extra values.
SPOT_EXTRA_INT
          Table that stores integer spot extra values.
SPOT_EXTRA_STRING
          Table that stores string spot extra values.
 
Field Summary
private  String alias
          The alias to use in queries for this table.
private  VirtualColumn[] columns
          The columns in the table.
private  String nameTemplate
          The name template, # is replaced by the ID of the VirtualDb item.
 
Method Summary
 String getAlias()
          Get the alias of this table.
 long getBytesPerRow(RawDataType rdt)
          Get the number of bytes a single row in the database occupies.
 VirtualColumn[] getColumns(RawDataType rdt)
          Get all columns in this table.
 String getQualifiedTableName(VirtualDb vdb)
          Get the real table name of this table in the database, quoted and with catalog/schema information prepended to it.
 String getTableName(VirtualDb vdb)
          Get the real table name of this table in the database.
 boolean hasColumn(VirtualColumn column)
          Check if the specified column is part of the virtual table or not.
static VirtualTable valueOf(String name)
          Returns the enum constant of this type with the specified name.
static VirtualTable[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SPOT

public static final VirtualTable SPOT
Table that stores spot intensities for each spot in a data cube. The number of intensity columns are the same as the number of channels in the experiment.


SPOT_EXTRA_INT

public static final VirtualTable SPOT_EXTRA_INT
Table that stores integer spot extra values. One value can be stored for each spot.


SPOT_EXTRA_FLOAT

public static final VirtualTable SPOT_EXTRA_FLOAT
Table that stores float spot extra values. One value can be stored for each spot.


SPOT_EXTRA_STRING

public static final VirtualTable SPOT_EXTRA_STRING
Table that stores string spot extra values. One value can be stored for each spot.


POSITION

public static final VirtualTable POSITION
Table that maps position coordinates in a data cube to reporters. Each position may map to one reporter or null.


POSITION_EXTRA_INT

public static final VirtualTable POSITION_EXTRA_INT
Table that stores integer position extra values. One value can be stored for each position.


POSITION_EXTRA_FLOAT

public static final VirtualTable POSITION_EXTRA_FLOAT
Table that stores float position extra values. One value can be stored for each position.


POSITION_EXTRA_STRING

public static final VirtualTable POSITION_EXTRA_STRING
Table that stores string position extra values. One value can be stored for each position.


COLUMN

public static final VirtualTable COLUMN
Table that maps columns coordinates in a data cube to raw bioassays. Each column may map to any number of raw bioassays.


COLUMN_EXTRA_INT

public static final VirtualTable COLUMN_EXTRA_INT
Table that stores integer column extra values. One value can be stored for each column.


COLUMN_EXTRA_FLOAT

public static final VirtualTable COLUMN_EXTRA_FLOAT
Table that stores float column extra values. One value can be stored for each column.


COLUMN_EXTRA_STRING

public static final VirtualTable COLUMN_EXTRA_STRING
Table that stores string column extra values. One value can be stored for each column.


RAWPARENTS

public static final VirtualTable RAWPARENTS
Table that maps column/position coordinates in a data cube to the id's of the raw spots their intensities where calculated from. Each column/position coordinate may map to any number of raw spots.


FILTER

public static final VirtualTable FILTER
Table that holds column/position coordinates that remains after a filtering operation has been applied to a data cube layer.

Field Detail

nameTemplate

private final String nameTemplate
The name template, # is replaced by the ID of the VirtualDb item.


alias

private final String alias
The alias to use in queries for this table.


columns

private final VirtualColumn[] columns
The columns in the table.

Method Detail

values

public static VirtualTable[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (VirtualTable c : VirtualTable.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static VirtualTable valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getTableName

public String getTableName(VirtualDb vdb)
Get the real table name of this table in the database.

Parameters:
vdb - The virtual database

getQualifiedTableName

public String getQualifiedTableName(VirtualDb vdb)
Get the real table name of this table in the database, quoted and with catalog/schema information prepended to it.

Parameters:
vdb - The virtual database

getAlias

public String getAlias()
Get the alias of this table. Used in queries: SELECT ... FROM table AS alias ...


getColumns

public VirtualColumn[] getColumns(RawDataType rdt)
Get all columns in this table.

Parameters:
rdt - The raw data type of the experiment

hasColumn

public boolean hasColumn(VirtualColumn column)
Check if the specified column is part of the virtual table or not. This method doesn't check columns that depends on the raw data type, ie. the number of intensity columns in the SPOT table.

Parameters:
column - The column to check
Returns:
TRUE if the column is part of the table, FALSE otherwise

getBytesPerRow

public long getBytesPerRow(RawDataType rdt)
Get the number of bytes a single row in the database occupies. The number doesn't include any variable length columns, ie. string columns. The caller should add the string length to the value returned from this method.

Parameters:
rdt - The raw data type of the experiment

2.17.2: 2011-06-17