public class SourceChain extends Object implements DataSource
| Constructor and Description |
|---|
SourceChain() |
SourceChain(DataSource... sources) |
SourceChain(DataSource source) |
SourceChain(DataSource source,
SourceChain next) |
| Modifier and Type | Method and Description |
|---|---|
String[] |
getColumns()
Returns an array of supported columns.
|
Object |
getData(int index) |
Object |
getData(String column)
Return the object at the specified column.
|
String |
getLineIdentifier()
Returns the line identifier.
|
String |
getSourceIdentifier()
Returns the source identifier.
|
boolean |
hasNext()
Return true if the data source has more rows.
|
SourceChain |
lastLink() |
SourceChain |
link(DataSource... sources) |
SourceChain |
link(DataSource source) |
String |
next()
Moves the data source to the next row.
|
String |
reset()
Resets the data source.
|
boolean |
setData(int index,
Object value)
Sets the specified value to the specivied column.
|
boolean |
setData(String column,
Object value)
Return the object at the specified index.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetData, getData, resetpublic SourceChain()
public SourceChain(DataSource source)
public SourceChain(DataSource source, SourceChain next)
public SourceChain(DataSource... sources)
public SourceChain link(DataSource... sources)
public SourceChain link(DataSource source)
public SourceChain lastLink()
public boolean hasNext()
DataSourcehasNext in interface DataSourcepublic String next()
DataSourcenext in interface DataSourcepublic String reset()
DataSourcereset in interface DataSourcepublic String getSourceIdentifier()
DataSourcegetSourceIdentifier in interface DataSourcepublic String getLineIdentifier() throws IllegalSourceStateException
DataSourcegetLineIdentifier in interface DataSourceIllegalSourceStateException - when the method could not be called
due to the state of the source i.e. next() has not been called or this
method is not supported by the data source. when next() has not beenpublic Object getData(String column) throws IllegalSourceStateException
DataSourcegetData in interface DataSourcegetData in interface VariableSourcecolumn - the location where the object resides.IllegalSourceStateException - when the method could not be called
due to the state of the source i.e. next() has not been called or this
method is not supported by the data source. when next() has not beenpublic Object getData(int index) throws IllegalSourceStateException
getData in interface DataSourceIllegalSourceStateExceptionpublic boolean setData(String column, Object value) throws Exception
DataSourcesetData in interface DataSourcesetData in interface VariableSourcecolumn - the location where the object should be stored.value - the object to store.Exceptionpublic boolean setData(int index,
Object value)
DataSourcesetData in interface DataSourceindex - the location where the object should be stored.value - the object to store.public String[] getColumns()
DataSourcegetColumns in interface DataSourceCopyright © 2015. All rights reserved.