A physical place that stock is held in, such as a warehouse, a store room or a branch. Locations belong to an organisation and hold their stock as ProductInLocation rows, one per product SKU, each carrying the quantity on hand at that location. Deleting a location deletes its stock rows with it. The name is the lookup key within the organisation, so finding a location by name expects it to be unique there.
Group: Database Entities
Implements: Serializable, Relational
Properties
| Property | Returns | Description |
|---|---|---|
| id | Long | The database identifier of this location. |
| name | String | Portable, path-safe identifier for this location, used as the lookup key within the organisation and expected to be unique there. Distinct from the title, which is only a display label. Never null. |
| notes | String | Free-text notes about the location, for example access instructions or an address. |
| productInLocations | List<ProductInLocation> | The stock held at this location, one row per product SKU, each carrying the quantity on hand. Deleting the location deletes these rows with it. |
| title | String | Free-text display label for the location, such as Auckland Warehouse. Carries no uniqueness or path-safety guarantee, unlike the name. |
Methods
getId() · getName() · setName(String name) · getTitle() · setTitle(String title) · getNotes() · setNotes(String notes) · getProductInLocations() · setProductInLocations(List<ProductInLocation> productInLocations) · setOrganisation(Organisation organisation) · rowId()
getId()
Returns: Long
The database identifier of this location.
getName()
Returns: String
Portable, path-safe identifier for this location, used as the lookup key within the organisation and expected to be unique there. Distinct from the title, which is only a display label. Never null.
setName(String name)
Returns: void
Sets the portable, path-safe identifier for this location.
| Parameter | Description |
|---|---|
name | the location's name, which must not be null |
getTitle()
Returns: String
Free-text display label for the location, such as Auckland Warehouse. Carries no uniqueness or path-safety guarantee, unlike the name.
setTitle(String title)
Returns: void
Sets the free-text display label for the location.
| Parameter | Description |
|---|---|
title | the location's display title |
getNotes()
Returns: String
Free-text notes about the location, for example access instructions or an address.
setNotes(String notes)
Returns: void
Sets the free-text notes about the location.
| Parameter | Description |
|---|---|
notes | the location notes |
getProductInLocations()
Returns: List<ProductInLocation>
The stock held at this location, one row per product SKU, each carrying the quantity on hand. Deleting the location deletes these rows with it.
setProductInLocations(List<ProductInLocation> productInLocations)
Returns: void
Sets the stock rows held at this location.
| Parameter | Description |
|---|---|
productInLocations | the stock rows for this location |
setOrganisation(Organisation organisation)
Returns: void
Sets the organisation that owns this location.
| Parameter | Description |
|---|---|
organisation | the owning organisation |
rowId()
Returns: Long
The database identifier of this location, as required by the Relational interface.