|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.informatica.data.SampleDataset
public class SampleDataset
Provides a random set of data for a given Metadata.
| Constructor Summary | |
|---|---|
SampleDataset(MetaData md,
int maxRows)
|
|
| 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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SampleDataset(MetaData md,
int maxRows)
| Method Detail |
|---|
public Date getDate(FieldName id)
throws DatasetException
Dataset
getDate in interface DatasetDatasetException - if the data repository produced an error.
public Date getDate(int i)
throws DatasetException
Dataset
getDate in interface DatasetDatasetException - if the data repository produced an error.
public double getDouble(FieldName id)
throws DatasetException
Dataset
getDouble in interface DatasetDatasetException - if the data repository produced an error.
public double getDouble(int i)
throws DatasetException
Dataset
getDouble in interface DatasetDatasetException - if the data repository produced an error.
public int getInt(FieldName id)
throws DatasetException
Dataset
getInt in interface DatasetDatasetException - if the data repository produced an error.
public int getInt(int i)
throws DatasetException
Dataset
getInt in interface DatasetDatasetException - if the data repository produced an error.
public Object getObject(FieldName id)
throws DatasetException
Dataset
getObject in interface DatasetDatasetException - if the data repository produced an error.
public Object getObject(int i)
throws DatasetException
Dataset
getObject in interface DatasetDatasetException - if the data repository produced an error.
public long getLong(FieldName id)
throws DatasetException
Dataset
getLong in interface DatasetDatasetException - if the data repository produced an error.
public long getLong(int i)
throws DatasetException
Dataset
getLong in interface DatasetDatasetException - if the data repository produced an error.
public String getString(FieldName id)
throws DatasetException
Dataset
getString in interface DatasetDatasetException - if the data repository produced an error.
public String getString(int i)
throws DatasetException
Dataset
getString in interface DatasetDatasetException - if the data repository produced an error.
public Object evaluate(String id)
throws DatasetException
Datasetevaluate 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.
evaluate in interface Datasetid - Fully qualified function name (package.object.function) or
fqfn
DatasetException - if the data repository produced an error.public String getLabel()
Dataset
getLabel in interface Dataset
public boolean isEmpty()
throws DatasetException
isEmpty in interface DatasetDatasetException
public boolean next()
throws DatasetException
Dataset
next in interface DatasetDatasetException - if the data repository produced an error.
public int getColumnCount()
throws DatasetException
getColumnCount in interface DatasetDatasetException - if the data repository produced an error.
public String getCatalogName(int i)
throws DatasetException
Dataset
getCatalogName in interface DatasetDatasetException - if the data repository produced an error.
public FieldName getColumnName(int i)
throws DatasetException
Dataset
getColumnName in interface DatasetDatasetException
public MetaData getMetaData()
throws DataException
Dataset
getMetaData in interface DatasetDataException - if the data repository produced an error.
public boolean isAfterLast()
throws DatasetException
Dataset
isAfterLast in interface DatasetDatasetException - if the data repository produced an error.
public boolean isLast()
throws DatasetException
DatasetEvaluation of this method could be expensive.
isLast in interface DatasetDatasetException - if the data repository produced an error.
public void reset()
throws DatasetException
DatasetThis 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.
reset in interface DatasetDatasetException - if an error happened when resetting the data.
public void close()
throws DatasetException
DatasetNo further work is possible with the Dataset after closing it.
close in interface DatasetDatasetException - if an error happens when closing the Dataset.
public int findColumn(FieldName name)
throws DatasetException
Dataset
findColumn in interface DatasetDatasetException - if an error happens when accessing the data.
public Map<FieldName,Object> getMap()
throws DatasetException
DatasetOptional operation.
getMap in interface DatasetDatasetException - if an error happens when creating the Map.public void setEnviron(Map<String,? extends Object> environ)
Dataset
setEnviron in interface Datasetenviron - a Map with the environment.public Map<String,? extends Object> getEnviron()
Dataset
getEnviron in interface Dataset
public Dataset getNestedSet(String datasetName)
throws DatasetException
DatasetThis is an optional operation. Datasets not supporting it must throw an UnsupportedOperationException.
getNestedSet in interface DatasetdatasetName - the name of the requested Dataset.
DatasetException - if the data repository produced an error.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||