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.
  • 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 entries
      type - the destination type of the conversion
      mappingContext - 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 data
      flightReservation - the flight reservation
    • populateBookingStatus

      protected void populateBookingStatus(ReservationData reservationData, FlightReservation flightReservation)
      Populate booking status.
      Parameters:
      reservationData - the reservation data
      flightReservation - 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 context
      transportReservation - the transport reservation
      Returns:
      the TransportReservation