org.onebusaway.csv_entities.schema
Class AbstractFieldMapping

java.lang.Object
  extended by org.onebusaway.csv_entities.schema.AbstractFieldMapping
All Implemented Interfaces:
FieldMapping, SingleFieldMapping
Direct Known Subclasses:
DefaultFieldMapping

public abstract class AbstractFieldMapping
extends Object
implements SingleFieldMapping


Field Summary
protected  String _csvFieldName
           
protected  String _defaultValue
           
protected  Class<?> _entityType
           
protected  Method _isSetMethod
           
protected  String _objFieldName
           
protected  int _order
           
protected  boolean _required
           
 
Constructor Summary
AbstractFieldMapping(Class<?> entityType, String csvFieldName, String objFieldName, boolean required)
           
 
Method Summary
 String getCsvFieldName()
          SingleFieldMapping
 void getCSVFieldNames(Collection<String> names)
          FieldMapping Interface
 String getObjFieldName()
           
 int getOrder()
           
protected  boolean isMissing(BeanWrapper object)
           
protected  boolean isMissing(Map<String,Object> csvValues)
          Protected Methods
 boolean isMissingAndOptional(BeanWrapper object)
           
 boolean isMissingAndOptional(Map<String,Object> csvValues)
           
protected  boolean isOptional()
           
 void setDefaultValue(String defaultValue)
           
 void setIsSetMethod(Method isSetMethod)
           
 void setOrder(int order)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.onebusaway.csv_entities.schema.FieldMapping
translateFromCSVToObject, translateFromObjectToCSV
 

Field Detail

_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
Constructor Detail

AbstractFieldMapping

public AbstractFieldMapping(Class<?> entityType,
                            String csvFieldName,
                            String objFieldName,
                            boolean required)
Method Detail

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.