Skip to main content
Version: 2.25.x.x Java 8 ELS

BeanDataSource

The BeanDataSource uses java collections as the source for records to be exported. It iterates either over a java collection, an iterator or a java array and returns the contained objects. Its main purpose is to support testing but is also very helpful to provide data sets to be exported when the nevisDataPorter is used within an application. The following configuration parameters are supported.

The BeanDataSource expects the collection to contain data of the type ObjectMap. If this is not the case, a new ObjectMap is created and the original bean is made available as the attribute value.

Null is mapped to an empty list.

Configuration

NameType, usage constraints, defaultsDescription
beanrequired: paraVal
default: none
type: array, list, map, iterator
Java object containing the source record to iterate over. The following collection types are supported: Array, java.util.List, java.util.Map, java.util.Iterator

Example

<dataSource type="BeanDataSource">
<dp:paraVal name="bean" value="${cfg.source}"/>
</dataSource>