Class Product

java.lang.Object
com.dmasone.identity.catalog.domain.Product

public final class Product extends Object
Catalog aggregate that owns stock reservation rules. The JPA entity is kept outside the domain package so the rule can be tested without persistence concerns and reused by application services.
  • Method Details

    • restore

      public static Product restore(Long id, String sku, String name, BigDecimal price, int availableQuantity)
    • reserve

      public void reserve(int quantity)
    • id

      public Long id()
    • sku

      public String sku()
    • name

      public String name()
    • price

      public BigDecimal price()
    • availableQuantity

      public int availableQuantity()