public interface DataSource extends VariableSource
AbstractSource,
ArraySource,
ResourceSource,
ExcelSource| Modifier and Type | Method and Description |
|---|---|
String[] |
getColumns()
Returns an array of supported columns.
|
Object |
getData(int index) |
default <T> T |
getData(int index,
Class<T> objectType) |
Object |
getData(String column)
Return the object at the specified column.
|
default <T> T |
getData(String column,
Class<T> objectType)
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.
|
String |
next()
Moves the data source to the next row.
|
String |
reset()
Resets the data source.
|
default String |
reset(String mark) |
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.
|
boolean hasNext()
String next()
String reset()
String getSourceIdentifier()
String getLineIdentifier() throws IllegalSourceStateException
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 beendefault <T> T getData(String column, Class<T> objectType) throws IllegalSourceStateException, DataValidationException
T - column - the location where the object resides.objectType - the type of the return dataIllegalSourceStateException - 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 beenDataValidationException - when the data object is not of type
objectType.Object getData(String column) throws IllegalSourceStateException
getData 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 beendefault <T> T getData(int index,
Class<T> objectType)
throws IllegalSourceStateException,
DataValidationException
Object getData(int index) throws IllegalSourceStateException
IllegalSourceStateExceptionboolean setData(String column, Object value) throws Exception
setData in interface VariableSourcecolumn - the location where the object should be stored.value - the object to store.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 beenDataValidationException - when the data object is not of type
objectType.Exceptionboolean setData(int index,
Object value)
index - the location where the object should be stored.value - the object to store.String[] getColumns()
Copyright © 2015. All rights reserved.