Package org.openwms.wms.location
Class LocationPK
java.lang.Object
org.openwms.wms.location.LocationPK
- All Implemented Interfaces:
- Serializable
A LocationPK, is a value type and is used as an unique natural key for 
Location entities.- Author:
- Heiko Scherrer
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final classLocationPKbuilder static inner class.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate @Max(4L) StringExpresses the aisle theLocationbelongs to.private @Max(4L) StringExpresses the area theLocationbelongs to.static final shortstatic final shortstatic final shortReturns the complete length of all keys.private @Max(4L) StringExpresses the x-dimension theLocationbelongs to.private @Max(4L) StringExpresses the y-dimension theLocationbelongs to.private @Max(4L) StringExpresses the z-dimension theLocationbelongs to.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedDear JPA ...LocationPK(String... keys) Weak constructor to create a new LocationPK with a couple of keys only.Create a new LocationPK with all required fields.privateLocationPK(LocationPK.Builder builder) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleanstatic LocationPKfromString(String s) getAisle()Get the aisle region.getArea()Get the area region.getX()Get the x-dimension.getY()Get the y-dimension.getZ()Get the z-dimension.inthashCode()static booleanstatic LocationPK.BuilderCreate a new builder instance to create LocationPK from.toString()Return a String like AREA/AISLE/X/Y/Z.
- 
Field Details- 
KEY_LENGTHpublic static final short KEY_LENGTH- See Also:
 
- 
NUMBER_OF_KEYSpublic static final short NUMBER_OF_KEYS- See Also:
 
- 
PK_LENGTHpublic static final short PK_LENGTHReturns the complete length of all keys. Currently all keys have the same length, therefore it is the 5 times the length of a single key (KEY_LENGTH). But since this can change the actual length is encapsulated within this method.- See Also:
 
- 
areaExpresses the area theLocationbelongs to.
- 
aisleExpresses the aisle theLocationbelongs to.
- 
xExpresses the x-dimension theLocationbelongs to.
- 
yExpresses the y-dimension theLocationbelongs to.
- 
zExpresses the z-dimension theLocationbelongs to.
 
- 
- 
Constructor Details- 
LocationPKprotected LocationPK()Dear JPA ...
- 
LocationPKCreate a new LocationPK with all required fields.
- 
LocationPKWeak constructor to create a new LocationPK with a couple of keys only.- Parameters:
- keys- The array of keys, currently expected to be 5
- Throws:
- IllegalArgumentException- if the number of keys does not match- NUMBER_OF_KEYS
 
- 
LocationPK
 
- 
- 
Method Details- 
fromString
- 
isValid
- 
newBuilderCreate a new builder instance to create LocationPK from.- Returns:
- The builder
 
- 
getAreaGet the area region.- Returns:
- The area
 
- 
getAisleGet the aisle region.- Returns:
- The aisle
 
- 
getXGet the x-dimension.- Returns:
- The x-dimension
 
- 
getYGet the y-dimension.- Returns:
- The y-dimension
 
- 
getZGet the z-dimension.- Returns:
- The z-dimension
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toStringReturn a String like AREA/AISLE/X/Y/Z.
 
-