Table of content



The CargoBooking entity within the microservice architecture

Entity-Relationship-Model of <EmployeeService>

Entity Name: CargoBooking

Data Schema: AirportLogistics

Master Service: EmployeeService


Dataflow of entity of CargoBooking

Microservices

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

Entity Properties

Property NameDatatypeData EntityReference Entity
BookingDateLONGCargoBooking
CustomerLONGCargoBookingCustomer
EmployeeLONGCargoBookingEmployee
FlightLONGCargoBookingFlight
PrimaryKeyLONGCargoBooking
ServerReplicationVersionLONGCargoBooking

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/cargobooking/customer/{id}GETfindAllCargoBookingOfCustomer(id)EmployeeServiceCustomer CargoBooking
/cargobookingPOSTinsertCargoBooking(cargobooking)EmployeeServiceCargoBooking
/cargo/cargobooking/{id}GETfindAllCargoOfCargoBooking(id)CargoServiceCargoBooking Cargo
/cargobooking/{id}DELETEdeleteCargoBookingById(id)EmployeeServiceCargoBooking
/cargobooking/{id}GETfindCargoBookingById(id)EmployeeServiceCargoBooking
/cargobooking/flight/{id}GETfindAllCargoBookingOfFlight(id)EmployeeServiceFlight CargoBooking
/cargobooking/employee/{id}GETfindAllCargoBookingOfEmployee(id)EmployeeServiceEmployee CargoBooking
/cargobookingGETfindAllCargoBooking()EmployeeServiceCargoBooking
/cargobooking/{id}PUTupdateCargoBookingById(cargobooking)EmployeeServiceCargoBooking

Distributed transaction of <CargoBooking>

Pseudo code snippet

final CargoBooking cargobooking = (CargoBooking) this.callMicroservice(ServiceNames.EMPLOYEE_SERVICE + "/cargobooking/" + id, CargoBooking.class);
if (cargobooking != null) {
    final Employee employee1 = (Employee) this.callMicroservice(ServiceNames.EMPLOYEE_SERVICE + "/employee/" + cargobooking.getEmployee().getId(), Employee.class);
    if (employee1 != null) {
        final Airline airline2 = (Airline) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airline/" + employee1.getAirline().getId(), Airline.class);
        if (airline2 != null) {
        }
    }
    final Flight flight3 = (Flight) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/flight/" + cargobooking.getFlight().getId(), Flight.class);
    if (flight3 != null) {
        final Gate departuregate4 = (Gate) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/gate/" + flight3.getDepartureGate().getId(), Gate.class);
        if (departuregate4 != null) {
            final Terminal terminal5 = (Terminal) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/terminal/" + departuregate4.getTerminal().getId(), Terminal.class);
            if (terminal5 != null) {
                final Airport airport6 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + terminal5.getAirport().getId(), Airport.class);
                if (airport6 != null) {
                    final City city7 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + airport6.getCity().getId(), City.class);
                    if (city7 != null) {
                        final Country country8 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city7.getCountry().getId(), Country.class);
                        if (country8 != null) {
                        }
                    }
                }
            }
        }
        final Airplane airplane9 = (Airplane) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplane/" + flight3.getAirplane().getId(), Airplane.class);
        if (airplane9 != null) {
            final Airline airline10 = (Airline) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airline/" + airplane9.getAirline().getId(), Airline.class);
            if (airline10 != null) {
            }
            final AirplaneType airplanetype11 = (AirplaneType) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplanetype/" + airplane9.getAirplaneType().getId(), AirplaneType.class);
            if (airplanetype11 != null) {
                final AirplaneProducer airplaneproducer12 = (AirplaneProducer) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplaneproducer/" + airplanetype11.getAirplaneProducer().getId(), AirplaneProducer.class);
                if (airplaneproducer12 != null) {
                }
            }
        }
        final FlightRoute flightroute13 = (FlightRoute) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/flightroute/" + flight3.getFlightRoute().getId(), FlightRoute.class);
        if (flightroute13 != null) {
            final Airport destination14 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + flightroute13.getDestination().getId(), Airport.class);
            if (destination14 != null) {
                final City city15 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + destination14.getCity().getId(), City.class);
                if (city15 != null) {
                    final Country country16 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city15.getCountry().getId(), Country.class);
                    if (country16 != null) {
                    }
                }
            }
            final Airport source17 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + flightroute13.getSource().getId(), Airport.class);
            if (source17 != null) {
                final City city18 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + source17.getCity().getId(), City.class);
                if (city18 != null) {
                    final Country country19 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city18.getCountry().getId(), Country.class);
                    if (country19 != null) {
                    }
                }
            }
        }
        final Gate arrivalgate20 = (Gate) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/gate/" + flight3.getArrivalGate().getId(), Gate.class);
        if (arrivalgate20 != null) {
            final Terminal terminal21 = (Terminal) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/terminal/" + arrivalgate20.getTerminal().getId(), Terminal.class);
            if (terminal21 != null) {
                final Airport airport22 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + terminal21.getAirport().getId(), Airport.class);
                if (airport22 != null) {
                    final City city23 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + airport22.getCity().getId(), City.class);
                    if (city23 != null) {
                        final Country country24 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city23.getCountry().getId(), Country.class);
                        if (country24 != null) {
                        }
                    }
                }
            }
        }
    }
    final Customer customer25 = (Customer) this.callMicroservice(ServiceNames.EMPLOYEE_SERVICE + "/customer/" + cargobooking.getCustomer().getId(), Customer.class);
    if (customer25 != null) {
    }
}
return cargobooking;


Table of content