T
- type of object you are converting the data to.public interface MappingStrategy<T>
Modifier and Type | Method and Description |
---|---|
void |
captureHeader(CSVReader reader)
Implementation of this method can grab the header line before parsing begins to use to map columns
to bean properties.
|
T |
createBean()
Implementation will return a bean of the type of object you are mapping.
|
PropertyDescriptor |
findDescriptor(int col)
Implementation will have to return a property descriptor from a bean based on the current column.
|
BeanField |
findField(int col)
Implementation will have to return - based on the current column - a BeanField containing
the
Field and a boolean representing whether the field is required (mandatory) or not. |
Integer |
getColumnIndex(String name)
Gets the column index that corresponds to a specific colum name.
|
boolean |
isAnnotationDriven()
Determines whether the mapping strategy is driven by
CsvBind annotations. |
PropertyDescriptor findDescriptor(int col) throws IntrospectionException
col
- the column to find the description forIntrospectionException
- - thrown on error loading the property descriptors.BeanField findField(int col)
Field
and a boolean representing whether the field is required (mandatory) or not.col
- the column to find the field forT createBean() throws InstantiationException, IllegalAccessException
InstantiationException
- - thrown on error creating object.IllegalAccessException
- - thrown on error creating object.void captureHeader(CSVReader reader) throws IOException
reader
- the CSVReader to use for header parsingIOException
- if parsing failsInteger getColumnIndex(String name)
name
- the column nameboolean isAnnotationDriven()
CsvBind
annotations.Copyright © 2017 Liquibase.org. All rights reserved.