Table of content



The Luggage entity within the microservice architecture

Entity-Relationship-Model of <LuggageService>

Entity Name: Luggage

Data Schema: AirportLogistics

Master Service: LuggageService


Dataflow of entity of Luggage

Microservices

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

Entity Properties

Property NameDatatypeData EntityReference Entity
ContentSTRINGLuggage
FlightBookingLONGLuggagePassengerBooking
LuggageTypeLONGLuggageLuggageType
PrimaryKeyLONGLuggage
ServerReplicationVersionLONGLuggage
WeightingDOUBLELuggage

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/luggage/{id}GETfindLuggageById(id)LuggageServiceLuggage
/luggageGETfindAllLuggage()LuggageServiceLuggage
/luggagePOSTinsertLuggage(luggage)LuggageServiceLuggage
/luggage/flightbooking/{id}GETfindAllLuggageOfFlightBooking(id)LuggageServicePassengerBooking Luggage
/luggage/{id}DELETEdeleteLuggageById(id)LuggageServiceLuggage
/luggage/{id}PUTupdateLuggageById(luggage)LuggageServiceLuggage
/luggagecheck/luggage/{id}GETfindAllLuggageCheckOfLuggage(id)LuggageServiceLuggage LuggageCheck
/luggage/luggagetype/{id}GETfindAllLuggageOfLuggageType(id)LuggageServiceLuggageType Luggage

Distributed transaction of <Luggage>

Pseudo code snippet

final Luggage luggage = (Luggage) this.callMicroservice(ServiceNames.LUGGAGE_SERVICE + "/luggage/" + id, Luggage.class);
if (luggage != null) {
    final LuggageType luggagetype1 = (LuggageType) this.callMicroservice(ServiceNames.LUGGAGE_SERVICE + "/luggagetype/" + luggage.getLuggageType().getId(), LuggageType.class);
    if (luggagetype1 != null) {
    }
    final PassengerBooking flightbooking2 = (PassengerBooking) this.callMicroservice(ServiceNames.PASSENGER_BOOKING_SERVICE + "/passengerbooking/" + luggage.getFlightBooking().getId(), PassengerBooking.class);
    if (flightbooking2 != null) {
        final Seat seat3 = (Seat) this.callMicroservice(ServiceNames.PASSENGER_BOOKING_SERVICE + "/seat/" + flightbooking2.getSeat().getId(), Seat.class);
        if (seat3 != null) {
            final Airplane airplane4 = (Airplane) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplane/" + seat3.getAirplane().getId(), Airplane.class);
            if (airplane4 != null) {
                final Airline airline5 = (Airline) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airline/" + airplane4.getAirline().getId(), Airline.class);
                if (airline5 != null) {
                }
                final AirplaneType airplanetype6 = (AirplaneType) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplanetype/" + airplane4.getAirplaneType().getId(), AirplaneType.class);
                if (airplanetype6 != null) {
                    final AirplaneProducer airplaneproducer7 = (AirplaneProducer) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplaneproducer/" + airplanetype6.getAirplaneProducer().getId(), AirplaneProducer.class);
                    if (airplaneproducer7 != null) {
                    }
                }
            }
            final SeatCategory seatcategory8 = (SeatCategory) this.callMicroservice(ServiceNames.PASSENGER_BOOKING_SERVICE + "/seatcategory/" + seat3.getSeatCategory().getId(), SeatCategory.class);
            if (seatcategory8 != null) {
            }
        }
        final Flight flight9 = (Flight) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/flight/" + flightbooking2.getFlight().getId(), Flight.class);
        if (flight9 != null) {
            final Gate departuregate10 = (Gate) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/gate/" + flight9.getDepartureGate().getId(), Gate.class);
            if (departuregate10 != null) {
                final Terminal terminal11 = (Terminal) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/terminal/" + departuregate10.getTerminal().getId(), Terminal.class);
                if (terminal11 != null) {
                    final Airport airport12 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + terminal11.getAirport().getId(), Airport.class);
                    if (airport12 != null) {
                        final City city13 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + airport12.getCity().getId(), City.class);
                        if (city13 != null) {
                            final Country country14 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city13.getCountry().getId(), Country.class);
                            if (country14 != null) {
                            }
                        }
                    }
                }
            }
            final Airplane airplane15 = (Airplane) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplane/" + flight9.getAirplane().getId(), Airplane.class);
            if (airplane15 != null) {
                final Airline airline16 = (Airline) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airline/" + airplane15.getAirline().getId(), Airline.class);
                if (airline16 != null) {
                }
                final AirplaneType airplanetype17 = (AirplaneType) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplanetype/" + airplane15.getAirplaneType().getId(), AirplaneType.class);
                if (airplanetype17 != null) {
                    final AirplaneProducer airplaneproducer18 = (AirplaneProducer) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplaneproducer/" + airplanetype17.getAirplaneProducer().getId(), AirplaneProducer.class);
                    if (airplaneproducer18 != null) {
                    }
                }
            }
            final FlightRoute flightroute19 = (FlightRoute) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/flightroute/" + flight9.getFlightRoute().getId(), FlightRoute.class);
            if (flightroute19 != null) {
                final Airport destination20 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + flightroute19.getDestination().getId(), Airport.class);
                if (destination20 != null) {
                    final City city21 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + destination20.getCity().getId(), City.class);
                    if (city21 != null) {
                        final Country country22 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city21.getCountry().getId(), Country.class);
                        if (country22 != null) {
                        }
                    }
                }
                final Airport source23 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + flightroute19.getSource().getId(), Airport.class);
                if (source23 != null) {
                    final City city24 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + source23.getCity().getId(), City.class);
                    if (city24 != null) {
                        final Country country25 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city24.getCountry().getId(), Country.class);
                        if (country25 != null) {
                        }
                    }
                }
            }
            final Gate arrivalgate26 = (Gate) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/gate/" + flight9.getArrivalGate().getId(), Gate.class);
            if (arrivalgate26 != null) {
                final Terminal terminal27 = (Terminal) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/terminal/" + arrivalgate26.getTerminal().getId(), Terminal.class);
                if (terminal27 != null) {
                    final Airport airport28 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + terminal27.getAirport().getId(), Airport.class);
                    if (airport28 != null) {
                        final City city29 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + airport28.getCity().getId(), City.class);
                        if (city29 != null) {
                            final Country country30 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city29.getCountry().getId(), Country.class);
                            if (country30 != null) {
                            }
                        }
                    }
                }
            }
        }
        final Passenger passenger31 = (Passenger) this.callMicroservice(ServiceNames.PASSENGER_BOOKING_SERVICE + "/passenger/" + flightbooking2.getPassenger().getId(), Passenger.class);
        if (passenger31 != null) {
            final Country nationality32 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + passenger31.getNationality().getId(), Country.class);
            if (nationality32 != null) {
            }
        }
    }
}
return luggage;


Table of content