Package org.openwms.wms.inventory
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 Summary
FieldsModifier and TypeFieldDescriptionprivate StringThe name of theAccountthe Product belongs to.private AvailabilityStateThe Product definition can be set to be unavailable for further operations.private @NotNull org.openwms.core.units.api.Measurable<?, ?, ?> Products may be defined with different base units.private StringProducts may be classified, e.g. hazardous.private StringA short descriptive text.private StringA longer description of theProduct.Arbitrary detail information on thisProduct, might be populated with ERP information.private DimensionThe defined dimension of theProductin it's baseUnit.private StringProducts may be grouped.private StringAn identifying label of the Product.private org.openwms.core.units.api.WeightThe defined net weight of theProduct.private @jakarta.validation.constraints.NotNull booleanIs it allowed to receive a higher quantity as expected/announced of this Product?private LocationWhat is typically the preferableLocationwhere theProductshall be stored.private @NotBlank StringThe product id is part of the unique business key.private List<ProductStackingRule> A list of rules that define what kind ofProductcan be stacked on top of this one.private StringWhere the Product has to be placed in stock.private List<UomRelation> AProductcan be packed and stored in different box sizes.Fields inherited from class org.ameba.integration.jpa.ApplicationEntity
C_ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd a new detail to theProduct.intUses the sku for comparisonbooleanNot: descriptionText, stackingRules, units, detailsorg.openwms.core.units.api.MeasurableGet the description.Get the long description text.Get all the details of thisProduct.getGroup()getLabel()org.openwms.core.units.api.WeightintGet the number of times thisProductcan be stacked on itself.getSku()Initialize and return thestackingRules.Get the stockZone.getUnits()Initialize and return theunits.inthashCode()Not: descriptionText, stackingRules, units, detailsbooleanbooleanisStackingAllowed(Product other, int amountOfUnits) Assign stackingRules to this Product.voidsetAccountId(String accountId) voidsetAvailabilityState(AvailabilityState availabilityState) voidsetBaseUnit(org.openwms.core.units.api.Measurable baseUnit) voidsetClassification(String classification) voidsetDescription(String description) Set the description.voidsetDescriptionText(String descriptionText) Set the long description text.voidsetDetails(Map<String, String> details) voidsetDimension(Dimension dimension) voidvoidvoidsetNetWeight(org.openwms.core.units.api.Weight defaultWeight) voidsetOverbookingAllowed(boolean overbookingAllowed) voidsetPreferableStorageLocation(Location preferableStorageLocation) void(package private) voidsetStackingRules(List<ProductStackingRule> stackingRules) voidsetStockZone(String stockZone) Set the stockZone.voidsetUnits(List<UomRelation> units) Format and return the SKU and label.toString()Return the SKU;Methods inherited from class org.ameba.integration.jpa.ApplicationEntity
getPersistentKey, hasPersistentKey, onEntityPersist, onPersist, setPersistentKeyMethods inherited from class org.ameba.integration.jpa.BaseEntity
getCreatedBy, getCreateDt, getLastModifiedBy, getLastModifiedDt, getOl, getPk, isNew, setCreatedBy, setCreateDt, setLastModifiedBy, setLastModifiedDt, setOl
-
Field Details
-
sku
The product id is part of the unique business key. -
label
An identifying label of the Product. -
accountId
The name of theAccountthe 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 @jakarta.validation.constraints.NotNull boolean overbookingAllowedIs it allowed to receive a higher quantity as expected/announced of this Product? -
description
A short descriptive text. -
descriptionText
A longer description of theProduct. -
availabilityState
The Product definition can be set to be unavailable for further operations. -
classification
Products may be classified, e.g. hazardous. -
group
Products may be grouped. -
stockZone
Where the Product has to be placed in stock. -
units
AProductcan be packed and stored in different box sizes. -
dimension
The defined dimension of theProductin it's baseUnit. -
netWeight
private org.openwms.core.units.api.Weight netWeightThe defined net weight of theProduct. -
preferableStorageLocation
What is typically the preferableLocationwhere theProductshall be stored. -
stackingRules
A list of rules that define what kind ofProductcan be stacked on top of this one. -
details
Arbitrary detail information on thisProduct, might be populated with ERP information.
-
-
Constructor Details
-
Product
protected Product() -
Product
-
-
Method Details
-
skuAndLabel
Format and return the SKU and label.- Returns:
- As String in the format sku/-- or sku/label
-
getUnits
Initialize and return theunits.- Returns:
- A list of defined UOMs, never null
-
getStackingRules
Initialize and return thestackingRules.- Returns:
- A list of existing stackingRules, never null
-
getOwnStackingHeight
public int getOwnStackingHeight()Get the number of times thisProductcan be stacked on itself.- Returns:
- The allowed number of times, 0 means not stackable
-
isStackingAllowed
Assign stackingRules to this Product. -
getDetails
Get all the details of thisProduct.- Returns:
- As Map
-
addDetail
Add a new detail to theProduct.- Parameters:
key- The unique key of the detailvalue- The value as String- Returns:
- This instance
-
compareTo
Uses the sku for comparison- Specified by:
compareToin interfaceComparable<Product>
-
toString
Return the SKU; -
equals
Not: descriptionText, stackingRules, units, details- Overrides:
equalsin classorg.ameba.integration.jpa.ApplicationEntity
-
hashCode
public int hashCode()Not: descriptionText, stackingRules, units, details- Overrides:
hashCodein classorg.ameba.integration.jpa.ApplicationEntity
-
getSku
-
setSku
-
getLabel
-
setLabel
-
getAccountId
-
setAccountId
-
getAvailabilityState
-
setAvailabilityState
-
getClassification
-
setClassification
-
getGroup
-
setGroup
-
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
-
getDimension
-
setDimension
-
getNetWeight
public org.openwms.core.units.api.Weight getNetWeight() -
setNetWeight
public void setNetWeight(org.openwms.core.units.api.Weight defaultWeight) -
getPreferableStorageLocation
-
setPreferableStorageLocation
-
setStackingRules
-
setDetails
-
getDescription
Get the description.- Returns:
- the description.
-
setDescription
Set the description.- Parameters:
description- The description to set.
-
getDescriptionText
Get the long description text.- Returns:
- The description text
-
setDescriptionText
Set the long description text.- Parameters:
descriptionText- The description text
-
getStockZone
Get the stockZone.- Returns:
- the stockZone.
-
setStockZone
Set the stockZone.- Parameters:
stockZone- The stockZone to set.
-