|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthep.aida.ref.event.AIDAObservable
hep.aida.ref.ManagedObject
hep.aida.ref.tuple.AbstractTuple
hep.aida.ref.sql.SQLTuple
public class SQLTuple
SQLTuple
is an extension of ITuple
for SQL database.
SQLTuple
contains several extensions to ITuple
and ITuple
:
void addIndex(String[] columnName);
void addColumn(String columnName, Class columnType, IEvaluator evaluator);
void start(IFilter filter);
void start(String[] columns);
void start(IFilter filter, String[] columns);
void start(String stmtSrc);
void start(IFilter filter, String stmtSrc);
String[] getRowData();
boolean getBoolean(String column);
byte getByte(String column);
char getChar(String column);
short getShort(String column);
int getInt(String column);
long getLong(String column);
float getFloat(String column);
double getDouble(String column);
String getString(String column);
Object getObject(String column);
ITuple getTuple(String column);
void fill(String column, boolean value);
void fill(String column, byte value);
void fill(String column, char value);
void fill(String column, short value);
void fill(String column, int value);
void fill(String column, long value);
void fill(String column, float value);
void fill(String column, double value);
void fill(String column, String value);
void fill(String column, Object value);
void fill(String column, ITuple value);
double groupValue(String operator, int column);
String columnDefault(int param);
String[] columnDefaults();
Collection getColumn(String cName);
<T> Collection<T> getColumn(String cName, Class<T> cl);
Collection getColumn(String cName, IFilter filter);
<T> Collection<T> getColumn(String cName, Class<T> cl, IFilter filter);
$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.
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 |
|
double |
columnMean(int column)
Use SQL avg |
|
double |
columnMin(int column)
Use SQL min |
|
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 |
|
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. |
|
|
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). |
|
|
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 |
---|
private Accessor _accessor
private StmtSrc _stmtSrc
private PreparedStatement _statement
private ResultSet _rs
private String[] _names
private Class[] _types
private String[] _defaults
private Object[] _defaultObjects
private String[] _namesOrig
private Class[] _typesOrig
private String[] _defaultsOrig
private Object[] _defaultObjectsOrig
private boolean[] _filled
private int _rows
private boolean _readOnly
private static Logger log
Constructor Detail |
---|
public SQLTuple(String name, String title, String[] columnName, Class[] columnType, String options)
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.public SQLTuple(String name, String title, String columnsString, String options)
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 |
---|
protected void initSQLTuple(String name, String title, String[] columnName, Class[] columnType, String options) throws IllegalArgumentException
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.
IllegalArgumentException
- if the ITuple can't be created.public void addIndex(String[] columnName)
SQLTuple
extension: add indexes into SQL table.
columnName
- The array of column names to be indexed.public void addColumn(String columnName, Class columnType, IEvaluator evaluator)
SQLTuple
extension: add column into SQL table.
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.public boolean isInMemory()
SQLTuple
is never in memory => false.
isInMemory
in interface FTuple
isInMemory
in class AbstractTuple
false
.public double columnMin(int column)
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.
public double columnMax(int column)
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.
public double columnMean(int column)
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.
public double columnRms(int column)
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.
private double groupValue(String operator, int column)
operator
- The operator to be applied..column
- The column to be evalated.
IllegalArgumentException
- if the operator can't be applied on the column.public double groupValue(String operator, String column)
operator
- The operator to be applied..column
- The column formula to be evalated.
IllegalArgumentException
- if the operator can't be applied on the column.public int findColumn(String name) throws IllegalArgumentException
findColumn
in interface ITuple
findColumn
in class AbstractTuple
name
- The name of the column.
IllegalArgumentException
- if no column of that name exists.public boolean getBoolean(String column)
column
- The column name.
public boolean getBoolean(int column)
getBoolean
in interface ITuple
getBoolean
in class AbstractTuple
column
- The column number.
public byte getByte(String column)
column
- The column name.
public byte getByte(int column)
getByte
in interface ITuple
getByte
in class AbstractTuple
column
- The column number.
public char getChar(String column)
column
- The column name.
public char getChar(int column)
getChar
in interface ITuple
getChar
in class AbstractTuple
column
- The column number.
public double getDouble(String column)
column
- The column name.
public double getDouble(int column)
getDouble
in interface ITuple
getDouble
in class AbstractTuple
column
- The column number.
public float getFloat(String column)
column
- The column name.
public float getFloat(int column)
getFloat
in interface ITuple
getFloat
in class AbstractTuple
column
- The column number.
public int getInt(String column)
column
- The column name.
public int getInt(int column)
getInt
in interface ITuple
getInt
in class AbstractTuple
column
- The column number.
public long getLong(String column)
column
- The column name.
public long getLong(int column)
getLong
in interface ITuple
getLong
in class AbstractTuple
column
- The column number.
public Object getObject(String column)
column
- The column name.
public Object getObject(int column)
getObject
in interface ITuple
getObject
in class AbstractTuple
column
- The column number.
public short getShort(String column)
column
- The column name.
public short getShort(int column)
getShort
in interface ITuple
getShort
in class AbstractTuple
column
- The column number.
public String getString(String column)
column
- The column name.
public String getString(int column)
getString
in interface ITuple
getString
in class AbstractTuple
column
- The column number.
public ITuple getTuple(String column)
column
- The column name.
public void fill(int column, Value value) throws IllegalArgumentException
Value
in a column.
fill
in class AbstractTuple
column
- The column name.value
- The Value
to be filled in the current row.
IllegalArgumentException
- if Value
can't be filled.public void fill(String column, int value) throws IllegalArgumentException
column
- The column name.value
- The value to be filled in the current row.
IllegalArgumentException
- if value can't be filled.public void fill(int column, int value) throws IllegalArgumentException
fill
in interface ITuple
fill
in class AbstractTuple
column
- The column number.value
- The value to be filled in the current row.
IllegalArgumentException
- if value can't be filled.public void fill(String column, short value) throws IllegalArgumentException
column
- The column name.value
- The value to be filled in the current row.
IllegalArgumentException
- if value can't be filled.public void fill(int column, short value) throws IllegalArgumentException
fill
in interface ITuple
fill
in class AbstractTuple
column
- The column number.value
- The value to be filled in the current row.
IllegalArgumentException
- if value can't be filled.public void fill(String column, long value) throws IllegalArgumentException
column
- The column name.value
- The value to be filled in the current row.
IllegalArgumentException
- if value can't be filled.public void fill(int column, long value) throws IllegalArgumentException
fill
in interface ITuple
fill
in class AbstractTuple
column
- The column number.value
- The value to be filled in the current row.
IllegalArgumentException
- if value can't be filled.public void fill(String column, double value) throws IllegalArgumentException
column
- The column name.value
- The value to be filled in the current row.
IllegalArgumentException
- if value can't be filled.public void fill(int column, double value) throws IllegalArgumentException
fill
in interface ITuple
fill
in class AbstractTuple
column
- The column number.value
- The value to be filled in the current row.
IllegalArgumentException
- if value can't be filled.public void fill(String column, float value) throws IllegalArgumentException
column
- The column name.value
- The value to be filled in the current row.
IllegalArgumentException
- if value can't be filled.public void fill(int column, float value) throws IllegalArgumentException
fill
in interface ITuple
fill
in class AbstractTuple
column
- The column number.value
- The value to be filled in the current row.
IllegalArgumentException
- if value can't be filled.public void fill(String column, boolean value) throws IllegalArgumentException
column
- The column name.value
- The value to be filled in the current row.
IllegalArgumentException
- if value can't be filled.public void fill(int column, boolean value) throws IllegalArgumentException
fill
in interface ITuple
fill
in class AbstractTuple
column
- The column numbervalue
- The value to be filled in the current row.
IllegalArgumentException
- if value can't be filled.public void fill(String column, byte value) throws IllegalArgumentException
column
- The column namevalue
- The value to be filled in the current row.
IllegalArgumentException
- if value can't be filled.public void fill(int column, byte value) throws IllegalArgumentException
fill
in interface ITuple
fill
in class AbstractTuple
column
- The column number.value
- The value to be filled in the current row.
IllegalArgumentException
- if value can't be filled.public void fill(String column, char value) throws IllegalArgumentException
column
- The column name.value
- The value to be filled in the current row.
IllegalArgumentException
- if value can't be filled.public void fill(int column, char value) throws IllegalArgumentException
fill
in interface ITuple
fill
in class AbstractTuple
column
- The column number.value
- The value to be filled in the current row.
IllegalArgumentException
- if value can't be filled.public void fill(String column, String value) throws IllegalArgumentException
column
- The column name.value
- The value to be filled in the current row.
IllegalArgumentException
- if value can't be filled.public void fill(int column, String value) throws IllegalArgumentException
fill
in interface ITuple
fill
in class AbstractTuple
column
- The column number.value
- The value to be filled in the current row.
IllegalArgumentException
- if value can't be filled.public void fill(String column, Object value) throws IllegalArgumentException
column
- The column name.value
- The value to be filled in the current row.
IllegalArgumentException
- if value can't be filled.public void fill(int column, Object value) throws IllegalArgumentException
fill
in interface ITuple
fill
in class AbstractTuple
column
- The column number.value
- The value to be filled in the current row.
IllegalArgumentException
- if value can't be filled.public void fill(float[] values) throws IllegalArgumentException
fill
in interface ITuple
fill
in class AbstractTuple
values
- The values to be filled in the current row.
IllegalArgumentException
- if value can't be filled.public void fill(double[] values) throws IllegalArgumentException
fill
in interface ITuple
fill
in class AbstractTuple
values
- The values to be filled in the current row.
IllegalArgumentException
- if value can't be filled.public int row()
public int getRow()
getRow
in class AbstractTuple
public void setRow(int row) throws IllegalArgumentException
setRow
in interface ITuple
setRow
in class AbstractTuple
row
- The number of row to go to.
IllegalArgumentException
- if can't go to specified row.public void start()
start
in interface ITuple
start
in class AbstractTuple
public void start(IFilter filter) throws SQLTupleException
SQLTuple
extension: get subNTuple (subset of rows)
and positions in the first row. Use IFilter
.
filter
- The IFilter to be used to select rows.
SQLTupleException
- if can't get subNTuple.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
.
stmtSrc
- The SQL Stmt String to be used to select rows.
SQLTupleException
- if can't get subNTuple.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
.
filter
- The IFilter to be used to select rows.stmtSrc
- The SQL Stmt String to be used to select rows.
SQLTupleException
- if can't get subNTuple.public void start(String[] columns) throws SQLTupleException
SQLTuple
extension: get subNTuple (subset of columns)
and positions in the first row.
columns
- The names of column to be extracted.
SQLTupleException
- if can't get subNTuple.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
.
filter
- The IFilter to be used to select rows.columns
- The names of column to be extracted.
SQLTupleException
- if can't get subNTuple.public void skip(int rows)
skip
in interface ITuple
skip
in class AbstractTuple
rows
- The number of rows to skip.public boolean next()
next
in interface ITuple
next
in class AbstractTuple
public String[] getRowData()
SQLTuple
extension: return current Row Data.
public void addRow()
addRow
in interface ITuple
addRow
in class AbstractTuple
public void prepare()
public String columnName(int param)
param
.
columnName
in interface ITuple
columnName
in interface FTuple
columnName
in class AbstractTuple
param
- The number of column.
public int columnNumber(String name) throws IllegalArgumentException
name
.
name
- The number of column.
IllegalArgumentException
- if no column with that name exists.public String[] columnNames()
columnNames
in interface ITuple
columnNames
in class AbstractTuple
public Class columnType(int param)
param
.
columnType
in interface ITuple
columnType
in interface FTuple
columnType
in class AbstractTuple
param
- The number of column.
public Class[] columnTypes()
columnTypes
in interface ITuple
columnTypes
in class AbstractTuple
public String columnDefault(int param)
SQLTuple
extension:
Get the default value of the column number param
.
param
- The number of column.
public String columnDefaultString(int column)
columnDefaultString
in class AbstractTuple
column
- The number of column.
public String[] columnDefaults()
SQLTuple
extension:
Get all column default values.
public int columns()
columns
in interface ITuple
columns
in interface FTuple
columns
in class AbstractTuple
public void reset()
reset
in interface ITuple
reset
in class AbstractTuple
public void resetRow() throws IllegalArgumentException
resetRow
in interface ITuple
resetRow
in class AbstractTuple
IllegalArgumentException
public int rows() throws IllegalArgumentException
rows
in interface ITuple
rows
in interface FTuple
rows
in class AbstractTuple
IllegalArgumentException
public IBaseTupleColumn column(int index)
column
in interface ITuple
column
in class AbstractTuple
index
- The column number.
TupleColumn
public FTupleColumn columnByName(String name)
columnByName
in interface FTuple
columnByName
in class AbstractTuple
name
- The column name.
TupleColumn
public ITuple findTuple(int index) throws UnsupportedOperationException
ITuple
. It is not supported.
findTuple
in interface ITuple
findTuple
in class AbstractTuple
index
- The column's index of the Folder.
ITuple
.
UnsupportedOperationException
- always, because opereation is not supported.public FTupleCursor cursor() throws IllegalStateException
FTupleCursor
.
cursor
in interface FTuple
cursor
in class AbstractTuple
FTupleCursor
IllegalStateException
public void columnValue(int column, Value value)
Value
of column at FTupleCursor
.
columnValue
in class AbstractTuple
column
- The column, value of which is requested.value
- The Value
to be filled.public void columnValue(int column, FTupleCursor cursor, Value value)
Value
of column at FTupleCursor
.
columnValue
in interface FTuple
columnValue
in class AbstractTuple
column
- The column, value of which is requested.cursor
- The FTupleCursor
pointing to requested row.value
- The Value
to be filled.private double getDouble(ResultSet rs, int i) throws IllegalArgumentException
ResultSet
. If direct rs.getDouble(...)
fails, rs.getString(...)
and conversion to String is tried.
rs
- The ResultSet
to be used. The current row will be inspected.i
- The column to be used.
IllegalArgumentException
- if double value can't be extracted, even via String value.public void project(ICloud1D cloud, IEvaluator evaluatorX) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(ICloud1D cloud, IEvaluator evaluatorX, IEvaluator weight) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(ICloud1D cloud, IEvaluator evaluatorX, IFilter filter) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(ICloud1D cloud, IEvaluator evaluatorX, IFilter filter, IEvaluator weight) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(ICloud2D cloud, IEvaluator evaluatorX, IEvaluator evaluatorY) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(ICloud2D cloud, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator weight) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(ICloud2D cloud, IEvaluator evaluatorX, IEvaluator evaluatorY, IFilter filter) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(ICloud2D cloud, IEvaluator evaluatorX, IEvaluator evaluatorY, IFilter filter, IEvaluator weight) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(ICloud3D cloud, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(ICloud3D cloud, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ, IEvaluator weight) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(ICloud3D cloud, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ, IFilter filter) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(ICloud3D cloud, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ, IFilter filter, IEvaluator weight) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(IHistogram1D histogram, IEvaluator evaluatorX) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(IHistogram1D histogram, IEvaluator evaluatorX, IEvaluator weight) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(IHistogram1D histogram, IEvaluator evaluatorX, IFilter filter) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(IHistogram1D histogram, IEvaluator evaluatorX, IFilter filter, IEvaluator weight) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(IHistogram2D histogram, IEvaluator evaluatorX, IEvaluator evaluatorY) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(IHistogram2D histogram, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator weight) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(IHistogram2D histogram, IEvaluator evaluatorX, IEvaluator evaluatorY, IFilter filter) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(IHistogram2D histogram, IEvaluator evaluatorX, IEvaluator evaluatorY, IFilter filter, IEvaluator weight) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(IHistogram3D histogram, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(IHistogram3D histogram, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ, IEvaluator weight) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(IHistogram3D histogram, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ, IFilter filter) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(IHistogram3D histogram, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ, IFilter filter, IEvaluator weight) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(IProfile1D profile, IEvaluator evaluatorX, IEvaluator evaluatorY) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(IProfile1D profile, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator weight) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(IProfile1D profile, IEvaluator evaluatorX, IEvaluator evaluatorY, IFilter filter) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(IProfile1D profile, IEvaluator evaluatorX, IEvaluator evaluatorY, IFilter filter, IEvaluator weight) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(IProfile2D profile, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(IProfile2D profile, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ, IEvaluator weight) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(IProfile2D profile, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ, IFilter filter) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public void project(IProfile2D profile, IEvaluator evaluatorX, IEvaluator evaluatorY, IEvaluator evaluatorZ, IFilter filter, IEvaluator weight) throws IllegalArgumentException
project
in interface ITuple
project
in class AbstractTuple
IllegalArgumentException
public Collection<String> getColumn(String cName)
SQLTuple
extension: get the whole column as an array
of Strings.
cName
- The name of the column.
Collection
containing the whole column as Strings.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).
cName
- The name of the column.cl
- The Class (with String constructor) to be used to create Objects for Collection
.
Collection
containing the whole column as Objects of specified Class.public Collection<String> getColumn(String cName, IFilter filter)
SQLTuple
extension: get the filtered column as an array
of Strings.
cName
- The name of the column.filter
- The IFilter
to be used to select rows.
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).
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.
Collection
containing the whole column as Objects of specified Class.public void setOptions(String options) throws SQLTupleException
options
- The options string to be registered.
SQLTupleException
- if Accessor can't be created.public Accessor accessor()
Accessor
.
private int update(String statementString, String[] args) throws IllegalArgumentException
StmtSrc
.
statementString
- The SQL statement to be used.args
- The arguments to be filled into the SQL statement in place of X*.
IllegalArgumentException
- if the update can't be performed.private int updatePrepared(PreparedStatement statement) throws SQLTupleException
StmtSrc
using PreparedStatement
.
statement
- The SQL PreparedStatement
to be used.
SQLTupleException
- if the update can't be performed.private ResultSet query(String statementString, String[] args) throws IllegalArgumentException
StmtSrc
.
statementString
- The SQL statement to be used.args
- The arguments to be filled into the SQL statement in place of X*.
IllegalArgumentException
- if the update can't be performed.public StmtSrc stmtSrc()
StmtSrc
.
StmtSrc
.public void setStmtSrc(String url)
StmtSrc
.
url
- The StmtSrc
to be attached.private Object type2Object(String value, Class type)
value
- The value as String
.type
- The type of the requested Object.
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |