Table of content



3.5. EmployeeService


Entity-Relationship-Model of EmployeeService

Schema Entities

Entity NameAlias NameMicroserviceData Schema
AirlineAirlineAirplaneServiceAirportLogistics
CargoCargoCargoServiceAirportLogistics
CargoBookingCargoBookingEmployeeServiceAirportLogistics
CargoCheckCargoCheckCargoServiceAirportLogistics
CustomerCustomerEmployeeServiceAirportLogistics
EmployeeEmployeeEmployeeServiceAirportLogistics
EmployeeTaskEmployeeTaskEmployeeServiceAirportLogistics
FlightFlightAirportServiceAirportLogistics
LuggageCheckLuggageCheckLuggageServiceAirportLogistics
TaskTaskEmployeeServiceAirportLogistics

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/employeetask/{id}PUTupdateEmployeeTaskById(employeetask)EmployeeServiceEmployeeTask
/cargobooking/customer/{id}GETfindAllCargoBookingOfCustomer(id)EmployeeServiceCustomer CargoBooking
/taskPOSTinsertTask(task)EmployeeServiceTask
/cargobooking/flight/{id}GETfindAllCargoBookingOfFlight(id)EmployeeServiceFlight CargoBooking
/employeetaskGETfindAllEmployeeTask()EmployeeServiceEmployeeTask
/customerPOSTinsertCustomer(customer)EmployeeServiceCustomer
/employeePOSTinsertEmployee(employee)EmployeeServiceEmployee
/employeetask/{id}GETfindEmployeeTaskById(id)EmployeeServiceEmployeeTask
/employeeGETfindAllEmployee()EmployeeServiceEmployee
/customer/{id}GETfindCustomerById(id)EmployeeServiceCustomer
/customerGETfindAllCustomer()EmployeeServiceCustomer
/employeetask/{id}DELETEdeleteEmployeeTaskById(id)EmployeeServiceEmployeeTask
/cargobooking/employee/{id}GETfindAllCargoBookingOfEmployee(id)EmployeeServiceEmployee CargoBooking
/customer/{id}DELETEdeleteCustomerById(id)EmployeeServiceCustomer
/cargobookingGETfindAllCargoBooking()EmployeeServiceCargoBooking
/employeetask/task/{id}GETfindAllEmployeeTaskOfTask(id)EmployeeServiceTask EmployeeTask
/customer/{id}PUTupdateCustomerById(customer)EmployeeServiceCustomer
/cargobooking/{id}GETfindCargoBookingById(id)EmployeeServiceCargoBooking
/cargobooking/{id}DELETEdeleteCargoBookingById(id)EmployeeServiceCargoBooking
/taskGETfindAllTask()EmployeeServiceTask
/employee/airline/{id}GETfindAllEmployeeOfAirline(id)EmployeeServiceAirline Employee
/employeetask/employee/{id}GETfindAllEmployeeTaskOfEmployee(id)EmployeeServiceEmployee EmployeeTask
/task/{id}PUTupdateTaskById(task)EmployeeServiceTask
/employee/{id}GETfindEmployeeById(id)EmployeeServiceEmployee
/employeetaskPOSTinsertEmployeeTask(employeetask)EmployeeServiceEmployeeTask
/task/{id}DELETEdeleteTaskById(id)EmployeeServiceTask
/task/{id}GETfindTaskById(id)EmployeeServiceTask
/cargobooking/{id}PUTupdateCargoBookingById(cargobooking)EmployeeServiceCargoBooking
/cargobookingPOSTinsertCargoBooking(cargobooking)EmployeeServiceCargoBooking
/employee/{id}DELETEdeleteEmployeeById(id)EmployeeServiceEmployee
/employee/{id}PUTupdateEmployeeById(employee)EmployeeServiceEmployee

EmployeeService inside the microservice architecture

Microservices

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





3.5.1 CargoBooking


Entity Name: CargoBooking

Data Schema: AirportLogistics

Master Service: EmployeeService


Call graph of entity of CargoBooking

Microservices

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

Entity Properties

Property NameDatatypeData EntityReference Entity
BookingDateLONGCargoBooking
CustomerLONGCargoBookingCustomer
EmployeeLONGCargoBookingEmployee
FlightLONGCargoBookingFlight
PrimaryKeyLONGCargoBooking
ServerReplicationVersionLONGCargoBooking

Pseudo code snippet

final CargoBooking cargobooking = (CargoBooking) this.callMicroservice(ServiceNames.EMPLOYEE_SERVICE + "/cargobooking/" + id, CargoBooking.class);
if (cargobooking != null) {
    final Employee employee1 = (Employee) this.callMicroservice(ServiceNames.EMPLOYEE_SERVICE + "/employee/" + cargobooking.getEmployee().getId(), Employee.class);
    if (employee1 != null) {
        final Airline airline2 = (Airline) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airline/" + employee1.getAirline().getId(), Airline.class);
        if (airline2 != null) {
        }
    }
    final Flight flight3 = (Flight) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/flight/" + cargobooking.getFlight().getId(), Flight.class);
    if (flight3 != null) {
        final Gate departuregate4 = (Gate) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/gate/" + flight3.getDepartureGate().getId(), Gate.class);
        if (departuregate4 != null) {
            final Terminal terminal5 = (Terminal) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/terminal/" + departuregate4.getTerminal().getId(), Terminal.class);
            if (terminal5 != null) {
                final Airport airport6 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + terminal5.getAirport().getId(), Airport.class);
                if (airport6 != null) {
                    final City city7 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + airport6.getCity().getId(), City.class);
                    if (city7 != null) {
                        final Country country8 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city7.getCountry().getId(), Country.class);
                        if (country8 != null) {
                        }
                    }
                }
            }
        }
        final Airplane airplane9 = (Airplane) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplane/" + flight3.getAirplane().getId(), Airplane.class);
        if (airplane9 != null) {
            final Airline airline10 = (Airline) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airline/" + airplane9.getAirline().getId(), Airline.class);
            if (airline10 != null) {
            }
            final AirplaneType airplanetype11 = (AirplaneType) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplanetype/" + airplane9.getAirplaneType().getId(), AirplaneType.class);
            if (airplanetype11 != null) {
                final AirplaneProducer airplaneproducer12 = (AirplaneProducer) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplaneproducer/" + airplanetype11.getAirplaneProducer().getId(), AirplaneProducer.class);
                if (airplaneproducer12 != null) {
                }
            }
        }
        final FlightRoute flightroute13 = (FlightRoute) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/flightroute/" + flight3.getFlightRoute().getId(), FlightRoute.class);
        if (flightroute13 != null) {
            final Airport destination14 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + flightroute13.getDestination().getId(), Airport.class);
            if (destination14 != null) {
                final City city15 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + destination14.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 Airport source17 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + flightroute13.getSource().getId(), Airport.class);
            if (source17 != null) {
                final City city18 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + source17.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 Gate arrivalgate20 = (Gate) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/gate/" + flight3.getArrivalGate().getId(), Gate.class);
        if (arrivalgate20 != null) {
            final Terminal terminal21 = (Terminal) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/terminal/" + arrivalgate20.getTerminal().getId(), Terminal.class);
            if (terminal21 != null) {
                final Airport airport22 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + terminal21.getAirport().getId(), Airport.class);
                if (airport22 != null) {
                    final City city23 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + airport22.getCity().getId(), City.class);
                    if (city23 != null) {
                        final Country country24 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city23.getCountry().getId(), Country.class);
                        if (country24 != null) {
                        }
                    }
                }
            }
        }
    }
    final Customer customer25 = (Customer) this.callMicroservice(ServiceNames.EMPLOYEE_SERVICE + "/customer/" + cargobooking.getCustomer().getId(), Customer.class);
    if (customer25 != null) {
    }
}
return cargobooking;


3.5.2 Customer


Entity Name: Customer

Data Schema: AirportLogistics

Master Service: EmployeeService


Call graph of entity of Customer

Microservices

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

Entity Properties

Property NameDatatypeData EntityReference Entity
CustomerNameSTRINGCustomer
PrimaryKeyLONGCustomer
ServerReplicationVersionLONGCustomer

Pseudo code snippet

final Customer customer = (Customer) this.callMicroservice(ServiceNames.EMPLOYEE_SERVICE + "/customer/" + id, Customer.class);
if (customer != null) {
}
return customer;


3.5.3 Employee


Entity Name: Employee

Data Schema: AirportLogistics

Master Service: EmployeeService


Call graph of entity of Employee

Microservices

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

Entity Properties

Property NameDatatypeData EntityReference Entity
AirlineLONGEmployeeAirline
FirstNameSTRINGEmployee
LastNameSTRINGEmployee
PrimaryKeyLONGEmployee
ServerReplicationVersionLONGEmployee

Pseudo code snippet

final Employee employee = (Employee) this.callMicroservice(ServiceNames.EMPLOYEE_SERVICE + "/employee/" + id, Employee.class);
if (employee != null) {
    final Airline airline1 = (Airline) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airline/" + employee.getAirline().getId(), Airline.class);
    if (airline1 != null) {
    }
}
return employee;


3.5.4 EmployeeTask


Entity Name: EmployeeTask

Data Schema: AirportLogistics

Master Service: EmployeeService


Call graph of entity of EmployeeTask

Microservices

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

Entity Properties

Property NameDatatypeData EntityReference Entity
EmployeeLONGEmployeeTaskEmployee
PrimaryKeyLONGEmployeeTask
ServerReplicationVersionLONGEmployeeTask
TaskLONGEmployeeTaskTask

Pseudo code snippet

final EmployeeTask employeetask = (EmployeeTask) this.callMicroservice(ServiceNames.EMPLOYEE_SERVICE + "/employeetask/" + id, EmployeeTask.class);
if (employeetask != null) {
    final Task task1 = (Task) this.callMicroservice(ServiceNames.EMPLOYEE_SERVICE + "/task/" + employeetask.getTask().getId(), Task.class);
    if (task1 != null) {
    }
    final Employee employee2 = (Employee) this.callMicroservice(ServiceNames.EMPLOYEE_SERVICE + "/employee/" + employeetask.getEmployee().getId(), Employee.class);
    if (employee2 != null) {
        final Airline airline3 = (Airline) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airline/" + employee2.getAirline().getId(), Airline.class);
        if (airline3 != null) {
        }
    }
}
return employeetask;


3.5.5 Task


Entity Name: Task

Data Schema: AirportLogistics

Master Service: EmployeeService


Call graph of entity of Task

Microservices

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

Entity Properties

Property NameDatatypeData EntityReference Entity
DescriptionSTRINGTask
PrimaryKeyLONGTask
ServerReplicationVersionLONGTask
TaskNameSTRINGTask

Pseudo code snippet

final Task task = (Task) this.callMicroservice(ServiceNames.EMPLOYEE_SERVICE + "/task/" + id, Task.class);
if (task != null) {
}
return task;


Table of content