Class Product

java.lang.Object
org.ameba.integration.jpa.BaseEntity
org.ameba.integration.jpa.ApplicationEntity
org.openwms.wms.inventory.Product
All Implemented Interfaces:
Serializable, Comparable<Product>, org.ameba.integration.TypedEntity<Long>

@Entity public class Product extends org.ameba.integration.jpa.ApplicationEntity implements Comparable<Product>, Serializable
A Product.
Author:
Heiko Scherrer
See Also:
  • Field Details

    • sku

      @NotEmpty private @NotEmpty String sku
      The product id is part of the unique business key.
    • label

      private String label
      An identifying label of the Product.
    • accountId

      private String accountId
      The name of the Account the Product belongs to.
    • baseUnit

      @NotNull private @NotNull org.openwms.core.units.api.Measurable baseUnit
      Products may be defined with different base units.
    • overbookingAllowed

      @NotNull private @javax.validation.constraints.NotNull boolean overbookingAllowed
      Is it allowed to receive a higher quantity as expected/announced of this Product?
    • description

      private String description
      A short descriptive text.
    • descriptionText

      private String descriptionText
      A longer description of the Product.
    • availabilityState

      private AvailabilityState availabilityState
      The Product definition can be set to be unavailable for further operations.
    • classification

      private String classification
      Products may be classified, ie. hazardous.
    • group

      private String group
      Products may be grouped.
    • stockZone

      private String stockZone
      Where the Product has to be placed in stock.
    • units

      private List<UomRelation> units
      A Product can be packed and stored in different box sizes.
    • dimension

      private Dimension dimension
      The defined dimension of the Product in it's baseUnit.
    • netWeight

      private org.openwms.core.units.api.Weight netWeight
      The defined netto weight of the Product.
    • preferableStorageLocation

      private Location preferableStorageLocation
      What is typically the preferable Location where the Product shall be stored.
    • stackingRules

      private List<ProductStackingRule> stackingRules
      A list of rules that define what kind of Product can be stacked on top of this one.
    • details

      private Map<String,String> details
      Arbitrary detail information on this Product, might be populated with ERP information.
  • Constructor Details

    • Product

      protected Product()
    • Product

      public Product(String sku, org.openwms.core.units.api.Measurable baseUnit)
  • Method Details

    • skuAndLabel

      public String skuAndLabel()
      Format and return the SKU and label.
      Returns:
      As String in the format sku/-- or sku/label
    • getUnits

      public List<UomRelation> getUnits()
      Initialize and return the units.
      Returns:
      A list of defined UOMs, never null
    • getStackingRules

      public List<ProductStackingRule> getStackingRules()
      Initialize and return the stackingRules.
      Returns:
      A list of existing stackingRules, never null
    • getOwnStackingHeight

      public int getOwnStackingHeight()
      Get the number of times this Product can be stacked on itself.
      Returns:
      The allowed number of times, 0 means not stackable
    • isStackingAllowed

      public boolean isStackingAllowed(Product other, int amountOfUnits)
      Assign stackingRules to this Product.
    • getDetails

      public Map<String,String> getDetails()
      Get all the details of this Product.
      Returns:
      As Map
    • addDetail

      public Product addDetail(String key, String value)
      Add a new detail to the Product.
      Parameters:
      key - The unique key of the detail
      value - The value as String
      Returns:
      This instance
    • compareTo

      public int compareTo(Product o)
      Uses the sku for comparison
      Specified by:
      compareTo in interface Comparable<Product>
    • toString

      public String toString()
      Return the SKU;
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Not: descriptionText, stackingRules, units, details
      Overrides:
      equals in class org.ameba.integration.jpa.ApplicationEntity
    • hashCode

      public int hashCode()
      Not: descriptionText, stackingRules, units, details
      Overrides:
      hashCode in class org.ameba.integration.jpa.ApplicationEntity
    • getSku

      public String getSku()
    • setSku

      public void setSku(String sku)
    • getLabel

      public String getLabel()
    • setLabel

      public void setLabel(String label)
    • getAccountId

      public String getAccountId()
    • setAccountId

      public void setAccountId(String accountId)
    • getAvailabilityState

      public AvailabilityState getAvailabilityState()
    • setAvailabilityState

      public void setAvailabilityState(AvailabilityState availabilityState)
    • getClassification

      public String getClassification()
    • setClassification

      public void setClassification(String classification)
    • getGroup

      public String getGroup()
    • setGroup

      public void setGroup(String group)
    • getBaseUnit

      public org.openwms.core.units.api.Measurable getBaseUnit()
    • setBaseUnit

      public void setBaseUnit(org.openwms.core.units.api.Measurable baseUnit)
    • isOverbookingAllowed

      public boolean isOverbookingAllowed()
    • setOverbookingAllowed

      public void setOverbookingAllowed(boolean overbookingAllowed)
    • setUnits

      public void setUnits(List<UomRelation> units)
    • getDimension

      public Dimension getDimension()
    • setDimension

      public void setDimension(Dimension dimension)
    • getNetWeight

      public org.openwms.core.units.api.Weight getNetWeight()
    • setNetWeight

      public void setNetWeight(org.openwms.core.units.api.Weight defaultWeight)
    • getPreferableStorageLocation

      public Location getPreferableStorageLocation()
    • setPreferableStorageLocation

      public void setPreferableStorageLocation(Location preferableStorageLocation)
    • setStackingRules

      void setStackingRules(List<ProductStackingRule> stackingRules)
    • setDetails

      public void setDetails(Map<String,String> details)
    • getDescription

      public String getDescription()
      Get the description.
      Returns:
      the description.
    • setDescription

      public void setDescription(String description)
      Set the description.
      Parameters:
      description - The description to set.
    • getDescriptionText

      public String getDescriptionText()
      Get the long description text.
      Returns:
      The description text
    • setDescriptionText

      public void setDescriptionText(String descriptionText)
      Set the long description text.
      Parameters:
      descriptionText - The description text
    • getStockZone

      public String getStockZone()
      Get the stockZone.
      Returns:
      the stockZone.
    • setStockZone

      public void setStockZone(String stockZone)
      Set the stockZone.
      Parameters:
      stockZone - The stockZone to set.