SelectorType
- SourceDataType
- TargetDataType
- public abstract class AbstractDataSource<SelectorType,SourceDataType,TargetDataType> extends Object implements DataSource<SelectorType,TargetDataType>
AbstractDataSource
is a convenience abstract class which fits well for Iterator
based results. It ensures
that getData(Object)
returns an immutable List
.Constructor and Description |
---|
AbstractDataSource() |
Modifier and Type | Method and Description |
---|---|
Iterable<TargetDataType> |
getData(SelectorType selector)
Returns the data for the given selector.
|
protected abstract Iterator<SourceDataType> |
getIterator(SelectorType selector)
Returns an iterator which traverses the source data types.
|
protected abstract TargetDataType |
mapDataSet(SourceDataType dataset)
Maps from the source type to the target type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canHandle, getSelectorType
protected abstract Iterator<SourceDataType> getIterator(SelectorType selector)
mapDataSet(Object)
.selector
- the selector which is used to determine the data to be providedprotected abstract TargetDataType mapDataSet(SourceDataType dataset)
getIterator(Object)
.dataset
- the object to be mappedpublic Iterable<TargetDataType> getData(SelectorType selector)
DataSource
getData
in interface DataSource<SelectorType,TargetDataType>
selector
- the selector which is used to determine the data to be providedCopyright © 2018–2020 b+m Informatik AG. All rights reserved.