Table of content



The CargoCheck entity within the microservice architecture

Entity-Relationship-Model of <CargoService>

Entity Name: CargoCheck

Data Schema: AirportLogistics

Master Service: CargoService


Dataflow of entity of CargoCheck

Microservices

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

Entity Properties

Property NameDatatypeData EntityReference Entity
CargoLONGCargoCheckCargo
CheckerLONGCargoCheckEmployee
FromDateLONGCargoCheck
PrimaryKeyLONGCargoCheck
ReportSTRINGCargoCheck
ServerReplicationVersionLONGCargoCheck
ToDateLONGCargoCheck

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/cargocheck/checker/{id}GETfindAllCargoCheckOfChecker(id)CargoServiceEmployee CargoCheck
/cargocheck/{id}GETfindCargoCheckById(id)CargoServiceCargoCheck
/cargocheck/cargo/{id}GETfindAllCargoCheckOfCargo(id)CargoServiceCargo CargoCheck
/cargocheckPOSTinsertCargoCheck(cargocheck)CargoServiceCargoCheck
/cargocheck/{id}PUTupdateCargoCheckById(cargocheck)CargoServiceCargoCheck
/cargocheckGETfindAllCargoCheck()CargoServiceCargoCheck
/cargocheck/{id}DELETEdeleteCargoCheckById(id)CargoServiceCargoCheck

Distributed transaction of <CargoCheck>

Pseudo code snippet

final CargoCheck cargocheck = (CargoCheck) this.callMicroservice(ServiceNames.CARGO_SERVICE + "/cargocheck/" + id, CargoCheck.class);
if (cargocheck != null) {
    final Cargo cargo1 = (Cargo) this.callMicroservice(ServiceNames.CARGO_SERVICE + "/cargo/" + cargocheck.getCargo().getId(), Cargo.class);
    if (cargo1 != null) {
        final CargoType cargotype2 = (CargoType) this.callMicroservice(ServiceNames.CARGO_SERVICE + "/cargotype/" + cargo1.getCargoType().getId(), CargoType.class);
        if (cargotype2 != null) {
        }
        final CargoBooking cargobooking3 = (CargoBooking) this.callMicroservice(ServiceNames.EMPLOYEE_SERVICE + "/cargobooking/" + cargo1.getCargoBooking().getId(), CargoBooking.class);
        if (cargobooking3 != null) {
            final Employee employee4 = (Employee) this.callMicroservice(ServiceNames.EMPLOYEE_SERVICE + "/employee/" + cargobooking3.getEmployee().getId(), Employee.class);
            if (employee4 != null) {
                final Airline airline5 = (Airline) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airline/" + employee4.getAirline().getId(), Airline.class);
                if (airline5 != null) {
                }
            }
            final Flight flight6 = (Flight) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/flight/" + cargobooking3.getFlight().getId(), Flight.class);
            if (flight6 != null) {
                final Gate departuregate7 = (Gate) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/gate/" + flight6.getDepartureGate().getId(), Gate.class);
                if (departuregate7 != null) {
                    final Terminal terminal8 = (Terminal) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/terminal/" + departuregate7.getTerminal().getId(), Terminal.class);
                    if (terminal8 != null) {
                        final Airport airport9 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + terminal8.getAirport().getId(), Airport.class);
                        if (airport9 != null) {
                            final City city10 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + airport9.getCity().getId(), City.class);
                            if (city10 != null) {
                                final Country country11 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city10.getCountry().getId(), Country.class);
                                if (country11 != null) {
                                }
                            }
                        }
                    }
                }
                final Airplane airplane12 = (Airplane) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplane/" + flight6.getAirplane().getId(), Airplane.class);
                if (airplane12 != null) {
                    final Airline airline13 = (Airline) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airline/" + airplane12.getAirline().getId(), Airline.class);
                    if (airline13 != null) {
                    }
                    final AirplaneType airplanetype14 = (AirplaneType) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplanetype/" + airplane12.getAirplaneType().getId(), AirplaneType.class);
                    if (airplanetype14 != null) {
                        final AirplaneProducer airplaneproducer15 = (AirplaneProducer) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplaneproducer/" + airplanetype14.getAirplaneProducer().getId(), AirplaneProducer.class);
                        if (airplaneproducer15 != null) {
                        }
                    }
                }
                final FlightRoute flightroute16 = (FlightRoute) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/flightroute/" + flight6.getFlightRoute().getId(), FlightRoute.class);
                if (flightroute16 != null) {
                    final Airport destination17 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + flightroute16.getDestination().getId(), Airport.class);
                    if (destination17 != null) {
                        final City city18 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + destination17.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 Airport source20 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + flightroute16.getSource().getId(), Airport.class);
                    if (source20 != null) {
                        final City city21 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + source20.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 Gate arrivalgate23 = (Gate) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/gate/" + flight6.getArrivalGate().getId(), Gate.class);
                if (arrivalgate23 != null) {
                    final Terminal terminal24 = (Terminal) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/terminal/" + arrivalgate23.getTerminal().getId(), Terminal.class);
                    if (terminal24 != null) {
                        final Airport airport25 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + terminal24.getAirport().getId(), Airport.class);
                        if (airport25 != null) {
                            final City city26 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + airport25.getCity().getId(), City.class);
                            if (city26 != null) {
                                final Country country27 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city26.getCountry().getId(), Country.class);
                                if (country27 != null) {
                                }
                            }
                        }
                    }
                }
            }
            final Customer customer28 = (Customer) this.callMicroservice(ServiceNames.EMPLOYEE_SERVICE + "/customer/" + cargobooking3.getCustomer().getId(), Customer.class);
            if (customer28 != null) {
            }
        }
    }
    final Employee checker29 = (Employee) this.callMicroservice(ServiceNames.EMPLOYEE_SERVICE + "/employee/" + cargocheck.getChecker().getId(), Employee.class);
    if (checker29 != null) {
        final Airline airline30 = (Airline) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airline/" + checker29.getAirline().getId(), Airline.class);
        if (airline30 != null) {
        }
    }
}
return cargocheck;


Table of content