|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- type of object you are converting the data to.public interface MappingStrategy<T>
The interface for the classes that handle translating between the columns in the csv file to an actual object.
Method Summary | |
---|---|
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. |
Method Detail |
---|
PropertyDescriptor findDescriptor(int col) throws IntrospectionException
col
- the column to find the description for
IntrospectionException
- - 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 for
T 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 parsing
IOException
- if parsing failsInteger getColumnIndex(String name)
name
- the column name
boolean isAnnotationDriven()
CsvBind
annotations.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |