Table of content
The Cargo entity within the microservice architecture

Entity Name: Cargo
Data Schema: AirportLogistics
Master Service: CargoService

Microservices
Entity Properties
Service Interfaces

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;
Table of content