SQLTuple version: 1.2.0.0

hep.aida.ref.sql
Class SQLTuple

java.lang.Object
  extended by hep.aida.ref.event.AIDAObservable
      extended by hep.aida.ref.ManagedObject
          extended by hep.aida.ref.tuple.AbstractTuple
              extended by hep.aida.ref.sql.SQLTuple
All Implemented Interfaces:
IDevManagedObject, IManagedObject, ITuple, Connectable, FTuple

public class SQLTuple
extends AbstractTuple

SQLTuple is an extension of ITuple for SQL database.
SQLTuple contains several extensions to ITuple and ITuple:

 $Log: SQLTuple.java,v $
 Revision 1.82  2007/05/23 16:38:44  hrivnac
 logical connections for Plotter; better UML

 Revision 1.81  2006/12/15 00:16:13  hrivnac
 FORWARD_ONLY allows to plot big ntuples

 Revision 1.80  2006/12/12 15:21:42  hrivnac
 McKoi replaced with Derby; uppercase-only dbs handled better; moving to JAS 0.8.3

 Revision 1.79  2006/11/22 23:55:36  hrivnac
 fixed non-double values, added intr database

 Revision 1.78  2006/11/20 16:56:08  hrivnac
 fixing input params for Plotter command line

 Revision 1.77  2006/11/17 17:11:34  hrivnac
 chooser.jsp closes tree too

 Revision 1.76  2006/11/15 16:16:01  hrivnac
 Oracle work fine in CERN, cache enabled

 Revision 1.75  2006/11/14 16:06:18  hrivnac
 improving Web Service

 Revision 1.74  2006/10/12 15:02:58  hrivnac
 bug fixes

 Revision 1.73  2005/09/28 18:22:42  hrivnac
 javadoc fixed

 Revision 1.72  2005/09/28 16:21:06  hrivnac
 code cleaning

 Revision 1.71  2005/09/21 23:00:38  hrivnac
 readonly tuples can be read

 Revision 1.70  2005/09/21 14:49:49  hrivnac
 better support for Oracle types

 Revision 1.69  2005/09/19 14:30:12  hrivnac
 projection bugs fixed

 Revision 1.68  2005/09/02 14:10:31  hrivnac
 moved to JAS3 0.8.2

 Revision 1.67  2005/06/15 15:26:04  hrivnac
 ITuple._rows only evaluated when requested

 Revision 1.66  2005/03/18 12:12:11  hrivnac
 ITuple.start() resets ITuple to its original shape even after customised ITuple.start(...) calls

 Revision 1.65  2005/03/09 15:25:52  hrivnac
 ITuple.rows() improved

 Revision 1.64  2005/03/08 17:05:51  hrivnac
 ...

 Revision 1.63  2005/02/10 20:07:51  hrivnac
 bug fixes to support new ColMan

 Revision 1.62  2005/01/27 17:30:41  hrivnac
 PreparedStatement with default values

 Revision 1.61  2005/01/25 16:45:03  hrivnac
 Adding rows uses PreparedStatement

 Revision 1.60  2004/12/01 16:07:15  hrivnac
 better support for ColMan JAS3 plugin

 Revision 1.59  2004/11/30 14:06:04  hrivnac
 SQLTuple.rows() fix

 Revision 1.58  2004/10/29 22:27:25  hrivnac
 imports corrected

 Revision 1.57  2004/10/21 15:46:49  hrivnac
 doc improved

 Revision 1.56  2004/10/20 23:02:29  hrivnac
 Types mapping simplified

 Revision 1.55  2004/10/13 12:25:39  hrivnac
 defaults work fine

 Revision 1.54  2004/10/13 09:21:21  hrivnac
 defaults used

 Revision 1.53  2004/10/12 13:25:40  hrivnac
 small improvements

 Revision 1.52  2004/10/08 15:22:33  hrivnac
 JAS3 plugin works

 Revision 1.51  2004/07/06 14:24:50  hrivnac
 support for Oracle

 Revision 1.50  2004/06/30 13:01:05  hrivnac
 oracle sceleton

 Revision 1.49  2004/06/23 08:04:53  hrivnac
 documentation fixes

 Revision 1.48  2004/06/18 09:17:31  hrivnac
 StmtSrc can be accessed directkly

 Revision 1.47  2004/06/16 21:56:43  hrivnac
 StringBuffer in SQLTuple.addRow() -> speed

 Revision 1.46  2004/05/22 15:12:59  hrivnac
 class id reformated

 Revision 1.45  2004/05/04 08:50:33  hrivnac
 can run with JAS3

 Revision 1.44  2004/05/03 19:22:30  hrivnac
 basic support for JAS3

 Revision 1.43  2004/04/21 13:41:32  hrivnac
 explicit dependency on MySQL removed

 Revision 1.42  2004/04/21 08:24:50  hrivnac
 some explicit MySQL dependencies removed

 Revision 1.41  2004/04/20 12:46:49  hrivnac
 tuples use always primitive types

 Revision 1.40  2004/04/15 08:49:01  hrivnac
 ColMan fixes

 Revision 1.39  2004/04/14 13:54:41  hrivnac
 potential bugs fixed

 Revision 1.38  2004/04/14 13:39:47  hrivnac
 1.5 warnings fixed

 Revision 1.37  2004/04/13 15:45:54  hrivnac
 AIDA URL introduced

 Revision 1.36  2004/02/10 14:50:58  hrivnac
 JavaDoc tags completed

 Revision 1.35  2004/02/04 13:30:39  hrivnac
 - improvement of Enums internal mapping
 - general cleaning

 Revision 1.34  2003/11/24 15:13:22  hrivnac
 Logging improved.

 Revision 1.33  2003/11/20 17:21:58  hrivnac
 Java 1.5 natively supported, Log4J reporting improved.

 Revision 1.32  2003/11/17 15:01:12  hrivnac
 More BM results.

 Revision 1.31  2003/11/17 10:18:29  hrivnac
 Cleaning.

 Revision 1.30  2003/11/13 18:19:38  hrivnac
 BenchMarks running for all DBs, Reporting class added.

 Revision 1.29  2003/11/13 15:43:08  hrivnac
 BenchMarking introduced.

 Revision 1.28  2003/11/13 11:07:31  hrivnac
 EventSelector prototype added.

 Revision 1.27  2003/11/05 19:46:22  hrivnac
 - FreeHEP 1.2.1
 - JAIDA 3.2.1

 Revision 1.18  2003/10/30 11:42:40  hrivnac
 ArrayList -> Collection

 Revision 1.15  2003/10/22 17:59:39  hrivnac
 Refactored.

 Revision 1.13  2003/10/21 13:56:00  hrivnac
 Default values supported.

 Revision 1.12  2003/10/21 13:24:52  hrivnac
 Constructor from columnString implemented.

 Revision 1.11  2003/10/10 10:12:21  hrivnac
 All three testing pgms work.

 Revision 1.8  2003/10/07 10:15:57  hrivnac
 SQL extensions to ITuple added.

 Revision 1.5  2003/10/03 16:02:21  hrivnac
 Better handling of multiple technologies.

 Revision 1.3  2003/10/02 14:24:01  hrivnac
 Cleaning.

 Revision 1.7  2003/09/30 20:30:47  hrivnac
 special Pool functions

 Revision 1.6  2003/09/30 16:46:02  hrivnac
 - Writing test in TestWrite
 - SQLTuple projections supported

 Revision 1.5  2003/09/30 14:11:48  hrivnac
 Can created SQLTuples.

 Revision 1.4  2003/09/30 12:29:19  hrivnac
 Tuples can be written.

 Revision 1.3  2003/09/29 16:15:54  hrivnac
 More complete.

 Revision 1.2  2003/09/29 14:36:40  hrivnac
 Works per attribute.

 

Version:
$Id: SQLTuple.java,v 1.82 2007/05/23 16:38:44 hrivnac Exp $
Author:
J.Hrivnac

Nested Class Summary
 
Nested classes/interfaces inherited from class hep.aida.ref.tuple.AbstractTuple
AbstractTuple.AbstractTupleColumnFactory
 
Field Summary
private  Accessor _accessor
           
private  Object[] _defaultObjects
           
private  Object[] _defaultObjectsOrig
           
private  String[] _defaults
           
private  String[] _defaultsOrig
           
private  boolean[] _filled
           
private  String[] _names
           
private  String[] _namesOrig
           
private  boolean _readOnly
           
private  int _rows
           
private  ResultSet _rs
           
private  PreparedStatement _statement
           
private  StmtSrc _stmtSrc
           
private  Class[] _types
           
private  Class[] _typesOrig
           
private static Logger log
          Logging .
 
Fields inherited from class hep.aida.ref.ManagedObject
fillable
 
Fields inherited from class hep.aida.ref.event.AIDAObservable
connectionDidChange, isConnected, isValid
 
Fields inherited from interface hep.aida.ref.tuple.FTuple
ROWS_UNKNOWN
 
Constructor Summary
SQLTuple(String name, String title, String[] columnName, Class[] columnType, String options)
          Just call superclass constructor.
SQLTuple(String name, String title, String columnsString, String options)
          Just calls superclass constructor.
 
Method Summary
 Accessor accessor()
          Get attached Accessor.
 void addColumn(String columnName, Class columnType, IEvaluator evaluator)
          SQLTuple extension: add column into SQL table.
 void addIndex(String[] columnName)
          SQLTuple extension: add indexes into SQL table.
 void addRow()
          Add the current row into NTuple and reset.
 IBaseTupleColumn column(int index)
          Get column.
 FTupleColumn columnByName(String name)
          Get column.
 String columnDefault(int param)
          SQLTuple extension: Get the default value of the column number param.
 String[] columnDefaults()
          SQLTuple extension: Get all column default values.
 String columnDefaultString(int column)
          Give the default as a String.
 double columnMax(int column)
          Use SQL max function.
 double columnMean(int column)
          Use SQL avg function.
 double columnMin(int column)
          Use SQL min function.
 String columnName(int param)
          Gets the name of the column number param.
 String[] columnNames()
          Get all column names.
 int columnNumber(String name)
          Gets the number of the column name name.
 double columnRms(int column)
          Use SQL std function.
 int columns()
          Gets the number of columns.
 Class columnType(int param)
          Get the type of the column number param.
 Class[] columnTypes()
          Get all column types.
 void columnValue(int column, FTupleCursor cursor, Value value)
          Get Value of column at FTupleCursor.
 void columnValue(int column, Value value)
          Get Value of column at FTupleCursor.
 FTupleCursor cursor()
          Get FTupleCursor.
 void fill(double[] values)
          Fill double values into current row.
 void fill(float[] values)
          Fill float values into current row.
 void fill(int column, boolean value)
          Fill boolean value in a column.
 void fill(int column, byte value)
          Fill byte value in a column.
 void fill(int column, char value)
          Fill char value in a column.
 void fill(int column, double value)
          Fill double value in a column.
 void fill(int column, float value)
          Fill float value in a column.
 void fill(int column, int value)
          Fill int value in a column.
 void fill(int column, long value)
          Fill long value in a column.
 void fill(int column, Object value)
          Fill Object value in a column.
 void fill(int column, short value)
          Fill short value in a column.
 void fill(int column, String value)
          Fill String value in a column.
 void fill(int column, Value value)
          Fill Value in a column.
 void fill(String column, boolean value)
          Fill boolean value in a column.
 void fill(String column, byte value)
          Fill byte value in a column.
 void fill(String column, char value)
          Fill char value in a column.
 void fill(String column, double value)
          Fill double value in a column.
 void fill(String column, float value)
          Fill float value in a column.
 void fill(String column, int value)
          Fill int value in a column.
 void fill(String column, long value)
          Fill long value in a column.
 void fill(String column, Object value)
          Fill Object value in a column.
 void fill(String column, short value)
          Fill short value in a column.
 void fill(String column, String value)
          Fill String value in a column.
 int findColumn(String name)
          Find column number from the column name.
 ITuple findTuple(int index)
          Give nested ITuple.
 boolean getBoolean(int column)
          Get boolean value of a column.
 boolean getBoolean(String column)
          Get boolean value of a column.
 byte getByte(int column)
          Get byte value of a column.
 byte getByte(String column)
          Get byte value of a column.
 char getChar(int column)
          Get char value of a column.
 char getChar(String column)
          Get char value of a column.
 Collection<String> getColumn(String cName)
          SQLTuple extension: get the whole column as an array of Strings.
<T> Collection<T>
getColumn(String cName, Class<T> cl)
          SQLTuple extension: get the whole column as an array of Objects of the specified Class (which has to have a String constructor).
<T> Collection<T>
getColumn(String cName, Class<T> cl, IFilter filter)
          SQLTuple extension: get the filtered column as an array of Objects of the specified Class (it has to have a String constructor).
 Collection<String> getColumn(String cName, IFilter filter)
          SQLTuple extension: get the filtered column as an array of Strings.
 double getDouble(int column)
          Get double value of a column.
private  double getDouble(ResultSet rs, int i)
          Get double value from the ResultSet.
 double getDouble(String column)
          Get double value of a column.
 float getFloat(int column)
          Get float value of a column.
 float getFloat(String column)
          Get float value of a column.
 int getInt(int column)
          Get int value of a column.
 int getInt(String column)
          Get int value of a column.
 long getLong(int column)
          Get long value of a column.
 long getLong(String column)
          Get long value of a column.
 Object getObject(int column)
          Get Object value of a column.
 Object getObject(String column)
          Get Object value of a column.
 int getRow()
          Get the number of the current row.
 String[] getRowData()
          SQLTuple extension: return current Row Data.
 short getShort(int column)
          Get short value of a column.
 short getShort(String column)
          Get short value of a column.
 String getString(int column)
          Get String value of a column.
 String getString(String column)
          Get String value of a column.
 ITuple getTuple(String column)
          Get ITuple value of a column.
private  double groupValue(String operator, int column)
          Apply an operator to a column.
 double groupValue(String operator, String column)
          Apply an operator to a column.
protected  void initSQLTuple(String name, String title, String[] columnName, Class[] columnType, String options)
          Initialise internal variables.
 boolean isInMemory()
          SQLTuple is never in memory => false.
 boolean next()
          Go into the next row.
 void prepare()
          Prepare statement for adding row.
 void project(ICloud1D cloud, IEvaluator evaluatorX)
           
 void project(ICloud1D cloud, IEvaluator evaluatorX, IEvaluator weight)
           
 void project(ICloud1D cloud, IEvaluator evaluatorX, IFilter filter)
           
 void project(ICloud1D cloud, IEvaluator evaluatorX, IFilter filter, IEvaluator weight)
           
 void project(ICloud2D cloud, IEvaluator evaluatorX, IEvaluator evaluatorY)
           
 void project(ICloud2D cloud, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator weight)
           
 void project(ICloud2D cloud, IEvaluator evaluatorX, IEvaluator evaluatorY, IFilter filter)
           
 void project(ICloud2D cloud, IEvaluator evaluatorX, IEvaluator evaluatorY, IFilter filter, IEvaluator weight)
           
 void project(ICloud3D cloud, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ)
           
 void project(ICloud3D cloud, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ, IEvaluator weight)
           
 void project(ICloud3D cloud, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ, IFilter filter)
           
 void project(ICloud3D cloud, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ, IFilter filter, IEvaluator weight)
           
 void project(IHistogram1D histogram, IEvaluator evaluatorX)
           
 void project(IHistogram1D histogram, IEvaluator evaluatorX, IEvaluator weight)
           
 void project(IHistogram1D histogram, IEvaluator evaluatorX, IFilter filter)
           
 void project(IHistogram1D histogram, IEvaluator evaluatorX, IFilter filter, IEvaluator weight)
           
 void project(IHistogram2D histogram, IEvaluator evaluatorX, IEvaluator evaluatorY)
           
 void project(IHistogram2D histogram, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator weight)
           
 void project(IHistogram2D histogram, IEvaluator evaluatorX, IEvaluator evaluatorY, IFilter filter)
           
 void project(IHistogram2D histogram, IEvaluator evaluatorX, IEvaluator evaluatorY, IFilter filter, IEvaluator weight)
           
 void project(IHistogram3D histogram, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ)
           
 void project(IHistogram3D histogram, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ, IEvaluator weight)
           
 void project(IHistogram3D histogram, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ, IFilter filter)
           
 void project(IHistogram3D histogram, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ, IFilter filter, IEvaluator weight)
           
 void project(IProfile1D profile, IEvaluator evaluatorX, IEvaluator evaluatorY)
           
 void project(IProfile1D profile, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator weight)
           
 void project(IProfile1D profile, IEvaluator evaluatorX, IEvaluator evaluatorY, IFilter filter)
           
 void project(IProfile1D profile, IEvaluator evaluatorX, IEvaluator evaluatorY, IFilter filter, IEvaluator weight)
           
 void project(IProfile2D profile, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ)
           
 void project(IProfile2D profile, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ, IEvaluator weight)
           
 void project(IProfile2D profile, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ, IFilter filter)
           
 void project(IProfile2D profile, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ, IFilter filter, IEvaluator weight)
           
private  ResultSet query(String statementString, String[] args)
          Perform query operation via StmtSrc.
 void reset()
          Reset the NTuple/table, close it.
 void resetRow()
          Reset the current row.
 int row()
          Get the number of the current row.
 int rows()
          Get the number of rows.
 void setOptions(String options)
          Register options.
 void setRow(int row)
          Go to the row with specified number.
 void setStmtSrc(String url)
          Attached StmtSrc.
 void skip(int rows)
          Skip rows.
 void start()
          Start looping, positions in the first row.
 void start(IFilter filter)
          SQLTuple extension: get subNTuple (subset of rows) and positions in the first row.
 void start(IFilter filter, String stmtSrc)
          SQLTuple extension: get subNTuple (subset of rows and columns) and positions in the first row.
 void start(IFilter filter, String[] columns)
          SQLTuple extension: get subNTuple (subset of rows and columns) and positions in the first row.
 void start(String stmtSrc)
          SQLTuple extension: get subNTuple (subset of columns) and positions in the first row.
 void start(String[] columns)
          SQLTuple extension: get subNTuple (subset of columns) and positions in the first row.
 StmtSrc stmtSrc()
          Give attached StmtSrc.
private  Object type2Object(String value, Class type)
          Create Object from String value.
private  int update(String statementString, String[] args)
          Perform update operation via StmtSrc.
private  int updatePrepared(PreparedStatement statement)
          Perform update operation via StmtSrc using PreparedStatement.
 
Methods inherited from class hep.aida.ref.tuple.AbstractTuple
annotation, column, columnByIndex, columnDefaultValue, evaluateMax, evaluateMax, evaluateMin, evaluateMin, getOptions, getTuple, internalCursor, newInternalCursor, providesColumnDefaultValues, setAnnotation, setTitle, supportsMultipleCursors, supportsRandomAccess, title, tuple
 
Methods inherited from class hep.aida.ref.ManagedObject
isFillable, name, setFillable, setName, type, typeForClass
 
Methods inherited from class hep.aida.ref.event.AIDAObservable
addListener, createEvent, fireStateChanged, fireStateChanged, fireStateChanged, isConnected, removeAllListeners, removeListener, setConnected, setIsValidAfterNotify, setValid, setValidForAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hep.aida.ref.tuple.FTuple
name
 
Methods inherited from interface hep.aida.ref.event.Connectable
isConnected, setConnected
 

Field Detail

_accessor

private Accessor _accessor

_stmtSrc

private StmtSrc _stmtSrc

_statement

private PreparedStatement _statement

_rs

private ResultSet _rs

_names

private String[] _names

_types

private Class[] _types

_defaults

private String[] _defaults

_defaultObjects

private Object[] _defaultObjects

_namesOrig

private String[] _namesOrig

_typesOrig

private Class[] _typesOrig

_defaultsOrig

private String[] _defaultsOrig

_defaultObjectsOrig

private Object[] _defaultObjectsOrig

_filled

private boolean[] _filled

_rows

private int _rows

_readOnly

private boolean _readOnly

log

private static Logger log
Logging .

Constructor Detail

SQLTuple

public SQLTuple(String name,
                String title,
                String[] columnName,
                Class[] columnType,
                String options)
Just call superclass constructor.

Parameters:
name - The name of the ITuple.
title - The title of the ITuple.
columnName - The names of columns.
columnType - The types of columns.
options - The options to be used to create the ITuple.

SQLTuple

public SQLTuple(String name,
                String title,
                String columnsString,
                String options)
Just calls superclass constructor.

Parameters:
name - The name of the ITuple.
title - The title of the ITuple.
columnsString - The columns definition.
options - The options to be used to create the ITuple.
Method Detail

initSQLTuple

protected void initSQLTuple(String name,
                            String title,
                            String[] columnName,
                            Class[] columnType,
                            String options)
                     throws IllegalArgumentException
Initialise internal variables. Is called from the constructor.

Parameters:
name - The name of the ITuple.
title - The title of the ITuple.
columnName - The names of columns.
columnType - The types of columns.
options - The options to be used to create the ITuple.
Throws:
IllegalArgumentException - if the ITuple can't be created.

addIndex

public void addIndex(String[] columnName)
SQLTuple extension: add indexes into SQL table.

Parameters:
columnName - The array of column names to be indexed.

addColumn

public void addColumn(String columnName,
                      Class columnType,
                      IEvaluator evaluator)
SQLTuple extension: add column into SQL table.

Parameters:
columnName - The name of column to be added.
columnType - The type of column to be added.
evaluator - The evaluator to be used to compute new column values.

isInMemory

public boolean isInMemory()
SQLTuple is never in memory => false.

Specified by:
isInMemory in interface FTuple
Overrides:
isInMemory in class AbstractTuple
Returns:
false.

columnMin

public double columnMin(int column)
Use SQL min function.

Specified by:
columnMin in interface ITuple
Specified by:
columnMin in class AbstractTuple
Parameters:
column - The column to get the minimum of.
Returns:
The found minimum.

columnMax

public double columnMax(int column)
Use SQL max function.

Specified by:
columnMax in interface ITuple
Specified by:
columnMax in class AbstractTuple
Parameters:
column - The column to get the maximum of.
Returns:
The found maximum.

columnMean

public double columnMean(int column)
Use SQL avg function.

Specified by:
columnMean in interface ITuple
Specified by:
columnMean in class AbstractTuple
Parameters:
column - The column to get the average of.
Returns:
The found average.

columnRms

public double columnRms(int column)
Use SQL std function.

Specified by:
columnRms in interface ITuple
Specified by:
columnRms in class AbstractTuple
Parameters:
column - The column to get the std of.
Returns:
The found std.

groupValue

private double groupValue(String operator,
                          int column)
Apply an operator to a column.

Parameters:
operator - The operator to be applied..
column - The column to be evalated.
Returns:
The found result of the operator applied on the column.
Throws:
IllegalArgumentException - if the operator can't be applied on the column.

groupValue

public double groupValue(String operator,
                         String column)
Apply an operator to a column.

Parameters:
operator - The operator to be applied..
column - The column formula to be evalated.
Returns:
The found result of the operator applied on the column.
Throws:
IllegalArgumentException - if the operator can't be applied on the column.

findColumn

public int findColumn(String name)
               throws IllegalArgumentException
Find column number from the column name.

Specified by:
findColumn in interface ITuple
Specified by:
findColumn in class AbstractTuple
Parameters:
name - The name of the column.
Returns:
The number of the specified column.
Throws:
IllegalArgumentException - if no column of that name exists.

getBoolean

public boolean getBoolean(String column)
Get boolean value of a column.

Parameters:
column - The column name.
Returns:
The value of the current row.

getBoolean

public boolean getBoolean(int column)
Get boolean value of a column.

Specified by:
getBoolean in interface ITuple
Overrides:
getBoolean in class AbstractTuple
Parameters:
column - The column number.
Returns:
The value of the current row.

getByte

public byte getByte(String column)
Get byte value of a column.

Parameters:
column - The column name.
Returns:
The value of the current row.

getByte

public byte getByte(int column)
Get byte value of a column.

Specified by:
getByte in interface ITuple
Overrides:
getByte in class AbstractTuple
Parameters:
column - The column number.
Returns:
The value of the current row.

getChar

public char getChar(String column)
Get char value of a column.

Parameters:
column - The column name.
Returns:
The value of the current row.

getChar

public char getChar(int column)
Get char value of a column.

Specified by:
getChar in interface ITuple
Overrides:
getChar in class AbstractTuple
Parameters:
column - The column number.
Returns:
The value of the current row.

getDouble

public double getDouble(String column)
Get double value of a column.

Parameters:
column - The column name.
Returns:
The value of the current row.

getDouble

public double getDouble(int column)
Get double value of a column.

Specified by:
getDouble in interface ITuple
Overrides:
getDouble in class AbstractTuple
Parameters:
column - The column number.
Returns:
The value of the current row.

getFloat

public float getFloat(String column)
Get float value of a column.

Parameters:
column - The column name.
Returns:
The value of the current row.

getFloat

public float getFloat(int column)
Get float value of a column.

Specified by:
getFloat in interface ITuple
Overrides:
getFloat in class AbstractTuple
Parameters:
column - The column number.
Returns:
The value of the current row.

getInt

public int getInt(String column)
Get int value of a column.

Parameters:
column - The column name.
Returns:
The value of the current row.

getInt

public int getInt(int column)
Get int value of a column.

Specified by:
getInt in interface ITuple
Overrides:
getInt in class AbstractTuple
Parameters:
column - The column number.
Returns:
The value of the current row.

getLong

public long getLong(String column)
Get long value of a column.

Parameters:
column - The column name.
Returns:
The value of the current row.

getLong

public long getLong(int column)
Get long value of a column.

Specified by:
getLong in interface ITuple
Overrides:
getLong in class AbstractTuple
Parameters:
column - The column number.
Returns:
The value of the current row.

getObject

public Object getObject(String column)
Get Object value of a column.

Parameters:
column - The column name.
Returns:
The value of the current row.

getObject

public Object getObject(int column)
Get Object value of a column.

Specified by:
getObject in interface ITuple
Overrides:
getObject in class AbstractTuple
Parameters:
column - The column number.
Returns:
The value of the current row.

getShort

public short getShort(String column)
Get short value of a column.

Parameters:
column - The column name.
Returns:
The value of the current row.

getShort

public short getShort(int column)
Get short value of a column.

Specified by:
getShort in interface ITuple
Overrides:
getShort in class AbstractTuple
Parameters:
column - The column number.
Returns:
The value of the current row.

getString

public String getString(String column)
Get String value of a column.

Parameters:
column - The column name.
Returns:
The value of the current row.

getString

public String getString(int column)
Get String value of a column.

Specified by:
getString in interface ITuple
Overrides:
getString in class AbstractTuple
Parameters:
column - The column number.
Returns:
The value of the current row.

getTuple

public ITuple getTuple(String column)
Get ITuple value of a column.

Parameters:
column - The column name.
Returns:
The value of the current row.

fill

public void fill(int column,
                 Value value)
          throws IllegalArgumentException
Fill Value in a column.

Specified by:
fill in class AbstractTuple
Parameters:
column - The column name.
value - The Value to be filled in the current row.
Throws:
IllegalArgumentException - if Value can't be filled.

fill

public void fill(String column,
                 int value)
          throws IllegalArgumentException
Fill int value in a column.

Parameters:
column - The column name.
value - The value to be filled in the current row.
Throws:
IllegalArgumentException - if value can't be filled.

fill

public void fill(int column,
                 int value)
          throws IllegalArgumentException
Fill int value in a column.

Specified by:
fill in interface ITuple
Overrides:
fill in class AbstractTuple
Parameters:
column - The column number.
value - The value to be filled in the current row.
Throws:
IllegalArgumentException - if value can't be filled.

fill

public void fill(String column,
                 short value)
          throws IllegalArgumentException
Fill short value in a column.

Parameters:
column - The column name.
value - The value to be filled in the current row.
Throws:
IllegalArgumentException - if value can't be filled.

fill

public void fill(int column,
                 short value)
          throws IllegalArgumentException
Fill short value in a column.

Specified by:
fill in interface ITuple
Overrides:
fill in class AbstractTuple
Parameters:
column - The column number.
value - The value to be filled in the current row.
Throws:
IllegalArgumentException - if value can't be filled.

fill

public void fill(String column,
                 long value)
          throws IllegalArgumentException
Fill long value in a column.

Parameters:
column - The column name.
value - The value to be filled in the current row.
Throws:
IllegalArgumentException - if value can't be filled.

fill

public void fill(int column,
                 long value)
          throws IllegalArgumentException
Fill long value in a column.

Specified by:
fill in interface ITuple
Overrides:
fill in class AbstractTuple
Parameters:
column - The column number.
value - The value to be filled in the current row.
Throws:
IllegalArgumentException - if value can't be filled.

fill

public void fill(String column,
                 double value)
          throws IllegalArgumentException
Fill double value in a column.

Parameters:
column - The column name.
value - The value to be filled in the current row.
Throws:
IllegalArgumentException - if value can't be filled.

fill

public void fill(int column,
                 double value)
          throws IllegalArgumentException
Fill double value in a column.

Specified by:
fill in interface ITuple
Overrides:
fill in class AbstractTuple
Parameters:
column - The column number.
value - The value to be filled in the current row.
Throws:
IllegalArgumentException - if value can't be filled.

fill

public void fill(String column,
                 float value)
          throws IllegalArgumentException
Fill float value in a column.

Parameters:
column - The column name.
value - The value to be filled in the current row.
Throws:
IllegalArgumentException - if value can't be filled.

fill

public void fill(int column,
                 float value)
          throws IllegalArgumentException
Fill float value in a column.

Specified by:
fill in interface ITuple
Overrides:
fill in class AbstractTuple
Parameters:
column - The column number.
value - The value to be filled in the current row.
Throws:
IllegalArgumentException - if value can't be filled.

fill

public void fill(String column,
                 boolean value)
          throws IllegalArgumentException
Fill boolean value in a column.

Parameters:
column - The column name.
value - The value to be filled in the current row.
Throws:
IllegalArgumentException - if value can't be filled.

fill

public void fill(int column,
                 boolean value)
          throws IllegalArgumentException
Fill boolean value in a column.

Specified by:
fill in interface ITuple
Overrides:
fill in class AbstractTuple
Parameters:
column - The column number
value - The value to be filled in the current row.
Throws:
IllegalArgumentException - if value can't be filled.

fill

public void fill(String column,
                 byte value)
          throws IllegalArgumentException
Fill byte value in a column.

Parameters:
column - The column name
value - The value to be filled in the current row.
Throws:
IllegalArgumentException - if value can't be filled.

fill

public void fill(int column,
                 byte value)
          throws IllegalArgumentException
Fill byte value in a column.

Specified by:
fill in interface ITuple
Overrides:
fill in class AbstractTuple
Parameters:
column - The column number.
value - The value to be filled in the current row.
Throws:
IllegalArgumentException - if value can't be filled.

fill

public void fill(String column,
                 char value)
          throws IllegalArgumentException
Fill char value in a column.

Parameters:
column - The column name.
value - The value to be filled in the current row.
Throws:
IllegalArgumentException - if value can't be filled.

fill

public void fill(int column,
                 char value)
          throws IllegalArgumentException
Fill char value in a column.

Specified by:
fill in interface ITuple
Overrides:
fill in class AbstractTuple
Parameters:
column - The column number.
value - The value to be filled in the current row.
Throws:
IllegalArgumentException - if value can't be filled.

fill

public void fill(String column,
                 String value)
          throws IllegalArgumentException
Fill String value in a column.

Parameters:
column - The column name.
value - The value to be filled in the current row.
Throws:
IllegalArgumentException - if value can't be filled.

fill

public void fill(int column,
                 String value)
          throws IllegalArgumentException
Fill String value in a column.

Specified by:
fill in interface ITuple
Overrides:
fill in class AbstractTuple
Parameters:
column - The column number.
value - The value to be filled in the current row.
Throws:
IllegalArgumentException - if value can't be filled.

fill

public void fill(String column,
                 Object value)
          throws IllegalArgumentException
Fill Object value in a column.

Parameters:
column - The column name.
value - The value to be filled in the current row.
Throws:
IllegalArgumentException - if value can't be filled.

fill

public void fill(int column,
                 Object value)
          throws IllegalArgumentException
Fill Object value in a column.

Specified by:
fill in interface ITuple
Overrides:
fill in class AbstractTuple
Parameters:
column - The column number.
value - The value to be filled in the current row.
Throws:
IllegalArgumentException - if value can't be filled.

fill

public void fill(float[] values)
          throws IllegalArgumentException
Fill float values into current row.

Specified by:
fill in interface ITuple
Overrides:
fill in class AbstractTuple
Parameters:
values - The values to be filled in the current row.
Throws:
IllegalArgumentException - if value can't be filled.

fill

public void fill(double[] values)
          throws IllegalArgumentException
Fill double values into current row.

Specified by:
fill in interface ITuple
Overrides:
fill in class AbstractTuple
Parameters:
values - The values to be filled in the current row.
Throws:
IllegalArgumentException - if value can't be filled.

row

public int row()
Get the number of the current row.

Returns:
The current row number.

getRow

public int getRow()
Get the number of the current row.

Overrides:
getRow in class AbstractTuple
Returns:
The current row number.

setRow

public void setRow(int row)
            throws IllegalArgumentException
Go to the row with specified number.

Specified by:
setRow in interface ITuple
Overrides:
setRow in class AbstractTuple
Parameters:
row - The number of row to go to.
Throws:
IllegalArgumentException - if can't go to specified row.

start

public void start()
Start looping, positions in the first row.

Specified by:
start in interface ITuple
Overrides:
start in class AbstractTuple

start

public void start(IFilter filter)
           throws SQLTupleException
SQLTuple extension: get subNTuple (subset of rows) and positions in the first row. Use IFilter.

Parameters:
filter - The IFilter to be used to select rows.
Throws:
SQLTupleException - if can't get subNTuple.

start

public void start(String stmtSrc)
           throws SQLTupleException
SQLTuple extension: get subNTuple (subset of columns) and positions in the first row. Use SQL command from StmtSrc.

Parameters:
stmtSrc - The SQL Stmt String to be used to select rows.
Throws:
SQLTupleException - if can't get subNTuple.

start

public void start(IFilter filter,
                  String stmtSrc)
           throws SQLTupleException
SQLTuple extension: get subNTuple (subset of rows and columns) and positions in the first row. Use IFilter and SQL command from StmtSrc.

Parameters:
filter - The IFilter to be used to select rows.
stmtSrc - The SQL Stmt String to be used to select rows.
Throws:
SQLTupleException - if can't get subNTuple.

start

public void start(String[] columns)
           throws SQLTupleException
SQLTuple extension: get subNTuple (subset of columns) and positions in the first row.

Parameters:
columns - The names of column to be extracted.
Throws:
SQLTupleException - if can't get subNTuple.

start

public void start(IFilter filter,
                  String[] columns)
           throws SQLTupleException
SQLTuple extension: get subNTuple (subset of rows and columns) and positions in the first row. Uses IFilter and SQL command from StmtSrc.

Parameters:
filter - The IFilter to be used to select rows.
columns - The names of column to be extracted.
Throws:
SQLTupleException - if can't get subNTuple.

skip

public void skip(int rows)
Skip rows.

Specified by:
skip in interface ITuple
Overrides:
skip in class AbstractTuple
Parameters:
rows - The number of rows to skip.

next

public boolean next()
Go into the next row.

Specified by:
next in interface ITuple
Overrides:
next in class AbstractTuple
Returns:
true if success.

getRowData

public String[] getRowData()
SQLTuple extension: return current Row Data.

Returns:
The array of Strings representing the current row.

addRow

public void addRow()
Add the current row into NTuple and reset. Not set columns are set to their default values.

Specified by:
addRow in interface ITuple
Specified by:
addRow in class AbstractTuple

prepare

public void prepare()
Prepare statement for adding row.


columnName

public String columnName(int param)
Gets the name of the column number param.

Specified by:
columnName in interface ITuple
Specified by:
columnName in interface FTuple
Specified by:
columnName in class AbstractTuple
Parameters:
param - The number of column.
Returns:
The name of the column.

columnNumber

public int columnNumber(String name)
                 throws IllegalArgumentException
Gets the number of the column name name.

Parameters:
name - The number of column.
Returns:
The number of the column.
Throws:
IllegalArgumentException - if no column with that name exists.

columnNames

public String[] columnNames()
Get all column names.

Specified by:
columnNames in interface ITuple
Overrides:
columnNames in class AbstractTuple
Returns:
The array of Strings with all column names.

columnType

public Class columnType(int param)
Get the type of the column number param.

Specified by:
columnType in interface ITuple
Specified by:
columnType in interface FTuple
Specified by:
columnType in class AbstractTuple
Parameters:
param - The number of column.
Returns:
The type of the column.

columnTypes

public Class[] columnTypes()
Get all column types.

Specified by:
columnTypes in interface ITuple
Overrides:
columnTypes in class AbstractTuple
Returns:
The array of Classes with all column types.

columnDefault

public String columnDefault(int param)
SQLTuple extension: Get the default value of the column number param.

Parameters:
param - The number of column.
Returns:
The default value of the column.

columnDefaultString

public String columnDefaultString(int column)
Give the default as a String.

Specified by:
columnDefaultString in class AbstractTuple
Parameters:
column - The number of column.
Returns:
The String representation of the default.

columnDefaults

public String[] columnDefaults()
SQLTuple extension: Get all column default values.

Returns:
The array of Strings with all column default values.

columns

public int columns()
Gets the number of columns.

Specified by:
columns in interface ITuple
Specified by:
columns in interface FTuple
Specified by:
columns in class AbstractTuple
Returns:
The number of columns.

reset

public void reset()
Reset the NTuple/table, close it.

Specified by:
reset in interface ITuple
Specified by:
reset in class AbstractTuple

resetRow

public void resetRow()
              throws IllegalArgumentException
Reset the current row.

Specified by:
resetRow in interface ITuple
Specified by:
resetRow in class AbstractTuple
Throws:
IllegalArgumentException

rows

public int rows()
         throws IllegalArgumentException
Get the number of rows.

Specified by:
rows in interface ITuple
Specified by:
rows in interface FTuple
Specified by:
rows in class AbstractTuple
Returns:
The number of rows.
Throws:
IllegalArgumentException

column

public IBaseTupleColumn column(int index)
Get column.

Specified by:
column in interface ITuple
Overrides:
column in class AbstractTuple
Parameters:
index - The column number.
Returns:
The requested TupleColumn

columnByName

public FTupleColumn columnByName(String name)
Get column.

Specified by:
columnByName in interface FTuple
Overrides:
columnByName in class AbstractTuple
Parameters:
name - The column name.
Returns:
The requested TupleColumn

findTuple

public ITuple findTuple(int index)
                 throws UnsupportedOperationException
Give nested ITuple. It is not supported.

Specified by:
findTuple in interface ITuple
Specified by:
findTuple in class AbstractTuple
Parameters:
index - The column's index of the Folder.
Returns:
The nested ITuple.
Throws:
UnsupportedOperationException - always, because opereation is not supported.

cursor

public FTupleCursor cursor()
                    throws IllegalStateException
Get FTupleCursor.

Specified by:
cursor in interface FTuple
Overrides:
cursor in class AbstractTuple
Returns:
The requested FTupleCursor
Throws:
IllegalStateException

columnValue

public void columnValue(int column,
                        Value value)
Get Value of column at FTupleCursor.

Specified by:
columnValue in class AbstractTuple
Parameters:
column - The column, value of which is requested.
value - The Value to be filled.

columnValue

public void columnValue(int column,
                        FTupleCursor cursor,
                        Value value)
Get Value of column at FTupleCursor.

Specified by:
columnValue in interface FTuple
Overrides:
columnValue in class AbstractTuple
Parameters:
column - The column, value of which is requested.
cursor - The FTupleCursor pointing to requested row.
value - The Value to be filled.

getDouble

private double getDouble(ResultSet rs,
                         int i)
                  throws IllegalArgumentException
Get double value from the ResultSet. If direct rs.getDouble(...) fails, rs.getString(...) and conversion to String is tried.

Parameters:
rs - The ResultSet to be used. The current row will be inspected.
i - The column to be used.
Returns:
The found double value.
Throws:
IllegalArgumentException - if double value can't be extracted, even via String value.

project

public void project(ICloud1D cloud,
                    IEvaluator evaluatorX)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(ICloud1D cloud,
                    IEvaluator evaluatorX,
                    IEvaluator weight)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(ICloud1D cloud,
                    IEvaluator evaluatorX,
                    IFilter filter)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(ICloud1D cloud,
                    IEvaluator evaluatorX,
                    IFilter filter,
                    IEvaluator weight)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(ICloud2D cloud,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(ICloud2D cloud,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY,
                    IEvaluator weight)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(ICloud2D cloud,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY,
                    IFilter filter)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(ICloud2D cloud,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY,
                    IFilter filter,
                    IEvaluator weight)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(ICloud3D cloud,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY,
                    IEvaluator evaluatorZ)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(ICloud3D cloud,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY,
                    IEvaluator evaluatorZ,
                    IEvaluator weight)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(ICloud3D cloud,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY,
                    IEvaluator evaluatorZ,
                    IFilter filter)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(ICloud3D cloud,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY,
                    IEvaluator evaluatorZ,
                    IFilter filter,
                    IEvaluator weight)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(IHistogram1D histogram,
                    IEvaluator evaluatorX)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(IHistogram1D histogram,
                    IEvaluator evaluatorX,
                    IEvaluator weight)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(IHistogram1D histogram,
                    IEvaluator evaluatorX,
                    IFilter filter)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(IHistogram1D histogram,
                    IEvaluator evaluatorX,
                    IFilter filter,
                    IEvaluator weight)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(IHistogram2D histogram,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(IHistogram2D histogram,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY,
                    IEvaluator weight)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(IHistogram2D histogram,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY,
                    IFilter filter)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(IHistogram2D histogram,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY,
                    IFilter filter,
                    IEvaluator weight)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(IHistogram3D histogram,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY,
                    IEvaluator evaluatorZ)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(IHistogram3D histogram,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY,
                    IEvaluator evaluatorZ,
                    IEvaluator weight)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(IHistogram3D histogram,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY,
                    IEvaluator evaluatorZ,
                    IFilter filter)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(IHistogram3D histogram,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY,
                    IEvaluator evaluatorZ,
                    IFilter filter,
                    IEvaluator weight)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(IProfile1D profile,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(IProfile1D profile,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY,
                    IEvaluator weight)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(IProfile1D profile,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY,
                    IFilter filter)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(IProfile1D profile,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY,
                    IFilter filter,
                    IEvaluator weight)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(IProfile2D profile,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY,
                    IEvaluator evaluatorZ)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(IProfile2D profile,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY,
                    IEvaluator evaluatorZ,
                    IEvaluator weight)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(IProfile2D profile,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY,
                    IEvaluator evaluatorZ,
                    IFilter filter)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

project

public void project(IProfile2D profile,
                    IEvaluator evaluatorX,
                    IEvaluator evaluatorY,
                    IEvaluator evaluatorZ,
                    IFilter filter,
                    IEvaluator weight)
             throws IllegalArgumentException
Specified by:
project in interface ITuple
Overrides:
project in class AbstractTuple
Throws:
IllegalArgumentException

getColumn

public Collection<String> getColumn(String cName)
SQLTuple extension: get the whole column as an array of Strings.

Parameters:
cName - The name of the column.
Returns:
The Collection containing the whole column as Strings.

getColumn

public <T> Collection<T> getColumn(String cName,
                                   Class<T> cl)
SQLTuple extension: get the whole column as an array of Objects of the specified Class (which has to have a String constructor).

Parameters:
cName - The name of the column.
cl - The Class (with String constructor) to be used to create Objects for Collection.
Returns:
The Collection containing the whole column as Objects of specified Class.

getColumn

public Collection<String> getColumn(String cName,
                                    IFilter filter)
SQLTuple extension: get the filtered column as an array of Strings.

Parameters:
cName - The name of the column.
filter - The IFilter to be used to select rows.
Returns:
The [@link Collection} containing the whole column as Strings.

getColumn

public <T> Collection<T> getColumn(String cName,
                                   Class<T> cl,
                                   IFilter filter)
SQLTuple extension: get the filtered column as an array of Objects of the specified Class (it has to have a String constructor).

Parameters:
cName - The name of the column.
cl - The Class (with String constructor) to be used to create Objects for Collection.
filter - The IFilter to be used to select rows.
Returns:
The Collection containing the whole column as Objects of specified Class.

setOptions

public void setOptions(String options)
                throws SQLTupleException
Register options.

Parameters:
options - The options string to be registered.
Throws:
SQLTupleException - if Accessor can't be created.

accessor

public Accessor accessor()
Get attached Accessor.

Returns:
The associated Accessor.

update

private int update(String statementString,
                   String[] args)
            throws IllegalArgumentException
Perform update operation via StmtSrc.

Parameters:
statementString - The SQL statement to be used.
args - The arguments to be filled into the SQL statement in place of X*.
Returns:
The number of added rows.
Throws:
IllegalArgumentException - if the update can't be performed.

updatePrepared

private int updatePrepared(PreparedStatement statement)
                    throws SQLTupleException
Perform update operation via StmtSrc using PreparedStatement.

Parameters:
statement - The SQL PreparedStatement to be used.
Returns:
The number of added rows.
Throws:
SQLTupleException - if the update can't be performed.

query

private ResultSet query(String statementString,
                        String[] args)
                 throws IllegalArgumentException
Perform query operation via StmtSrc.

Parameters:
statementString - The SQL statement to be used.
args - The arguments to be filled into the SQL statement in place of X*.
Returns:
The results of the SQL command.
Throws:
IllegalArgumentException - if the update can't be performed.

stmtSrc

public StmtSrc stmtSrc()
Give attached StmtSrc.

Returns:
The attached StmtSrc.

setStmtSrc

public void setStmtSrc(String url)
Attached StmtSrc.

Parameters:
url - The StmtSrc to be attached.

type2Object

private Object type2Object(String value,
                           Class type)
Create Object from String value.

Parameters:
value - The value as String.
type - The type of the requested Object.
Returns:
The Object of the requested type with the requested value.

Written by: J.Hrivnac

Documentation built November 9 2010 on Linux by hrivnac