TEntity
- public class ComplexBulkMapping<TEntity> extends Object implements BulkMapping<TEntity>
Constructor and Description |
---|
ComplexBulkMapping(BiConsumer<TEntity,RowValues> entityToCsv,
BiConsumer<RowValues,TEntity> csvToEntity) |
Modifier and Type | Method and Description |
---|---|
void |
convertToCsv(TEntity entity,
RowValues values)
Calls the custom function provided for entity to csv translation
|
void |
convertToEntity(RowValues values,
TEntity entity)
Calls the custom function provided for csv to entity translation
|
public ComplexBulkMapping(BiConsumer<TEntity,RowValues> entityToCsv, BiConsumer<RowValues,TEntity> csvToEntity)
entityToCsv
- Function describing reading an entity and setting the
appropriate columnscsvToEntity
- Function describes getting values from CSV columns and
setting the correct values onpublic void convertToEntity(RowValues values, TEntity entity)
convertToEntity
in interface BulkMapping<TEntity>
values
- CSV valuesentity
- entity to modifypublic void convertToCsv(TEntity entity, RowValues values)
convertToCsv
in interface BulkMapping<TEntity>
entity
- entity to pull value fromvalues
- CSV columns data to modifyCopyright © 2024. All rights reserved.