Class ConsolidatedInventoryAvailability
java.lang.Object
com.broadleafcommerce.inventory.domain.ConsolidatedInventoryAvailability
- All Implemented Interfaces:
Serializable
Component that indicates that a SKU inventory is available for a particular tenant and/or
application. The combination of tenantId and skuReference, or tenantId, applicationId, and
skuReference implies that there is inventory available. What is "available" is defined by what
was requested (e.g. pickup, ship to home, or in store).
This is not meant to provide specific availability (e.g. quantity available, in which inventory
location something is available, etc.). Generally, this will be used by more aggregate services
to determine general inventory availability for a SKU within an application or tenant context.
For example, Search Services may wish to filter out search results that do not have inventory
available across a tenant or application.
- Author:
- Kelly Tisdell (ktisdell)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The application ID to which this inventory availability belongs.The SKU code.The tenant ID to which this inventory availability belongs.int
hashCode()
boolean
Indicates if this inventory is available or not.void
setApplicationId
(String applicationId) The application ID to which this inventory availability belongs.void
setAvailable
(boolean available) Indicates if this inventory is available or not.void
setSkuCode
(String skuCode) The SKU code.void
setTenantId
(String tenantId) The tenant ID to which this inventory availability belongs.toString()
-
Constructor Details
-
ConsolidatedInventoryAvailability
public ConsolidatedInventoryAvailability()
-
-
Method Details
-
getTenantId
The tenant ID to which this inventory availability belongs.- Returns:
- the tenant ID
-
getApplicationId
The application ID to which this inventory availability belongs. This may be null if the inventory belongs to the tenant, and not an application.- Returns:
- the tenant ID (nullable)
-
getSkuCode
The SKU code.- Returns:
- the SKU reference
-
isAvailable
public boolean isAvailable()Indicates if this inventory is available or not. Availability will be based on what is requested (e.g. for shipment, for pickup, in store, or a combination of 2 or more).- Returns:
- whether this SKU is available or not
-
setTenantId
The tenant ID to which this inventory availability belongs.- Parameters:
tenantId
- the tenant ID
-
setApplicationId
The application ID to which this inventory availability belongs. This may be null if the inventory belongs to the tenant, and not an application.- Parameters:
applicationId
- the application ID (nullable)
-
setSkuCode
The SKU code.- Parameters:
skuCode
- the SKU or SKU code
-
setAvailable
public void setAvailable(boolean available) Indicates if this inventory is available or not. Availability will be based on what is requested (e.g. for shipment, for pickup, in store, or a combination of 2 or more).- Parameters:
available
- whether this SKU is available or not
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-