|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectliquibase.util.csv.opencsv.bean.AbstractCSVToBean
liquibase.util.csv.opencsv.bean.CsvToBean<T>
T
- - class to convert the objects to.public class CsvToBean<T>
Converts CSV data to objects.
Constructor Summary | |
---|---|
CsvToBean()
Default constructor. |
Method Summary | |
---|---|
protected PropertyEditor |
getPropertyEditor(PropertyDescriptor desc)
Attempt to find custom property editor on descriptor first, else try the propery editor manager. |
List<T> |
parse(MappingStrategy<T> mapper,
CSVReader csv)
parse the values from the csvReader. |
List<T> |
parse(MappingStrategy<T> mapper,
CSVReader csv,
CsvToBeanFilter filter)
parse the values from the csvReader. |
List<T> |
parse(MappingStrategy<T> mapper,
Reader reader)
parse the values from a csvReader constructed from the passed in Reader. |
List<T> |
parse(MappingStrategy<T> mapper,
Reader reader,
CsvToBeanFilter filter)
parse the values from a csvReader constructed from the passed in Reader. |
protected T |
processLine(MappingStrategy<T> mapper,
String[] line)
Creates a single object from a line from the csv file. |
Methods inherited from class liquibase.util.csv.opencsv.bean.AbstractCSVToBean |
---|
checkForTrim, convertValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CsvToBean()
Method Detail |
---|
public List<T> parse(MappingStrategy<T> mapper, Reader reader)
mapper
- - mapping strategy for the bean.reader
- - Reader used to construct a CSVReader
public List<T> parse(MappingStrategy<T> mapper, Reader reader, CsvToBeanFilter filter)
mapper
- - mapping strategy for the bean.reader
- - Reader used to construct a CSVReaderfilter
- - CsvToBeanFilter to apply - null if no filter.
public List<T> parse(MappingStrategy<T> mapper, CSVReader csv)
mapper
- - mapping strategy for the bean.csv
- - CSVReader
public List<T> parse(MappingStrategy<T> mapper, CSVReader csv, CsvToBeanFilter filter)
mapper
- - mapping strategy for the bean.csv
- - CSVReaderfilter
- - CsvToBeanFilter to apply - null if no filter.
protected T processLine(MappingStrategy<T> mapper, String[] line) throws IllegalAccessException, InvocationTargetException, InstantiationException, IntrospectionException
mapper
- - MappingStrategyline
- - array of Strings from the csv file.
IllegalAccessException
- - thrown on error creating bean.
InvocationTargetException
- - thrown on error calling the setters.
InstantiationException
- - thrown on error creating bean.
IntrospectionException
- - thrown on error getting the PropertyDescriptor.protected PropertyEditor getPropertyEditor(PropertyDescriptor desc) throws InstantiationException, IllegalAccessException
getPropertyEditor
in class AbstractCSVToBean
desc
- - PropertyDescriptor.
InstantiationException
- - thrown when getting the PropertyEditor for the class.
IllegalAccessException
- - thrown when getting the PropertyEditor for the class.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |