Table of content



The ProductDelivery entity within the microservice architecture

Entity-Relationship-Model of <ProductService>

Entity Name: ProductDelivery

Data Schema: Shop

Master Service: ProductService


Dataflow of entity of ProductDelivery

Microservices

3.1 CountryService3.2 DiscountCampaignService3.3 ProductService3.4 ShopLicenseService

Entity Properties

Property NameDatatypeData EntityReference Entity
AmountDOUBLEProductDelivery
DeliveryDateLONGProductDelivery
DistributorLONGProductDeliveryDistributor
PrimaryKeyLONGProductDelivery
ProductLONGProductDeliveryProduct
RemarksSTRINGProductDelivery
ServerReplicationVersionLONGProductDelivery
ShopOwnerLONGProductDelivery
WarehouseLONGProductDeliveryWarehouse

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/productdelivery/{id}DELETEdeleteProductDeliveryById(id)ProductServiceProductDelivery
/productdeliveryGETfindAllProductDelivery()ProductServiceProductDelivery
/productdelivery/{id}PUTupdateProductDeliveryById(productdelivery)ProductServiceProductDelivery
/productdelivery/product/{id}GETfindAllProductDeliveryOfProduct(id)ProductServiceProduct ProductDelivery
/productdelivery/distributor/{id}GETfindAllProductDeliveryOfDistributor(id)ProductServiceDistributor ProductDelivery
/productdelivery/warehouse/{id}GETfindAllProductDeliveryOfWarehouse(id)ProductServiceWarehouse ProductDelivery
/productdeliveryPOSTinsertProductDelivery(productdelivery)ProductServiceProductDelivery
/productdelivery/{id}GETfindProductDeliveryById(id)ProductServiceProductDelivery

Distributed transaction of <ProductDelivery>

Pseudo code snippet

final ProductDelivery productdelivery = (ProductDelivery) this.callMicroservice(ServiceNames.PRODUCT_SERVICE + "/productdelivery/" + id, ProductDelivery.class);
if (productdelivery != null) {
    final Warehouse warehouse1 = (Warehouse) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/warehouse/" + productdelivery.getWarehouse().getId(), Warehouse.class);
    if (warehouse1 != null) {
        final Country country2 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + warehouse1.getCountry().getId(), Country.class);
        if (country2 != null) {
        }
    }
    final Product product3 = (Product) this.callMicroservice(ServiceNames.PRODUCT_SERVICE + "/product/" + productdelivery.getProduct().getId(), Product.class);
    if (product3 != null) {
        final SalesTax salestax4 = (SalesTax) this.callMicroservice(ServiceNames.PRODUCT_SERVICE + "/salestax/" + product3.getSalesTax().getId(), SalesTax.class);
        if (salestax4 != null) {
            final Country country5 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + salestax4.getCountry().getId(), Country.class);
            if (country5 != null) {
            }
        }
        final ProductCategory productcategory6 = (ProductCategory) this.callMicroservice(ServiceNames.PRODUCT_SERVICE + "/productcategory/" + product3.getProductCategory().getId(), ProductCategory.class);
        if (productcategory6 != null) {
        }
        final Country countryoforigin7 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + product3.getCountryOfOrigin().getId(), Country.class);
        if (countryoforigin7 != null) {
        }
    }
    final Distributor distributor8 = (Distributor) this.callMicroservice(ServiceNames.PRODUCT_SERVICE + "/distributor/" + productdelivery.getDistributor().getId(), Distributor.class);
    if (distributor8 != null) {
    }
}
return productdelivery;


Table of content