Class FareProductFieldMappingFactory
java.lang.Object
org.onebusaway.gtfs.serialization.mappings.FareProductFieldMappingFactory
- All Implemented Interfaces:
FieldMappingFactory
Fare products have a composite primary key of
- fare product id
- fare medium id (nullable)
- rider category id (nullable)
So if you want this library to look up the fare product instance you need to supply all of these,
hence we need a custom mapping factory.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateFieldMapping(EntitySchemaFactory schemaFactory, Class<?> entityType, String csvFieldName, String objFieldName, Class<?> objFieldType, boolean required) static AgencyAndIdfareProductId(String agencyId, String fareProductId, String riderCategoryId, String fareMediumId)
-
Constructor Details
-
FareProductFieldMappingFactory
public FareProductFieldMappingFactory()
-
-
Method Details
-
createFieldMapping
public FieldMapping createFieldMapping(EntitySchemaFactory schemaFactory, Class<?> entityType, String csvFieldName, String objFieldName, Class<?> objFieldType, boolean required) - Specified by:
createFieldMappingin interfaceFieldMappingFactory
-
fareProductId
public static AgencyAndId fareProductId(String agencyId, String fareProductId, String riderCategoryId, String fareMediumId)
-