org.onebusaway.csv_entities.schema
Class AbstractFieldMapping
java.lang.Object
org.onebusaway.csv_entities.schema.AbstractFieldMapping
- All Implemented Interfaces:
- FieldMapping, SingleFieldMapping
- Direct Known Subclasses:
- DefaultFieldMapping
public abstract class AbstractFieldMapping
- extends Object
- implements SingleFieldMapping
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_entityType
protected final Class<?> _entityType
_csvFieldName
protected final String _csvFieldName
_objFieldName
protected final String _objFieldName
_required
protected final boolean _required
_order
protected int _order
_defaultValue
protected String _defaultValue
_isSetMethod
protected Method _isSetMethod
AbstractFieldMapping
public AbstractFieldMapping(Class<?> entityType,
String csvFieldName,
String objFieldName,
boolean required)
setOrder
public void setOrder(int order)
setDefaultValue
public void setDefaultValue(String defaultValue)
setIsSetMethod
public void setIsSetMethod(Method isSetMethod)
getCsvFieldName
public String getCsvFieldName()
SingleFieldMapping
- Specified by:
getCsvFieldName in interface SingleFieldMapping
- Returns:
- the CSV name of the mapped field.
getObjFieldName
public String getObjFieldName()
- Specified by:
getObjFieldName in interface SingleFieldMapping
- Returns:
- the Java bean name of the mapped field.
getCSVFieldNames
public void getCSVFieldNames(Collection<String> names)
FieldMapping Interface
- Specified by:
getCSVFieldNames in interface FieldMapping
getOrder
public int getOrder()
- Specified by:
getOrder in interface FieldMapping
isMissingAndOptional
public boolean isMissingAndOptional(Map<String,Object> csvValues)
- Specified by:
isMissingAndOptional in interface FieldMapping
isMissingAndOptional
public boolean isMissingAndOptional(BeanWrapper object)
- Specified by:
isMissingAndOptional in interface FieldMapping
isMissing
protected boolean isMissing(Map<String,Object> csvValues)
- Protected Methods
isMissing
protected boolean isMissing(BeanWrapper object)
isOptional
protected boolean isOptional()
Copyright © 2012 OneBusAway. All Rights Reserved.