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 Summary
Modifier and TypeFieldDescriptionprivate @NotNull org.openwms.core.units.api.Measurable
<?, ?, ?> Products may be defined with different base units.private String
Textual descriptive text.private @NotBlank String
The foreign persistent key of theProduct
.private String
An identifying label of the Product.private @NotNull Boolean
private @NotBlank String
The product id is part of the unique business key.Fields inherited from class org.ameba.integration.jpa.ApplicationEntity
C_ID
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Uses the sku for comparisonboolean
Use all fields.org.openwms.core.units.api.Measurable
getLabel()
getSku()
Get the SKU.int
hashCode()
Use all fields.protected void
In case theforeignPKey
is set, we use this external immutable identifier as persistent key.void
setBaseUnit
(org.openwms.core.units.api.Measurable baseUnit) void
setDescription
(String description) void
setForeignPKey
(String foreignPKey) void
void
setOverbookingAllowed
(Boolean overbookingAllowed) void
shortId()
Return the short identification of this Product.toString()
Return the SKU;Methods inherited from class org.ameba.integration.jpa.ApplicationEntity
getPersistentKey, hasPersistentKey, onPersist, setPersistentKey
Methods inherited from class org.ameba.integration.jpa.BaseEntity
getCreatedBy, getCreateDt, getLastModifiedBy, getLastModifiedDt, getOl, getPk, isNew, setCreatedBy, setCreateDt, setLastModifiedBy, setLastModifiedDt, setOl
-
Field Details
-
foreignPKey
The foreign persistent key of theProduct
. -
sku
The product id is part of the unique business key. -
label
An identifying label of the Product. -
description
Textual descriptive text. -
baseUnit
@NotNull private @NotNull org.openwms.core.units.api.Measurable<?,?, baseUnit?> Products may be defined with different base units. -
overbookingAllowed
-
-
Constructor Details
-
Product
protected Product()Dear JPA ... -
Product
Create a Product with a sku.- Parameters:
sku
- The sku
-
-
Method Details
-
onEntityPersist
protected void onEntityPersist()In case theforeignPKey
is set, we use this external immutable identifier as persistent key.- Overrides:
onEntityPersist
in classorg.ameba.integration.jpa.ApplicationEntity
-
getForeignPKey
-
setForeignPKey
-
getSku
Get the SKU.- Returns:
- the SKU.
-
setSku
-
getLabel
-
setLabel
-
getDescription
-
setDescription
-
getBaseUnit
public org.openwms.core.units.api.Measurable getBaseUnit() -
setBaseUnit
public void setBaseUnit(org.openwms.core.units.api.Measurable baseUnit) -
getOverbookingAllowed
-
setOverbookingAllowed
-
compareTo
Uses the sku for comparison- Specified by:
compareTo
in interfaceComparable<Product>
-
equals
Use all fields.- Overrides:
equals
in classorg.ameba.integration.jpa.ApplicationEntity
-
hashCode
public int hashCode()Use all fields.- Overrides:
hashCode
in classorg.ameba.integration.jpa.ApplicationEntity
-
toString
Return the SKU; -
shortId
Return the short identification of this Product.- Returns:
- The SKU
-