Table of content



The PassengerBooking entity within the microservice architecture

Entity-Relationship-Model of <PassengerBookingService>

Entity Name: PassengerBooking

Data Schema: AirportLogistics

Master Service: PassengerBookingService


Dataflow of entity of PassengerBooking

Microservices

3.1 AirplaneService3.2 AirportService3.3 CargoService3.4 CountryService3.5 EmployeeService3.6 LuggageService
3.7 PassengerBookingService

Entity Properties

Property NameDatatypeData EntityReference Entity
BookingDateLONGPassengerBooking
FlightLONGPassengerBookingFlight
PassengerLONGPassengerBookingPassenger
PrimaryKeyLONGPassengerBooking
SeatLONGPassengerBookingSeat
ServerReplicationVersionLONGPassengerBooking

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/passengerbooking/{id}GETfindPassengerBookingById(id)PassengerBookingServicePassengerBooking
/passengerbooking/flight/{id}GETfindAllPassengerBookingOfFlight(id)PassengerBookingServiceFlight PassengerBooking
/passengerbookingPOSTinsertPassengerBooking(passengerbooking)PassengerBookingServicePassengerBooking
/luggage/flightbooking/{id}GETfindAllLuggageOfFlightBooking(id)LuggageServicePassengerBooking Luggage
/passengerbooking/{id}PUTupdatePassengerBookingById(passengerbooking)PassengerBookingServicePassengerBooking
/passengerbooking/passenger/{id}GETfindAllPassengerBookingOfPassenger(id)PassengerBookingServicePassenger PassengerBooking
/passengerbookingGETfindAllPassengerBooking()PassengerBookingServicePassengerBooking
/passengerbooking/seat/{id}GETfindAllPassengerBookingOfSeat(id)PassengerBookingServiceSeat PassengerBooking
/passengerbooking/{id}DELETEdeletePassengerBookingById(id)PassengerBookingServicePassengerBooking

Distributed transaction of <PassengerBooking>

Pseudo code snippet

final PassengerBooking passengerbooking = (PassengerBooking) this.callMicroservice(ServiceNames.PASSENGER_BOOKING_SERVICE + "/passengerbooking/" + id, PassengerBooking.class);
if (passengerbooking != null) {
    final Seat seat1 = (Seat) this.callMicroservice(ServiceNames.PASSENGER_BOOKING_SERVICE + "/seat/" + passengerbooking.getSeat().getId(), Seat.class);
    if (seat1 != null) {
        final Airplane airplane2 = (Airplane) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplane/" + seat1.getAirplane().getId(), Airplane.class);
        if (airplane2 != null) {
            final Airline airline3 = (Airline) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airline/" + airplane2.getAirline().getId(), Airline.class);
            if (airline3 != null) {
            }
            final AirplaneType airplanetype4 = (AirplaneType) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplanetype/" + airplane2.getAirplaneType().getId(), AirplaneType.class);
            if (airplanetype4 != null) {
                final AirplaneProducer airplaneproducer5 = (AirplaneProducer) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplaneproducer/" + airplanetype4.getAirplaneProducer().getId(), AirplaneProducer.class);
                if (airplaneproducer5 != null) {
                }
            }
        }
        final SeatCategory seatcategory6 = (SeatCategory) this.callMicroservice(ServiceNames.PASSENGER_BOOKING_SERVICE + "/seatcategory/" + seat1.getSeatCategory().getId(), SeatCategory.class);
        if (seatcategory6 != null) {
        }
    }
    final Flight flight7 = (Flight) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/flight/" + passengerbooking.getFlight().getId(), Flight.class);
    if (flight7 != null) {
        final Gate departuregate8 = (Gate) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/gate/" + flight7.getDepartureGate().getId(), Gate.class);
        if (departuregate8 != null) {
            final Terminal terminal9 = (Terminal) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/terminal/" + departuregate8.getTerminal().getId(), Terminal.class);
            if (terminal9 != null) {
                final Airport airport10 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + terminal9.getAirport().getId(), Airport.class);
                if (airport10 != null) {
                    final City city11 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + airport10.getCity().getId(), City.class);
                    if (city11 != null) {
                        final Country country12 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city11.getCountry().getId(), Country.class);
                        if (country12 != null) {
                        }
                    }
                }
            }
        }
        final Airplane airplane13 = (Airplane) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplane/" + flight7.getAirplane().getId(), Airplane.class);
        if (airplane13 != null) {
            final Airline airline14 = (Airline) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airline/" + airplane13.getAirline().getId(), Airline.class);
            if (airline14 != null) {
            }
            final AirplaneType airplanetype15 = (AirplaneType) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplanetype/" + airplane13.getAirplaneType().getId(), AirplaneType.class);
            if (airplanetype15 != null) {
                final AirplaneProducer airplaneproducer16 = (AirplaneProducer) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplaneproducer/" + airplanetype15.getAirplaneProducer().getId(), AirplaneProducer.class);
                if (airplaneproducer16 != null) {
                }
            }
        }
        final FlightRoute flightroute17 = (FlightRoute) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/flightroute/" + flight7.getFlightRoute().getId(), FlightRoute.class);
        if (flightroute17 != null) {
            final Airport destination18 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + flightroute17.getDestination().getId(), Airport.class);
            if (destination18 != null) {
                final City city19 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + destination18.getCity().getId(), City.class);
                if (city19 != null) {
                    final Country country20 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city19.getCountry().getId(), Country.class);
                    if (country20 != null) {
                    }
                }
            }
            final Airport source21 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + flightroute17.getSource().getId(), Airport.class);
            if (source21 != null) {
                final City city22 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + source21.getCity().getId(), City.class);
                if (city22 != null) {
                    final Country country23 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city22.getCountry().getId(), Country.class);
                    if (country23 != null) {
                    }
                }
            }
        }
        final Gate arrivalgate24 = (Gate) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/gate/" + flight7.getArrivalGate().getId(), Gate.class);
        if (arrivalgate24 != null) {
            final Terminal terminal25 = (Terminal) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/terminal/" + arrivalgate24.getTerminal().getId(), Terminal.class);
            if (terminal25 != null) {
                final Airport airport26 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + terminal25.getAirport().getId(), Airport.class);
                if (airport26 != null) {
                    final City city27 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + airport26.getCity().getId(), City.class);
                    if (city27 != null) {
                        final Country country28 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city27.getCountry().getId(), Country.class);
                        if (country28 != null) {
                        }
                    }
                }
            }
        }
    }
    final Passenger passenger29 = (Passenger) this.callMicroservice(ServiceNames.PASSENGER_BOOKING_SERVICE + "/passenger/" + passengerbooking.getPassenger().getId(), Passenger.class);
    if (passenger29 != null) {
        final Country nationality30 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + passenger29.getNationality().getId(), Country.class);
        if (nationality30 != null) {
        }
    }
}
return passengerbooking;


Table of content