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 String
The name of theAccount
the Product belongs to.private AvailabilityState
The 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 String
Products may be classified, ie.private String
A short descriptive text.private String
A longer description of theProduct
.Arbitrary detail information on thisProduct
, might be populated with ERP information.private Dimension
The defined dimension of theProduct
in it's baseUnit.private String
Products may be grouped.private String
An identifying label of the Product.private org.openwms.core.units.api.Weight
The defined netto weight of theProduct
.private @javax.validation.constraints.NotNull boolean
Is it allowed to receive a higher quantity as expected/announced of this Product?private Location
What is typically the preferableLocation
where theProduct
shall be stored.private @NotEmpty String
The product id is part of the unique business key.private List<ProductStackingRule>
A list of rules that define what kind ofProduct
can be stacked on top of this one.private String
Where the Product has to be placed in stock.private List<UomRelation>
AProduct
can 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
.int
Uses the sku for comparisonboolean
Not: descriptionText, stackingRules, units, detailsorg.openwms.core.units.api.Measurable
Get the description.Get the long description text.Get all the details of thisProduct
.getGroup()
getLabel()
org.openwms.core.units.api.Weight
int
Get the number of times thisProduct
can be stacked on itself.getSku()
Initialize and return thestackingRules
.Get the stockZone.getUnits()
Initialize and return theunits
.int
hashCode()
Not: descriptionText, stackingRules, units, detailsboolean
boolean
isStackingAllowed
(Product other, int amountOfUnits) Assign stackingRules to this Product.void
setAccountId
(String accountId) void
setAvailabilityState
(AvailabilityState availabilityState) void
setBaseUnit
(org.openwms.core.units.api.Measurable baseUnit) void
setClassification
(String classification) void
setDescription
(String description) Set the description.void
setDescriptionText
(String descriptionText) Set the long description text.void
setDetails
(Map<String, String> details) void
setDimension
(Dimension dimension) void
void
void
setNetWeight
(org.openwms.core.units.api.Weight defaultWeight) void
setOverbookingAllowed
(boolean overbookingAllowed) void
setPreferableStorageLocation
(Location preferableStorageLocation) void
(package private) void
setStackingRules
(List<ProductStackingRule> stackingRules) void
setStockZone
(String stockZone) Set the stockZone.void
setUnits
(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, setPersistentKey
Methods inherited from class org.ameba.integration.jpa.BaseEntity
getCreatedBy, getCreateDt, getLastModifiedBy, getLastModifiedDt, getOl, getPk, isNew, 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 theAccount
the Product belongs to. -
baseUnit
@NotNull private @NotNull org.openwms.core.units.api.Measurable baseUnitProducts may be defined with different base units. -
overbookingAllowed
@NotNull private @javax.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, ie. hazardous. -
group
Products may be grouped. -
stockZone
Where the Product has to be placed in stock. -
units
AProduct
can be packed and stored in different box sizes. -
dimension
The defined dimension of theProduct
in it's baseUnit. -
netWeight
private org.openwms.core.units.api.Weight netWeightThe defined netto weight of theProduct
. -
preferableStorageLocation
What is typically the preferableLocation
where theProduct
shall be stored. -
stackingRules
A list of rules that define what kind ofProduct
can 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 thisProduct
can 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:
compareTo
in interfaceComparable<Product>
-
toString
Return the SKU; -
equals
Not: descriptionText, stackingRules, units, details- Overrides:
equals
in classorg.ameba.integration.jpa.ApplicationEntity
-
hashCode
public int hashCode()Not: descriptionText, stackingRules, units, details- Overrides:
hashCode
in 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.
-