Table of content



The ProductPrice entity within the microservice architecture

Entity-Relationship-Model of <ProductService>

Entity Name: ProductPrice

Data Schema: Shop

Master Service: ProductService


Dataflow of entity of ProductPrice

Microservices

3.1 CountryService3.2 DiscountCampaignService3.3 ProductService3.4 ShopLicenseService

Entity Properties

Property NameDatatypeData EntityReference Entity
CountryLONGProductPriceCountry
PriceDOUBLEProductPrice
PrimaryKeyLONGProductPrice
ProductLONGProductPriceProduct
ServerReplicationVersionLONGProductPrice
ShopOwnerLONGProductPrice
ValidFromLONGProductPrice

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/productprice/{id}GETfindProductPriceById(id)ProductServiceProductPrice
/productprice/{id}DELETEdeleteProductPriceById(id)ProductServiceProductPrice
/productpricePOSTinsertProductPrice(productprice)ProductServiceProductPrice
/productprice/{id}PUTupdateProductPriceById(productprice)ProductServiceProductPrice
/productprice/country/{id}GETfindAllProductPriceOfCountry(id)ProductServiceCountry ProductPrice
/productprice/product/{id}GETfindAllProductPriceOfProduct(id)ProductServiceProduct ProductPrice
/productpriceGETfindAllProductPrice()ProductServiceProductPrice

Distributed transaction of <ProductPrice>

Pseudo code snippet

final ProductPrice productprice = (ProductPrice) this.callMicroservice(ServiceNames.PRODUCT_SERVICE + "/productprice/" + id, ProductPrice.class);
if (productprice != null) {
    final Product product1 = (Product) this.callMicroservice(ServiceNames.PRODUCT_SERVICE + "/product/" + productprice.getProduct().getId(), Product.class);
    if (product1 != null) {
        final SalesTax salestax2 = (SalesTax) this.callMicroservice(ServiceNames.PRODUCT_SERVICE + "/salestax/" + product1.getSalesTax().getId(), SalesTax.class);
        if (salestax2 != null) {
            final Country country3 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + salestax2.getCountry().getId(), Country.class);
            if (country3 != null) {
            }
        }
        final ProductCategory productcategory4 = (ProductCategory) this.callMicroservice(ServiceNames.PRODUCT_SERVICE + "/productcategory/" + product1.getProductCategory().getId(), ProductCategory.class);
        if (productcategory4 != null) {
        }
        final Country countryoforigin5 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + product1.getCountryOfOrigin().getId(), Country.class);
        if (countryoforigin5 != null) {
        }
    }
    final Country country6 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + productprice.getCountry().getId(), Country.class);
    if (country6 != null) {
    }
}
return productprice;


Table of content