Class FlightReservationConverter
java.lang.Object
ma.glasnost.orika.CustomConverter<ReservationData,FlightReservation>
de.hybris.platform.coreairlineocc.mapping.converters.FlightReservationConverter
- All Implemented Interfaces:
ma.glasnost.orika.Converter<ReservationData,,FlightReservation> ma.glasnost.orika.MappedTypePair<ReservationData,FlightReservation>
public class FlightReservationConverter
extends ma.glasnost.orika.CustomConverter<ReservationData,FlightReservation>
Converter to convert the
FlightReservation from ReservationData.-
Field Summary
Fields inherited from class ma.glasnost.orika.CustomConverter
destinationType, mapperFacade, sourceType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert(ReservationData reservationData, ma.glasnost.orika.metadata.Type<? extends FlightReservation> type, ma.glasnost.orika.MappingContext mappingContext) Converts the reservationData into a flightReservation.protected FlightReservationgetTransportReservation(ma.glasnost.orika.MappingContext mappingContext, FlightReservation transportReservation) Performs additional field mapping if mapping context contains fieldset mapping informationprotected voidpopulateBasicInformation(ReservationData reservationData, FlightReservation flightReservation) Populates the basic information for a transport reservation, such as additionalSecurity, BookingStatus code and name, salesApplication, totalFare, totalToPay and totalPaid.protected voidpopulateBookingStatus(ReservationData reservationData, FlightReservation flightReservation) Populate booking status.Methods inherited from class ma.glasnost.orika.CustomConverter
canConvert, equals, getAType, getBType, hashCode, setMapperFacade, toString
-
Constructor Details
-
FlightReservationConverter
public FlightReservationConverter()
-
-
Method Details
-
convert
public FlightReservation convert(ReservationData reservationData, ma.glasnost.orika.metadata.Type<? extends FlightReservation> type, ma.glasnost.orika.MappingContext mappingContext) Converts the reservationData into a flightReservation.- Parameters:
reservationData- the transport reservation data, containing details for transport order entriestype- the destination type of the conversionmappingContext- the mapping context- Returns:
- the FlightReservation
-
populateBasicInformation
protected void populateBasicInformation(ReservationData reservationData, FlightReservation flightReservation) Populates the basic information for a transport reservation, such as additionalSecurity, BookingStatus code and name, salesApplication, totalFare, totalToPay and totalPaid.- Parameters:
reservationData- the reservation dataflightReservation- the flight reservation
-
populateBookingStatus
protected void populateBookingStatus(ReservationData reservationData, FlightReservation flightReservation) Populate booking status.- Parameters:
reservationData- the reservation dataflightReservation- the flight reservation
-
getTransportReservation
protected FlightReservation getTransportReservation(ma.glasnost.orika.MappingContext mappingContext, FlightReservation transportReservation) Performs additional field mapping if mapping context contains fieldset mapping information- Parameters:
mappingContext- the mapping contexttransportReservation- the transport reservation- Returns:
- the TransportReservation
-