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) StringTheLocationmay be classified, like 'hazardous'.static final intDefault value ofnoMaxTransportUnits.private @Size(max=255) StringDescription of the Location.private BooleanWhether it is allowed to moveProductswithoutTransportUnitto this Location directly.private StringERP code of the Location.private StringThe foreign persistent key of the Location.private BooleanSignals the incoming state of this Location.private ZonedDateTimeWhen was this Location the last time under stock-taking.private ZonedDateTimeWhen picking happened the last time on this Location.private StringUnique identifier of aLocationGroup.private @NotNull LocationPKUnique natural key.private booleanFlag to determine if this Location is marked for deletion and cannot be used anymore.private BooleanWhether it is allowed to store differentProductson this Location.private intMaximum number ofTransportUnits allowed on this Location.private BooleanSignals the outgoing state of this Location.private intThe PLC is able to change the state of a Location.private IntegerSort order index used by Putaway strategies.private StringMight be assigned to a particular zone in stock.Fields inherited from class org.ameba.integration.jpa.ApplicationEntity
C_ID -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLocation()Dear JPA ...Location(@NotNull LocationPK locationId) -
Method Summary
Modifier and TypeMethodDescriptionbooleanAll fields.intintbooleanbooleanhasFreeSpaceAvailable(int currentNumberOfTransportUnits) Check whether thisLocationhas free capacity to storeTransportUnits.inthashCode()All fields.booleanbooleanbooleanCheck whether the plcState marks theLocationas free of blocked.voidsetDescription(String description) voidsetErpCode(String erpCode) voidsetForeignPKey(String foreignPKey) voidsetIncomingActive(boolean incomingActive) voidsetLastInventoryDate(ZonedDateTime lastInventoryDate) voidsetLocationEmpty(org.springframework.context.ApplicationEventPublisher eventPublisher, int plcState, boolean incomingActive, boolean outgoingActive) Set thisLocationempty.voidsetLocationGroup(String locationGroup) voidsetMarkForDeletion(boolean markForDeletion) voidsetNoMaxTransportUnits(int noMaxTransportUnits) voidsetOutgoingActive(boolean outgoingActive) voidsetPlcState(int plcState) toString()Just the locationId.voidverifyFreeSpaceAvailable(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, setPersistentKeyMethods 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 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 upTransportUnits.- true : Location is ready to pick up
TransportUnits - false: Location is locked, and cannot pick up
TransportUnits
- true : Location is ready to pick up
-
outgoingActive
Signals the outgoing state of this Location. Locations which are blocked for outgoing cannot releaseTransportUnits.- true : Location is enabled for outgoing
TransportUnits. - false: Location is locked,
TransportUnits can't leave this Location.
- true : Location is enabled for outgoing
-
mixedProducts
Whether it is allowed to store differentProductson this Location. -
directBookingAllowed
Whether it is allowed to moveProductswithoutTransportUnitto 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
- invalid input: '<'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
TheLocationmay be classified, like 'hazardous'. -
sortOrder
Sort order index used by Putaway strategies. -
noMaxTransportUnits
private int noMaxTransportUnitsMaximum number ofTransportUnits 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. -
markForDeletion
private boolean markForDeletionFlag to determine if this Location is marked for deletion and cannot be used anymore.
-
-
Constructor Details
-
Location
-
Location
protected Location()Dear JPA ...
-
-
Method Details
-
hasFreeSpaceAvailable
public boolean hasFreeSpaceAvailable(int currentNumberOfTransportUnits) Check whether thisLocationhas free capacity to storeTransportUnits.- 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 theLocationas free of blocked.- Returns:
- true if free (not blocked)
-
toString
Just the locationId. -
equals
All fields.- Overrides:
equalsin classorg.ameba.integration.jpa.ApplicationEntity
-
hashCode
public int hashCode()All fields.- Overrides:
hashCodein classorg.ameba.integration.jpa.ApplicationEntity
-
setLocationEmpty
public void setLocationEmpty(org.springframework.context.ApplicationEventPublisher eventPublisher, int plcState, boolean incomingActive, boolean outgoingActive) Set thisLocationempty.- 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
-
isMarkForDeletion
public boolean isMarkForDeletion() -
setMarkForDeletion
public void setMarkForDeletion(boolean markForDeletion)
-