Class JpaInventoryLocation
java.lang.Object
com.broadleafcommerce.inventory.provider.jpa.domain.JpaInventoryLocation
- All Implemented Interfaces:
com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
,com.broadleafcommerce.data.tracking.core.ApplicationTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking>
,com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
,com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
,com.broadleafcommerce.data.tracking.core.Temporal
,com.broadleafcommerce.data.tracking.core.Trackable
,com.broadleafcommerce.data.tracking.core.TypedTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking>
,com.broadleafcommerce.translation.domain.Translatable
,Serializable
@Entity
@TrackableExtension(APPLICATION)
public class JpaInventoryLocation
extends Object
implements Serializable, com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable, com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware, com.broadleafcommerce.data.tracking.core.ApplicationTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking>, com.broadleafcommerce.data.tracking.core.Temporal, com.broadleafcommerce.translation.domain.Translatable
JPA representation of an
InventoryLocation
.- Author:
- Kelly Tisdell (ktisdell)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addFromMeAddressMappings
(org.modelmapper.ModelMapper mapper) protected void
addToMeAddressMappings
(org.modelmapper.ModelMapper mapper) protected boolean
boolean
org.modelmapper.ModelMapper
fromMe()
protected <V> org.modelmapper.spi.DestinationSetter<InventoryLocation,
V> fromMeAddressSetter
(org.modelmapper.spi.DestinationSetter<Address, V> setterOnAddress) Address 1Address 2Address 3Class<?>
getCity()
CityThe jpa primary key.Country codeLatitude, in terms of Earth's coordinates.Arbitrary inventory location number.Longitude, in terms of Earth's coordinates.getName()
Arbitrary name of the location.The postal code, or Zip code (US).Typically two or three character State, Province, or Region code (e.g.Temporal state describing the time at which this item was last updated.com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking
int
hashCode()
boolean
Indicates if this location is a pickup location.boolean
Indicates if this location is a shipping location.boolean
Indicates if this location is a "Store" location, or a place where customers can go to shop.void
setAddressLine1
(String addressLine1) Address 1void
setAddressLine2
(String addressLine2) Address 2void
setAddressLine3
(String addressLine3) Address 3void
Cityvoid
setContextId
(String contextId) The jpa primary key.void
setCountry
(String country) Country codevoid
setLatitude
(Double latitude) Latitude, in terms of Earth's coordinates.void
setLocationNumber
(String locationNumber) Arbitrary inventory location number.void
setLongitude
(Double longitude) Longitude, in terms of Earth's coordinates.void
Arbitrary name of the location.void
setPickupLocation
(boolean pickupLocation) Indicates if this location is a pickup location.void
setPostalCode
(String postalCode) The postal code, or Zip code (US).void
setShippingLocation
(boolean shippingLocation) Indicates if this location is a shipping location.void
setStateProvinceRegion
(String stateProvinceRegion) Typically two or three character State, Province, or Region code (e.g.void
setStoreLocation
(boolean storeLocation) Indicates if this location is a "Store" location, or a place where customers can go to shop.void
setTimestamp
(Instant timestamp) Temporal state describing the time at which this item was last updated.void
setTracking
(com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking tracking) void
setVendorRef
(String vendorRef) org.modelmapper.ModelMapper
toMe()
protected org.modelmapper.spi.SourceGetter<InventoryLocation>
toMeAddressGetter
(org.modelmapper.spi.SourceGetter<Address> getterOnAddress) toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
postFromMe, postToMe, preFromMe, preToMe
Methods inherited from interface com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
findNotificationState
Methods inherited from interface com.broadleafcommerce.data.tracking.core.Trackable
getDisplay, getNotificationStates, getNotificationStates, setNotificationStates
Methods inherited from interface com.broadleafcommerce.data.tracking.core.TypedTrackable
setTracking
-
Constructor Details
-
JpaInventoryLocation
public JpaInventoryLocation()
-
-
Method Details
-
fromMe
@NonNull public org.modelmapper.ModelMapper fromMe()- Specified by:
fromMe
in interfacecom.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
-
addFromMeAddressMappings
protected void addFromMeAddressMappings(org.modelmapper.ModelMapper mapper) -
fromMeAddressSetter
protected <V> org.modelmapper.spi.DestinationSetter<InventoryLocation,V> fromMeAddressSetter(org.modelmapper.spi.DestinationSetter<Address, V> setterOnAddress) -
toMe
@NonNull public org.modelmapper.ModelMapper toMe()- Specified by:
toMe
in interfacecom.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
-
addToMeAddressMappings
protected void addToMeAddressMappings(org.modelmapper.ModelMapper mapper) -
toMeAddressGetter
protected org.modelmapper.spi.SourceGetter<InventoryLocation> toMeAddressGetter(org.modelmapper.spi.SourceGetter<Address> getterOnAddress) -
getBusinessDomainType
- Specified by:
getBusinessDomainType
in interfacecom.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
-
getContextId
The jpa primary key.- Specified by:
getContextId
in interfacecom.broadleafcommerce.data.tracking.core.Trackable
- Specified by:
getContextId
in interfacecom.broadleafcommerce.translation.domain.Translatable
- Returns:
- The jpa primary key
-
getName
Arbitrary name of the location. Could be a store name, or warehouse name, or other name. -
getLocationNumber
Arbitrary inventory location number. Could be store number, warehouse number, or some soft foreign key reference to another system. -
isShippingLocation
public boolean isShippingLocation()Indicates if this location is a shipping location. Typically (but not always), retail stores are not shipping locations. Rather, typically, warehouses are shipping locations. Some locations are both (i.e. warehouses can allow customer pickup and stores can allow shipping). -
isPickupLocation
public boolean isPickupLocation()Indicates if this location is a pickup location. Typically (but not always), warehouses are not pickup locations. Rather, typically, warehouses are shipping locations and stores are pickup locations. Some locations are both (i.e. warehouses can allow customer pickup and stores can allow shipping). -
isStoreLocation
public boolean isStoreLocation()Indicates if this location is a "Store" location, or a place where customers can go to shop. Store locations areInventoryLocation
s since they likely contain inventory. They may or may not also be shipping locations and/or pickup locations. -
getVendorRef
- See Also:
-
getTimestamp
Temporal state describing the time at which this item was last updated. Relates to theTemporal
interface and is primarily used during consumption of messages regarding changes in state to this domain. For example, a service consuming a change notification for this domain can compare the current persisted timestamp to this timestamp to determine if it already has a newer version, in which case, it can ignore. This is primarily a measure to ensure that ordering is not required for messages related to state change.- Specified by:
getTimestamp
in interfacecom.broadleafcommerce.data.tracking.core.Temporal
- Returns:
- Temporal state describing the time at which this item was last updated
-
getLatitude
Latitude, in terms of Earth's coordinates. -
getLongitude
Longitude, in terms of Earth's coordinates. -
getAddressLine1
Address 1 -
getAddressLine2
Address 2 -
getAddressLine3
Address 3 -
getCity
City -
getStateProvinceRegion
Typically two or three character State, Province, or Region code (e.g. TX, NY, CA in the US; AB, ON, BC in CA) -
getCountry
Country code -
getPostalCode
The postal code, or Zip code (US). These are not necessarily unique from country to country, so care should be taken to include country when querying for postal code. -
getTracking
public com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking getTracking()- Specified by:
getTracking
in interfacecom.broadleafcommerce.data.tracking.core.Trackable
- See Also:
-
ApplicationJpaTracking
-
setContextId
The jpa primary key.- Specified by:
setContextId
in interfacecom.broadleafcommerce.data.tracking.core.Trackable
- Parameters:
LOCATION_ID
- (or contextId) - The jpa primary key
-
setName
Arbitrary name of the location. Could be a store name, or warehouse name, or other name. -
setLocationNumber
Arbitrary inventory location number. Could be store number, warehouse number, or some soft foreign key reference to another system. -
setShippingLocation
public void setShippingLocation(boolean shippingLocation) Indicates if this location is a shipping location. Typically (but not always), retail stores are not shipping locations. Rather, typically, warehouses are shipping locations. Some locations are both (i.e. warehouses can allow customer pickup and stores can allow shipping). -
setPickupLocation
public void setPickupLocation(boolean pickupLocation) Indicates if this location is a pickup location. Typically (but not always), warehouses are not pickup locations. Rather, typically, warehouses are shipping locations and stores are pickup locations. Some locations are both (i.e. warehouses can allow customer pickup and stores can allow shipping). -
setStoreLocation
public void setStoreLocation(boolean storeLocation) Indicates if this location is a "Store" location, or a place where customers can go to shop. Store locations areInventoryLocation
s since they likely contain inventory. They may or may not also be shipping locations and/or pickup locations. -
setVendorRef
- See Also:
-
setTimestamp
Temporal state describing the time at which this item was last updated. Relates to theTemporal
interface and is primarily used during consumption of messages regarding changes in state to this domain. For example, a service consuming a change notification for this domain can compare the current persisted timestamp to this timestamp to determine if it already has a newer version, in which case, it can ignore. This is primarily a measure to ensure that ordering is not required for messages related to state change.- Specified by:
setTimestamp
in interfacecom.broadleafcommerce.data.tracking.core.Temporal
- Parameters:
timestamp
- Temporal state describing the time at which this item was last updated
-
setLatitude
Latitude, in terms of Earth's coordinates. -
setLongitude
Longitude, in terms of Earth's coordinates. -
setAddressLine1
Address 1 -
setAddressLine2
Address 2 -
setAddressLine3
Address 3 -
setCity
City -
setStateProvinceRegion
Typically two or three character State, Province, or Region code (e.g. TX, NY, CA in the US; AB, ON, BC in CA) -
setCountry
Country code -
setPostalCode
The postal code, or Zip code (US). These are not necessarily unique from country to country, so care should be taken to include country when querying for postal code. -
setTracking
public void setTracking(com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking tracking) - Specified by:
setTracking
in interfacecom.broadleafcommerce.data.tracking.core.TypedTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking>
- See Also:
-
ApplicationJpaTracking
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-