Table of content



The Seat entity within the microservice architecture

Entity-Relationship-Model of <PassengerBookingService>

Entity Name: Seat

Data Schema: AirportLogistics

Master Service: PassengerBookingService


Dataflow of entity of Seat

Microservices

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

Entity Properties

Property NameDatatypeData EntityReference Entity
AirplaneLONGSeatAirplane
PrimaryKeyLONGSeat
SeatCategoryLONGSeatSeatCategory
SeatIDSTRINGSeat
ServerReplicationVersionLONGSeat

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/seat/seatcategory/{id}GETfindAllSeatOfSeatCategory(id)PassengerBookingServiceSeatCategory Seat
/seat/{id}GETfindSeatById(id)PassengerBookingServiceSeat
/seatPOSTinsertSeat(seat)PassengerBookingServiceSeat
/seat/{id}PUTupdateSeatById(seat)PassengerBookingServiceSeat
/seatGETfindAllSeat()PassengerBookingServiceSeat
/seat/{id}DELETEdeleteSeatById(id)PassengerBookingServiceSeat
/seat/airplane/{id}GETfindAllSeatOfAirplane(id)PassengerBookingServiceAirplane Seat
/passengerbooking/seat/{id}GETfindAllPassengerBookingOfSeat(id)PassengerBookingServiceSeat PassengerBooking

Distributed transaction of <Seat>

Pseudo code snippet

final Seat seat = (Seat) this.callMicroservice(ServiceNames.PASSENGER_BOOKING_SERVICE + "/seat/" + id, Seat.class);
if (seat != null) {
    final Airplane airplane1 = (Airplane) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplane/" + seat.getAirplane().getId(), Airplane.class);
    if (airplane1 != null) {
        final Airline airline2 = (Airline) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airline/" + airplane1.getAirline().getId(), Airline.class);
        if (airline2 != null) {
        }
        final AirplaneType airplanetype3 = (AirplaneType) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplanetype/" + airplane1.getAirplaneType().getId(), AirplaneType.class);
        if (airplanetype3 != null) {
            final AirplaneProducer airplaneproducer4 = (AirplaneProducer) this.callMicroservice(ServiceNames.AIRPLANE_SERVICE + "/airplaneproducer/" + airplanetype3.getAirplaneProducer().getId(), AirplaneProducer.class);
            if (airplaneproducer4 != null) {
            }
        }
    }
    final SeatCategory seatcategory5 = (SeatCategory) this.callMicroservice(ServiceNames.PASSENGER_BOOKING_SERVICE + "/seatcategory/" + seat.getSeatCategory().getId(), SeatCategory.class);
    if (seatcategory5 != null) {
    }
}
return seat;


Table of content