Package org.openwms.wms.location
Class Location
java.lang.Object
org.ameba.integration.jpa.BaseEntity
org.ameba.integration.jpa.ApplicationEntity
org.openwms.wms.location.Location
- All Implemented Interfaces:
Serializable
,org.ameba.integration.TypedEntity<Long>
@Entity
public class Location
extends org.ameba.integration.jpa.ApplicationEntity
implements Serializable
A Location represents any location in a warehouse with the attributes relevant for the WMS Inventory Service.
- Author:
- Heiko Scherrer
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate @Size(max=255) String
TheLocation
may be classified, like 'hazardous'.static final int
Default value ofnoMaxTransportUnits
.private @Size(max=255) String
Description of the Location.private Boolean
Whether it is allowed to moveProducts
withoutTransportUnit
to this Location directly.private String
ERP code of the Location.private String
The foreign persistent key of the Location.private Boolean
Signals the incoming state of this Location.private ZonedDateTime
When was this Location the last time under stock-taking.private ZonedDateTime
When picking happened the last time on this Location.private String
Unique identifier of aLocationGroup
.private @NotNull LocationPK
Unique natural key.private Boolean
Whether it is allowed to store differentProducts
on this Location.private int
Maximum number ofTransportUnit
s allowed on this Location.private Boolean
Signals the outgoing state of this Location.private int
The PLC is able to change the state of a Location.private Integer
Sort order index used by Putaway strategies.private String
Might be assigned to a particular zone in stock.Fields inherited from class org.ameba.integration.jpa.ApplicationEntity
C_ID
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Location()
Dear JPA ...Location
(@NotNull LocationPK locationId) -
Method Summary
Modifier and TypeMethodDescriptionboolean
All fields.int
int
boolean
boolean
hasFreeSpaceAvailable
(int currentNumberOfTransportUnits) Check whether thisLocation
has free capacity to storeTransportUnit
s.int
hashCode()
All fields.boolean
boolean
Check whether the plcState marks theLocation
as free of blocked.void
setDescription
(String description) void
setErpCode
(String erpCode) void
setForeignPKey
(String foreignPKey) void
setIncomingActive
(boolean incomingActive) void
setLastInventoryDate
(ZonedDateTime lastInventoryDate) void
setLocationEmpty
(org.springframework.context.ApplicationEventPublisher eventPublisher, int plcState, boolean incomingActive, boolean outgoingActive) Set thisLocation
empty.void
setLocationGroup
(String locationGroup) void
setNoMaxTransportUnits
(int noMaxTransportUnits) void
setOutgoingActive
(boolean outgoingActive) void
setPlcState
(int plcState) toString()
Just the locationId.void
verifyFreeSpaceAvailable
(org.ameba.i18n.Translator translator, int currentNumberOfTransportUnits) Verify that additional capacity is available to store at least oneTransportUnit
.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
-
foreignPKey
The foreign persistent key of the Location. -
locationId
Unique natural key. -
locationGroup
Unique identifier of aLocationGroup
. -
incomingActive
Signals the incoming state of this Location. Locations which are blocked for incoming cannot pick upTransportUnit
s.- true : Location is ready to pick up
TransportUnit
s - false: Location is locked, and cannot pick up
TransportUnit
s
- true : Location is ready to pick up
-
outgoingActive
Signals the outgoing state of this Location. Locations which are blocked for outgoing cannot releaseTransportUnit
s.- true : Location is enabled for outgoing
TransportUnit
s. - false: Location is locked,
TransportUnit
s can't leave this Location.
- true : Location is enabled for outgoing
-
mixedProducts
Whether it is allowed to store differentProducts
on this Location. -
directBookingAllowed
Whether it is allowed to moveProducts
withoutTransportUnit
to this Location directly. -
plcState
private int plcStateThe PLC is able to change the state of a Location. This property stores the last state, received from the PLC.- 0 : No PLC error, everything okay
- <0: Not defined
- >0: Some kind of defined error code
-
erpCode
ERP code of the Location. -
description
Description of the Location. -
stockZone
Might be assigned to a particular zone in stock. -
classification
TheLocation
may be classified, like 'hazardous'. -
sortOrder
Sort order index used by Putaway strategies. -
noMaxTransportUnits
private int noMaxTransportUnitsMaximum number ofTransportUnit
s allowed on this Location. -
DEF_MAX_TU
public static final int DEF_MAX_TUDefault value ofnoMaxTransportUnits
.- See Also:
-
lastPickingDate
When picking happened the last time on this Location. -
lastInventoryDate
When was this Location the last time under stock-taking.
-
-
Constructor Details
-
Location
-
Location
protected Location()Dear JPA ...
-
-
Method Details
-
hasFreeSpaceAvailable
public boolean hasFreeSpaceAvailable(int currentNumberOfTransportUnits) Check whether thisLocation
has free capacity to storeTransportUnit
s.- Parameters:
currentNumberOfTransportUnits
- The current amount of TransportUnits currently placed in the Location- Returns:
- true If free capacity is left
-
verifyFreeSpaceAvailable
public void verifyFreeSpaceAvailable(org.ameba.i18n.Translator translator, int currentNumberOfTransportUnits) Verify that additional capacity is available to store at least oneTransportUnit
.- Parameters:
translator
- A Translator instance used to translate error messagescurrentNumberOfTransportUnits
- The current amount of TransportUnits currently placed in the Location- Throws:
org.ameba.exception.BusinessRuntimeException
- In case no space is left on Location
-
isPlcNotBlocked
public boolean isPlcNotBlocked()Check whether the plcState marks theLocation
as free of blocked.- Returns:
- true if free (not blocked)
-
toString
Just the locationId. -
equals
All fields.- Overrides:
equals
in classorg.ameba.integration.jpa.ApplicationEntity
-
hashCode
public int hashCode()All fields.- Overrides:
hashCode
in classorg.ameba.integration.jpa.ApplicationEntity
-
setLocationEmpty
public void setLocationEmpty(org.springframework.context.ApplicationEventPublisher eventPublisher, int plcState, boolean incomingActive, boolean outgoingActive) Set thisLocation
empty.- Parameters:
eventPublisher
- An ApplicationEventPublisher instance that is used to publish change eventsplcState
- The PLC state to set, must be greater than 0incomingActive
- The state of incoming movementsoutgoingActive
- The state of outgoing movements
-
getForeignPKey
-
setForeignPKey
-
getLocationId
-
hasLocationId
public boolean hasLocationId() -
getLocationGroup
-
setLocationGroup
-
setIncomingActive
public void setIncomingActive(boolean incomingActive) -
getIncomingActive
-
getOutgoingActive
-
setOutgoingActive
public void setOutgoingActive(boolean outgoingActive) -
getMixedProducts
-
getDirectBookingAllowed
-
getPlcState
public int getPlcState() -
setPlcState
public void setPlcState(int plcState) -
getErpCode
-
hasErpCode
public boolean hasErpCode() -
setErpCode
-
getDescription
-
setDescription
-
getStockZone
-
getClassification
-
getSortOrder
-
getNoMaxTransportUnits
public int getNoMaxTransportUnits() -
setNoMaxTransportUnits
public void setNoMaxTransportUnits(int noMaxTransportUnits) -
getLastPickingDate
-
getLastInventoryDate
-
setLastInventoryDate
-