Class Product

java.lang.Object
org.ameba.integration.jpa.BaseEntity
org.ameba.integration.jpa.ApplicationEntity
org.openwms.wms.receiving.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

    • foreignPKey

      @NotBlank private @NotBlank String foreignPKey
      The foreign persistent key of the Product.
    • sku

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

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

      private String description
      Textual descriptive text.
    • baseUnit

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

      @NotNull private @NotNull Boolean overbookingAllowed
  • Constructor Details

    • Product

      protected Product()
      Dear JPA ...
    • Product

      public Product(String sku)
      Create a Product with a sku.
      Parameters:
      sku - The sku
  • Method Details

    • onEntityPersist

      protected void onEntityPersist()
      In case the foreignPKey is set, we use this external immutable identifier as persistent key.
      Overrides:
      onEntityPersist in class org.ameba.integration.jpa.ApplicationEntity
    • getForeignPKey

      public String getForeignPKey()
    • setForeignPKey

      public void setForeignPKey(String foreignPKey)
    • getSku

      public String getSku()
      Get the SKU.
      Returns:
      the SKU.
    • setSku

      public void setSku(String sku)
    • getLabel

      public String getLabel()
    • setLabel

      public void setLabel(String label)
    • getDescription

      public String getDescription()
    • setDescription

      public void setDescription(String description)
    • getBaseUnit

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

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

      public Boolean getOverbookingAllowed()
    • setOverbookingAllowed

      public void setOverbookingAllowed(Boolean overbookingAllowed)
    • compareTo

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

      public boolean equals(Object o)
      Use all fields.
      Overrides:
      equals in class org.ameba.integration.jpa.ApplicationEntity
    • hashCode

      public int hashCode()
      Use all fields.
      Overrides:
      hashCode in class org.ameba.integration.jpa.ApplicationEntity
    • toString

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

      public String shortId()
      Return the short identification of this Product.
      Returns:
      The SKU