T
- - class to convert the objects to.public class CsvToBean<T> extends AbstractCSVToBean
Constructor and Description |
---|
CsvToBean()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
checkForTrim, convertValue
public List<T> parse(MappingStrategy<T> mapper, Reader reader)
mapper
- - mapping strategy for the bean.reader
- - Reader used to construct a CSVReaderpublic 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
- - CSVReaderpublic 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 ReflectiveOperationException, IntrospectionException
mapper
- - MappingStrategyline
- - array of Strings from the csv file.ReflectiveOperationException
- - thrown on error accessing bean.IntrospectionException
- - thrown on error getting the PropertyDescriptor.protected PropertyEditor getPropertyEditor(PropertyDescriptor desc) throws ReflectiveOperationException
getPropertyEditor
in class AbstractCSVToBean
desc
- - PropertyDescriptor.ReflectiveOperationException
- - thrown when getting the PropertyEditor for the class.Copyright © 2019 Liquibase.org. All rights reserved.