org.onebusaway.gtfs.serialization.mappings
Class EntityFieldMappingFactory

java.lang.Object
  extended by org.onebusaway.gtfs.serialization.mappings.EntityFieldMappingFactory
All Implemented Interfaces:
org.onebusaway.csv_entities.schema.FieldMappingFactory

public class EntityFieldMappingFactory
extends Object
implements org.onebusaway.csv_entities.schema.FieldMappingFactory

FieldMappingFactory that produces a FieldMapping instance capable of mapping a CSV string entity id to an entity instance, and vice versa. Assumes field entity type subclasses IdentityBean and the target entity can be found with GtfsReaderContext.getEntity(Class, java.io.Serializable).

Author:
bdferris
See Also:
IdentityBean, GtfsReaderContext.getEntity(Class, java.io.Serializable)

Nested Class Summary
static class EntityFieldMappingFactory.FieldMappingImpl
           
 
Constructor Summary
EntityFieldMappingFactory()
           
 
Method Summary
 org.onebusaway.csv_entities.schema.FieldMapping createFieldMapping(org.onebusaway.csv_entities.schema.EntitySchemaFactory schemaFactory, Class<?> entityType, String csvFieldName, String objFieldName, Class<?> objFieldType, boolean required)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityFieldMappingFactory

public EntityFieldMappingFactory()
Method Detail

createFieldMapping

public org.onebusaway.csv_entities.schema.FieldMapping createFieldMapping(org.onebusaway.csv_entities.schema.EntitySchemaFactory schemaFactory,
                                                                          Class<?> entityType,
                                                                          String csvFieldName,
                                                                          String objFieldName,
                                                                          Class<?> objFieldType,
                                                                          boolean required)
Specified by:
createFieldMapping in interface org.onebusaway.csv_entities.schema.FieldMappingFactory


Copyright © 2011 OneBusAway. All Rights Reserved.