Table of content



3.4. CountryService


Entity-Relationship-Model of CountryService

Schema Entities

Entity NameAlias NameMicroserviceData Schema
AirportAirportAirportServiceAirportLogistics
CityCityCountryServiceAirportLogistics
CountryCountryCountryServiceAirportLogistics
PassengerPassengerPassengerBookingServiceAirportLogistics

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/cityGETfindAllCity()CountryServiceCity
/city/country/{id}GETfindAllCityOfCountry(id)CountryServiceCountry City
/countryPOSTinsertCountry(country)CountryServiceCountry
/country/{id}GETfindCountryById(id)CountryServiceCountry
/city/{id}DELETEdeleteCityById(id)CountryServiceCity
/city/{id}PUTupdateCityById(city)CountryServiceCity
/country/{id}PUTupdateCountryById(country)CountryServiceCountry
/countryGETfindAllCountry()CountryServiceCountry
/city/{id}GETfindCityById(id)CountryServiceCity
/country/{id}DELETEdeleteCountryById(id)CountryServiceCountry
/cityPOSTinsertCity(city)CountryServiceCity

CountryService inside the microservice architecture

Microservices

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





3.4.1 City


Entity Name: City

Data Schema: AirportLogistics

Master Service: CountryService


Call graph of entity of City

Microservices

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

Entity Properties

Property NameDatatypeData EntityReference Entity
CityNameSTRINGCity
CountryLONGCityCountry
PrimaryKeyLONGCity
ServerReplicationVersionLONGCity

Pseudo code snippet

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


3.4.2 Country


Entity Name: Country

Data Schema: AirportLogistics

Master Service: CountryService


Call graph of entity of Country

Microservices

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

Entity Properties

Property NameDatatypeData EntityReference Entity
CountryNameSTRINGCountry
PrimaryKeyLONGCountry
ServerReplicationVersionLONGCountry

Pseudo code snippet

final Country country = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + id, Country.class);
if (country != null) {
}
return country;


Table of content