public class HeaderColumnNameMappingStrategy extends Object implements MappingStrategy
| Modifier and Type | Field and Description |
|---|---|
protected PropertyDescriptor[] |
descriptors |
protected String[] |
header |
protected Class |
type |
| Constructor and Description |
|---|
HeaderColumnNameMappingStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
captureHeader(CSVReader reader)
Implemention of this method can grab the header line before parsing begins to use to map columns
to bean properties.
|
Object |
createBean() |
PropertyDescriptor |
findDescriptor(int col)
Implementation will have to return a property descriptor from a bean based on the current column.
|
protected PropertyDescriptor |
findDescriptor(String name) |
protected String |
getColumnName(int col) |
Class |
getType() |
protected PropertyDescriptor[] |
loadDescriptors(Class cls) |
protected boolean |
matches(String name,
PropertyDescriptor desc) |
void |
setType(Class type) |
protected String[] header
protected PropertyDescriptor[] descriptors
protected Class type
public void captureHeader(CSVReader reader) throws IOException
MappingStrategycaptureHeader in interface MappingStrategyIOExceptionpublic PropertyDescriptor findDescriptor(int col) throws IntrospectionException
MappingStrategyfindDescriptor in interface MappingStrategyIntrospectionExceptionprotected String getColumnName(int col)
protected PropertyDescriptor findDescriptor(String name) throws IntrospectionException
IntrospectionExceptionprotected boolean matches(String name, PropertyDescriptor desc)
protected PropertyDescriptor[] loadDescriptors(Class cls) throws IntrospectionException
IntrospectionExceptionpublic Object createBean() throws InstantiationException, IllegalAccessException
createBean in interface MappingStrategyInstantiationExceptionIllegalAccessExceptionpublic Class getType()
public void setType(Class type)
Copyright © 2015 Liquibase.org. All rights reserved.