Table of content



3.2. AirportService


Entity-Relationship-Model of AirportService

Schema Entities

Entity NameAlias NameMicroserviceData Schema
AirplaneAirplaneAirplaneServiceAirportLogistics
AirportAirportAirportServiceAirportLogistics
CargoBookingCargoBookingEmployeeServiceAirportLogistics
CityCityCountryServiceAirportLogistics
FlightFlightAirportServiceAirportLogistics
FlightRouteFlightRouteAirportServiceAirportLogistics
GateGateAirportServiceAirportLogistics
PassengerBookingPassengerBookingPassengerBookingServiceAirportLogistics
TerminalTerminalAirportServiceAirportLogistics

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/airport/city/{id}GETfindAllAirportOfCity(id)AirportServiceCity Airport
/flightGETfindAllFlight()AirportServiceFlight
/flightroute/{id}GETfindFlightRouteById(id)AirportServiceFlightRoute
/flightroute/destination/{id}GETfindAllFlightRouteOfDestination(id)AirportServiceAirport FlightRoute
/gate/{id}GETfindGateById(id)AirportServiceGate
/airportPOSTinsertAirport(airport)AirportServiceAirport
/flightrouteGETfindAllFlightRoute()AirportServiceFlightRoute
/flight/{id}DELETEdeleteFlightById(id)AirportServiceFlight
/gate/{id}DELETEdeleteGateById(id)AirportServiceGate
/flightroute/source/{id}GETfindAllFlightRouteOfSource(id)AirportServiceAirport FlightRoute
/flight/{id}PUTupdateFlightById(flight)AirportServiceFlight
/gate/terminal/{id}GETfindAllGateOfTerminal(id)AirportServiceTerminal Gate
/terminal/airport/{id}GETfindAllTerminalOfAirport(id)AirportServiceAirport Terminal
/gatePOSTinsertGate(gate)AirportServiceGate
/terminal/{id}DELETEdeleteTerminalById(id)AirportServiceTerminal
/terminalGETfindAllTerminal()AirportServiceTerminal
/terminal/{id}GETfindTerminalById(id)AirportServiceTerminal
/gateGETfindAllGate()AirportServiceGate
/terminalPOSTinsertTerminal(terminal)AirportServiceTerminal
/flight/flightroute/{id}GETfindAllFlightOfFlightRoute(id)AirportServiceFlightRoute Flight
/flightroute/{id}DELETEdeleteFlightRouteById(id)AirportServiceFlightRoute
/flightPOSTinsertFlight(flight)AirportServiceFlight
/airport/{id}DELETEdeleteAirportById(id)AirportServiceAirport
/terminal/{id}PUTupdateTerminalById(terminal)AirportServiceTerminal
/airport/{id}GETfindAirportById(id)AirportServiceAirport
/gate/{id}PUTupdateGateById(gate)AirportServiceGate
/flightroute/{id}PUTupdateFlightRouteById(flightroute)AirportServiceFlightRoute
/flight/departuregate/{id}GETfindAllFlightOfDepartureGate(id)AirportServiceGate Flight
/airportGETfindAllAirport()AirportServiceAirport
/flight/airplane/{id}GETfindAllFlightOfAirplane(id)AirportServiceAirplane Flight
/flightroutePOSTinsertFlightRoute(flightroute)AirportServiceFlightRoute
/airport/{id}PUTupdateAirportById(airport)AirportServiceAirport
/flight/{id}GETfindFlightById(id)AirportServiceFlight
/flight/arrivalgate/{id}GETfindAllFlightOfArrivalGate(id)AirportServiceGate Flight

AirportService inside the microservice architecture

Microservices

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





3.2.1 Airport


Entity Name: Airport

Data Schema: AirportLogistics

Master Service: AirportService


Call graph of entity of Airport

Microservices

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

Entity Properties

Property NameDatatypeData EntityReference Entity
AirportNameSTRINGAirport
CityLONGAirportCity
PrimaryKeyLONGAirport
ServerReplicationVersionLONGAirport

Pseudo code snippet

final Airport airport = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + id, Airport.class);
if (airport != null) {
    final City city1 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + airport.getCity().getId(), City.class);
    if (city1 != null) {
        final Country country2 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city1.getCountry().getId(), Country.class);
        if (country2 != null) {
        }
    }
}
return airport;


3.2.2 Flight


Entity Name: Flight

Data Schema: AirportLogistics

Master Service: AirportService


Call graph of entity of Flight

Microservices

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

Entity Properties

Property NameDatatypeData EntityReference Entity
AirplaneLONGFlightAirplane
ArrivalGateLONGFlightGate
DepartureGateLONGFlightGate
FlightNoSTRINGFlight
FlightRouteLONGFlightFlightRoute
FromDateLONGFlight
PrimaryKeyLONGFlight
ServerReplicationVersionLONGFlight
ToDateLONGFlight

Pseudo code snippet

final Flight flight = (Flight) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/flight/" + id, Flight.class);
if (flight != null) {
    final Gate departuregate1 = (Gate) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/gate/" + flight.getDepartureGate().getId(), Gate.class);
    if (departuregate1 != null) {
        final Terminal terminal2 = (Terminal) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/terminal/" + departuregate1.getTerminal().getId(), Terminal.class);
        if (terminal2 != null) {
            final Airport airport3 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + terminal2.getAirport().getId(), Airport.class);
            if (airport3 != null) {
                final City city4 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + airport3.getCity().getId(), City.class);
                if (city4 != null) {
                    final Country country5 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city4.getCountry().getId(), Country.class);
                    if (country5 != null) {
                    }
                }
            }
        }
    }
    final Airplane airplane6 = (Airplane) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplane/" + flight.getAirplane().getId(), Airplane.class);
    if (airplane6 != null) {
        final Airline airline7 = (Airline) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airline/" + airplane6.getAirline().getId(), Airline.class);
        if (airline7 != null) {
        }
        final AirplaneType airplanetype8 = (AirplaneType) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplanetype/" + airplane6.getAirplaneType().getId(), AirplaneType.class);
        if (airplanetype8 != null) {
            final AirplaneProducer airplaneproducer9 = (AirplaneProducer) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplaneproducer/" + airplanetype8.getAirplaneProducer().getId(), AirplaneProducer.class);
            if (airplaneproducer9 != null) {
            }
        }
    }
    final FlightRoute flightroute10 = (FlightRoute) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/flightroute/" + flight.getFlightRoute().getId(), FlightRoute.class);
    if (flightroute10 != null) {
        final Airport destination11 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + flightroute10.getDestination().getId(), Airport.class);
        if (destination11 != null) {
            final City city12 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + destination11.getCity().getId(), City.class);
            if (city12 != null) {
                final Country country13 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city12.getCountry().getId(), Country.class);
                if (country13 != null) {
                }
            }
        }
        final Airport source14 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + flightroute10.getSource().getId(), Airport.class);
        if (source14 != null) {
            final City city15 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + source14.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 Gate arrivalgate17 = (Gate) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/gate/" + flight.getArrivalGate().getId(), Gate.class);
    if (arrivalgate17 != null) {
        final Terminal terminal18 = (Terminal) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/terminal/" + arrivalgate17.getTerminal().getId(), Terminal.class);
        if (terminal18 != null) {
            final Airport airport19 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + terminal18.getAirport().getId(), Airport.class);
            if (airport19 != null) {
                final City city20 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + airport19.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) {
                    }
                }
            }
        }
    }
}
return flight;


3.2.3 FlightRoute


Entity Name: FlightRoute

Data Schema: AirportLogistics

Master Service: AirportService


Call graph of entity of FlightRoute

Microservices

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

Entity Properties

Property NameDatatypeData EntityReference Entity
DestinationLONGFlightRouteAirport
PrimaryKeyLONGFlightRoute
ServerReplicationVersionLONGFlightRoute
SourceLONGFlightRouteAirport

Pseudo code snippet

final FlightRoute flightroute = (FlightRoute) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/flightroute/" + id, FlightRoute.class);
if (flightroute != null) {
    final Airport destination1 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + flightroute.getDestination().getId(), Airport.class);
    if (destination1 != null) {
        final City city2 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + destination1.getCity().getId(), City.class);
        if (city2 != null) {
            final Country country3 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city2.getCountry().getId(), Country.class);
            if (country3 != null) {
            }
        }
    }
    final Airport source4 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + flightroute.getSource().getId(), Airport.class);
    if (source4 != null) {
        final City city5 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + source4.getCity().getId(), City.class);
        if (city5 != null) {
            final Country country6 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city5.getCountry().getId(), Country.class);
            if (country6 != null) {
            }
        }
    }
}
return flightroute;


3.2.4 Gate


Entity Name: Gate

Data Schema: AirportLogistics

Master Service: AirportService


Call graph of entity of Gate

Microservices

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

Entity Properties

Property NameDatatypeData EntityReference Entity
GateNameSTRINGGate
PrimaryKeyLONGGate
ServerReplicationVersionLONGGate
TerminalLONGGateTerminal

Pseudo code snippet

final Gate gate = (Gate) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/gate/" + id, Gate.class);
if (gate != null) {
    final Terminal terminal1 = (Terminal) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/terminal/" + gate.getTerminal().getId(), Terminal.class);
    if (terminal1 != null) {
        final Airport airport2 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + terminal1.getAirport().getId(), Airport.class);
        if (airport2 != null) {
            final City city3 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + airport2.getCity().getId(), City.class);
            if (city3 != null) {
                final Country country4 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city3.getCountry().getId(), Country.class);
                if (country4 != null) {
                }
            }
        }
    }
}
return gate;


3.2.5 Terminal


Entity Name: Terminal

Data Schema: AirportLogistics

Master Service: AirportService


Call graph of entity of Terminal

Microservices

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

Entity Properties

Property NameDatatypeData EntityReference Entity
AirportLONGTerminalAirport
PrimaryKeyLONGTerminal
ServerReplicationVersionLONGTerminal
TerminalNameSTRINGTerminal

Pseudo code snippet

final Terminal terminal = (Terminal) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/terminal/" + id, Terminal.class);
if (terminal != null) {
    final Airport airport1 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + terminal.getAirport().getId(), Airport.class);
    if (airport1 != null) {
        final City city2 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + airport1.getCity().getId(), City.class);
        if (city2 != null) {
            final Country country3 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city2.getCountry().getId(), Country.class);
            if (country3 != null) {
            }
        }
    }
}
return terminal;


Table of content