Table of content



The FlightRoute entity within the microservice architecture

Entity-Relationship-Model of <AirportService>

Entity Name: FlightRoute

Data Schema: AirportLogistics

Master Service: AirportService


Dataflow 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

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/flightroute/destination/{id}GETfindAllFlightRouteOfDestination(id)AirportServiceAirport FlightRoute
/flightroute/source/{id}GETfindAllFlightRouteOfSource(id)AirportServiceAirport FlightRoute
/flight/flightroute/{id}GETfindAllFlightOfFlightRoute(id)AirportServiceFlightRoute Flight
/flightroutePOSTinsertFlightRoute(flightroute)AirportServiceFlightRoute
/flightrouteGETfindAllFlightRoute()AirportServiceFlightRoute
/flightroute/{id}GETfindFlightRouteById(id)AirportServiceFlightRoute
/flightroute/{id}DELETEdeleteFlightRouteById(id)AirportServiceFlightRoute
/flightroute/{id}PUTupdateFlightRouteById(flightroute)AirportServiceFlightRoute

Distributed transaction of <FlightRoute>

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;


Table of content