|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Dataset
Interface to access sets of generic data.
| Method Summary | |
|---|---|
void |
close()
Closes the Dataset. |
Object |
evaluate(String id)
Sometimes you want to directly access a field or method and evaluate it, instead of getting the object and then accessing the field or calling the method. |
int |
findColumn(FieldName name)
Finds the index of the given column name of the dataset. |
String |
getCatalogName(int i)
Gets the designated data item's catalog name. |
int |
getColumnCount()
|
FieldName |
getColumnName(int i)
Gets the designated data item's column name. |
Date |
getDate(FieldName id)
Returns Date of name id. |
Date |
getDate(int i)
Returns Date of index i. |
double |
getDouble(FieldName id)
Returns double of name id |
double |
getDouble(int i)
Returns int of index i |
Map<String,? extends Object> |
getEnviron()
Gets a global "environment" Map, if available. |
int |
getInt(FieldName id)
Returns int of name id |
int |
getInt(int i)
Returns int of index i |
String |
getLabel()
Gets the label of this Set, or null if not available. |
long |
getLong(FieldName id)
Returns long of name id |
long |
getLong(int i)
Returns long of index i |
Map<FieldName,Object> |
getMap()
Gets a name -> values map containing the current data row. |
MetaData |
getMetaData()
Gets the meta data for this data set. |
Dataset |
getNestedSet(String datasetName)
It is allowed to have another Datasets nested to the current Dataset row. |
Object |
getObject(FieldName id)
Returns Object of name id |
Object |
getObject(int i)
Returns Object of index i |
String |
getString(FieldName id)
Returns String of name id. |
String |
getString(int i)
Returns String of index i. |
boolean |
isAfterLast()
Retrieves wether the dataset is after its last row. |
boolean |
isEmpty()
|
boolean |
isLast()
Retrieves wether the dataset is on its last row. |
boolean |
next()
Positions the Dataset at the next row of data. |
void |
reset()
Puts the Dataset cursor in the initial state, regardless of the current cursor state. |
void |
setEnviron(Map<String,? extends Object> environ)
Sets a global "environment" Map. |
| Method Detail |
|---|
Date getDate(FieldName id)
throws DatasetException
DatasetException - if the data repository produced an error.
Date getDate(int i)
throws DatasetException
DatasetException - if the data repository produced an error.
double getDouble(FieldName id)
throws DatasetException
DatasetException - if the data repository produced an error.
double getDouble(int i)
throws DatasetException
DatasetException - if the data repository produced an error.
int getInt(FieldName id)
throws DatasetException
DatasetException - if the data repository produced an error.
int getInt(int i)
throws DatasetException
DatasetException - if the data repository produced an error.
Object getObject(FieldName id)
throws DatasetException
DatasetException - if the data repository produced an error.
Object getObject(int i)
throws DatasetException
DatasetException - if the data repository produced an error.
long getLong(FieldName id)
throws DatasetException
DatasetException - if the data repository produced an error.
long getLong(int i)
throws DatasetException
DatasetException - if the data repository produced an error.
String getString(FieldName id)
throws DatasetException
DatasetException - if the data repository produced an error.
String getString(int i)
throws DatasetException
DatasetException - if the data repository produced an error.
Object evaluate(String id)
throws DatasetException
evaluate method provides a way to do that, and
when called it will either return a variable named id or a
method evaluation of the style package.object.method.
id - Fully qualified function name (package.object.function) or
fqfn
DatasetException - if the data repository produced an error.String getLabel()
boolean isEmpty()
throws DatasetException
DatasetException
boolean next()
throws DatasetException
DatasetException - if the data repository produced an error.
int getColumnCount()
throws DatasetException
DatasetException - if the data repository produced an error.
String getCatalogName(int i)
throws DatasetException
DatasetException - if the data repository produced an error.
FieldName getColumnName(int i)
throws DatasetException
DatasetException
MetaData getMetaData()
throws DataException
DataException - if the data repository produced an error.
boolean isAfterLast()
throws DatasetException
DatasetException - if the data repository produced an error.
boolean isLast()
throws DatasetException
Evaluation of this method could be expensive.
DatasetException - if the data repository produced an error.
void reset()
throws DatasetException
This method allows the reuse of a Dataset object after all rows have been extracted by the use of the next() function.
This method is optional. Implementations are required to throw an UnsupportedOperationException in case they do not implement it.
DatasetException - if an error happened when resetting the data.
UnsupportedOperationException - if method is not implemented.
void close()
throws DatasetException
No further work is possible with the Dataset after closing it.
DatasetException - if an error happens when closing the Dataset.
int findColumn(FieldName name)
throws DatasetException
DatasetException - if an error happens when accessing the data.
Map<FieldName,Object> getMap()
throws DatasetException
Optional operation.
DatasetException - if an error happens when creating the Map.
IllegalStateException - if data is not available because of a state problem (for
example, next() not been called).
UnsupportedOperationException - if the class does not support this method.Map<String,? extends Object> getEnviron()
void setEnviron(Map<String,? extends Object> environ)
environ - a Map with the environment.
Dataset getNestedSet(String datasetName)
throws DatasetException
This is an optional operation. Datasets not supporting it must throw an UnsupportedOperationException.
datasetName - the name of the requested Dataset.
DatasetException - if the data repository produced an error.
UnsupportedOperationException - if this Dataset does not support nested Datasets.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||