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

PropertyReturnsDescription
idLongThe database identifier of this location.
nameStringPortable, 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.
notesStringFree-text notes about the location, for example access instructions or an address.
productInLocationsList<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.
titleStringFree-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.

ParameterDescription
namethe 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.

ParameterDescription
titlethe 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.

ParameterDescription
notesthe 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.

ParameterDescription
productInLocationsthe stock rows for this location

setOrganisation(Organisation organisation)

Returns: void

Sets the organisation that owns this location.

ParameterDescription
organisationthe owning organisation

rowId()

Returns: Long

The database identifier of this location, as required by the Relational interface.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.