public class ConditionalBulkMapping<TEntity,TProperty> extends Object implements BulkMapping<TEntity>
Constructor and Description |
---|
ConditionalBulkMapping(String csvHeader,
Function<TEntity,Boolean> condition,
Function<TEntity,TProperty> fieldToCsv,
BiConsumer<String,TEntity> csvToField) |
Modifier and Type | Method and Description |
---|---|
void |
convertToCsv(TEntity entity,
RowValues values)
Moves a value from an object to a column in the CSV
|
void |
convertToEntity(RowValues values,
TEntity entity)
Moves a value from csv column to a field on an entity
|
public void convertToCsv(TEntity entity, RowValues values)
BulkMapping
convertToCsv
in interface BulkMapping<TEntity>
entity
- entity to pull value fromvalues
- CSV columns data to modifypublic void convertToEntity(RowValues values, TEntity entity)
BulkMapping
convertToEntity
in interface BulkMapping<TEntity>
values
- CSV valuesentity
- entity to modifyCopyright © 2024. All rights reserved.