Table of content



3.3. CargoService


Entity-Relationship-Model of CargoService

Schema Entities

Entity NameAlias NameMicroserviceData Schema
CargoCargoCargoServiceAirportLogistics
CargoBookingCargoBookingEmployeeServiceAirportLogistics
CargoCheckCargoCheckCargoServiceAirportLogistics
CargoTypeCargoTypeCargoServiceAirportLogistics
EmployeeEmployeeEmployeeServiceAirportLogistics

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/cargocheck/{id}DELETEdeleteCargoCheckById(id)CargoServiceCargoCheck
/cargo/{id}PUTupdateCargoById(cargo)CargoServiceCargo
/cargocheck/{id}GETfindCargoCheckById(id)CargoServiceCargoCheck
/cargoPOSTinsertCargo(cargo)CargoServiceCargo
/cargotype/{id}DELETEdeleteCargoTypeById(id)CargoServiceCargoType
/cargocheckGETfindAllCargoCheck()CargoServiceCargoCheck
/cargotypePOSTinsertCargoType(cargotype)CargoServiceCargoType
/cargo/cargobooking/{id}GETfindAllCargoOfCargoBooking(id)CargoServiceCargoBooking Cargo
/cargo/{id}DELETEdeleteCargoById(id)CargoServiceCargo
/cargocheck/{id}PUTupdateCargoCheckById(cargocheck)CargoServiceCargoCheck
/cargocheckPOSTinsertCargoCheck(cargocheck)CargoServiceCargoCheck
/cargoGETfindAllCargo()CargoServiceCargo
/cargocheck/checker/{id}GETfindAllCargoCheckOfChecker(id)CargoServiceEmployee CargoCheck
/cargotype/{id}PUTupdateCargoTypeById(cargotype)CargoServiceCargoType
/cargo/{id}GETfindCargoById(id)CargoServiceCargo
/cargo/cargotype/{id}GETfindAllCargoOfCargoType(id)CargoServiceCargoType Cargo
/cargotype/{id}GETfindCargoTypeById(id)CargoServiceCargoType
/cargocheck/cargo/{id}GETfindAllCargoCheckOfCargo(id)CargoServiceCargo CargoCheck
/cargotypeGETfindAllCargoType()CargoServiceCargoType

CargoService inside the microservice architecture

Microservices

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





3.3.1 Cargo


Entity Name: Cargo

Data Schema: AirportLogistics

Master Service: CargoService


Call graph of entity of Cargo

Microservices

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

Entity Properties

Property NameDatatypeData EntityReference Entity
CargoBookingLONGCargoCargoBooking
CargoTypeLONGCargoCargoType
PrimaryKeyLONGCargo
ServerReplicationVersionLONGCargo
WeightingDOUBLECargo

Pseudo code snippet

final Cargo cargo = (Cargo) this.callMicroservice(ServiceNames.CARGO_SERVICE + "/cargo/" + id, Cargo.class);
if (cargo != null) {
    final CargoType cargotype1 = (CargoType) this.callMicroservice(ServiceNames.CARGO_SERVICE + "/cargotype/" + cargo.getCargoType().getId(), CargoType.class);
    if (cargotype1 != null) {
    }
    final CargoBooking cargobooking2 = (CargoBooking) this.callMicroservice(ServiceNames.EMPLOYEE_SERVICE + "/cargobooking/" + cargo.getCargoBooking().getId(), CargoBooking.class);
    if (cargobooking2 != null) {
        final Employee employee3 = (Employee) this.callMicroservice(ServiceNames.EMPLOYEE_SERVICE + "/employee/" + cargobooking2.getEmployee().getId(), Employee.class);
        if (employee3 != null) {
            final Airline airline4 = (Airline) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airline/" + employee3.getAirline().getId(), Airline.class);
            if (airline4 != null) {
            }
        }
        final Flight flight5 = (Flight) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/flight/" + cargobooking2.getFlight().getId(), Flight.class);
        if (flight5 != null) {
            final Gate departuregate6 = (Gate) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/gate/" + flight5.getDepartureGate().getId(), Gate.class);
            if (departuregate6 != null) {
                final Terminal terminal7 = (Terminal) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/terminal/" + departuregate6.getTerminal().getId(), Terminal.class);
                if (terminal7 != null) {
                    final Airport airport8 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + terminal7.getAirport().getId(), Airport.class);
                    if (airport8 != null) {
                        final City city9 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + airport8.getCity().getId(), City.class);
                        if (city9 != null) {
                            final Country country10 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city9.getCountry().getId(), Country.class);
                            if (country10 != null) {
                            }
                        }
                    }
                }
            }
            final Airplane airplane11 = (Airplane) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplane/" + flight5.getAirplane().getId(), Airplane.class);
            if (airplane11 != null) {
                final Airline airline12 = (Airline) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airline/" + airplane11.getAirline().getId(), Airline.class);
                if (airline12 != null) {
                }
                final AirplaneType airplanetype13 = (AirplaneType) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplanetype/" + airplane11.getAirplaneType().getId(), AirplaneType.class);
                if (airplanetype13 != null) {
                    final AirplaneProducer airplaneproducer14 = (AirplaneProducer) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplaneproducer/" + airplanetype13.getAirplaneProducer().getId(), AirplaneProducer.class);
                    if (airplaneproducer14 != null) {
                    }
                }
            }
            final FlightRoute flightroute15 = (FlightRoute) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/flightroute/" + flight5.getFlightRoute().getId(), FlightRoute.class);
            if (flightroute15 != null) {
                final Airport destination16 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + flightroute15.getDestination().getId(), Airport.class);
                if (destination16 != null) {
                    final City city17 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + destination16.getCity().getId(), City.class);
                    if (city17 != null) {
                        final Country country18 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city17.getCountry().getId(), Country.class);
                        if (country18 != null) {
                        }
                    }
                }
                final Airport source19 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + flightroute15.getSource().getId(), Airport.class);
                if (source19 != null) {
                    final City city20 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + source19.getCity().getId(), City.class);
                    if (city20 != null) {
                        final Country country21 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city20.getCountry().getId(), Country.class);
                        if (country21 != null) {
                        }
                    }
                }
            }
            final Gate arrivalgate22 = (Gate) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/gate/" + flight5.getArrivalGate().getId(), Gate.class);
            if (arrivalgate22 != null) {
                final Terminal terminal23 = (Terminal) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/terminal/" + arrivalgate22.getTerminal().getId(), Terminal.class);
                if (terminal23 != null) {
                    final Airport airport24 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + terminal23.getAirport().getId(), Airport.class);
                    if (airport24 != null) {
                        final City city25 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + airport24.getCity().getId(), City.class);
                        if (city25 != null) {
                            final Country country26 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city25.getCountry().getId(), Country.class);
                            if (country26 != null) {
                            }
                        }
                    }
                }
            }
        }
        final Customer customer27 = (Customer) this.callMicroservice(ServiceNames.EMPLOYEE_SERVICE + "/customer/" + cargobooking2.getCustomer().getId(), Customer.class);
        if (customer27 != null) {
        }
    }
}
return cargo;


3.3.2 CargoCheck


Entity Name: CargoCheck

Data Schema: AirportLogistics

Master Service: CargoService


Call graph 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

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;


3.3.3 CargoType


Entity Name: CargoType

Data Schema: AirportLogistics

Master Service: CargoService


Call graph of entity of CargoType

Microservices

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

Entity Properties

Property NameDatatypeData EntityReference Entity
DescriptionSTRINGCargoType
PrimaryKeyLONGCargoType
ServerReplicationVersionLONGCargoType
TypeNameSTRINGCargoType

Pseudo code snippet

final CargoType cargotype = (CargoType) this.callMicroservice(ServiceNames.CARGO_SERVICE + "/cargotype/" + id, CargoType.class);
if (cargotype != null) {
}
return cargotype;


Table of content