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 anInventoryLocation
.- Author:
- Kelly Tisdell (ktisdell)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JpaInventoryLocation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addFromMeAddressMappings(org.modelmapper.ModelMapper mapper)
protected void
addToMeAddressMappings(org.modelmapper.ModelMapper mapper)
protected boolean
canEqual(Object other)
boolean
equals(Object o)
org.modelmapper.ModelMapper
fromMe()
protected <V> org.modelmapper.spi.DestinationSetter<InventoryLocation,V>
fromMeAddressSetter(org.modelmapper.spi.DestinationSetter<Address,V> setterOnAddress)
String
getAddressLine1()
Address 1String
getAddressLine2()
Address 2String
getAddressLine3()
Address 3Class<?>
getBusinessDomainType()
String
getCity()
CityString
getContextId()
The jpa primary key.String
getCountry()
Country codeDouble
getLatitude()
Latitude, in terms of Earth's coordinates.String
getLocationNumber()
Arbitrary inventory location number.Double
getLongitude()
Longitude, in terms of Earth's coordinates.String
getName()
Arbitrary name of the location.String
getPostalCode()
The postal code, or Zip code (US).String
getStateProvinceRegion()
Typically two or three character State, Province, or Region code (e.g.Instant
getTimestamp()
Temporal state describing the time at which this item was last updated.com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking
getTracking()
String
getVendorRef()
int
hashCode()
boolean
isPickupLocation()
Indicates if this location is a pickup location.boolean
isShippingLocation()
Indicates if this location is a shipping location.boolean
isStoreLocation()
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
setCity(String city)
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
setName(String name)
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)
String
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
-
-
-
-
Method Detail
-
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
public Class<?> getBusinessDomainType()
- Specified by:
getBusinessDomainType
in interfacecom.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
-
getContextId
public String 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
public String getName()
Arbitrary name of the location. Could be a store name, or warehouse name, or other name.
-
getLocationNumber
public String 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
public String getVendorRef()
- See Also:
InventoryLocation.getVendorRef()
-
getTimestamp
public Instant 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
public Double getLatitude()
Latitude, in terms of Earth's coordinates.
-
getLongitude
public Double getLongitude()
Longitude, in terms of Earth's coordinates.
-
getAddressLine1
public String getAddressLine1()
Address 1
-
getAddressLine2
public String getAddressLine2()
Address 2
-
getAddressLine3
public String getAddressLine3()
Address 3
-
getCity
public String getCity()
City
-
getStateProvinceRegion
public String 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
public String getCountry()
Country code
-
getPostalCode
public String 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
public void setContextId(String contextId)
The jpa primary key.- Specified by:
setContextId
in interfacecom.broadleafcommerce.data.tracking.core.Trackable
- Parameters:
LOCATION_ID
- (or contextId) - The jpa primary key
-
setName
public void setName(String name)
Arbitrary name of the location. Could be a store name, or warehouse name, or other name.
-
setLocationNumber
public void setLocationNumber(String locationNumber)
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
public void setVendorRef(String vendorRef)
- See Also:
InventoryLocation.getVendorRef()
-
setTimestamp
public void setTimestamp(Instant timestamp)
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
public void setLatitude(Double latitude)
Latitude, in terms of Earth's coordinates.
-
setLongitude
public void setLongitude(Double longitude)
Longitude, in terms of Earth's coordinates.
-
setAddressLine1
public void setAddressLine1(String addressLine1)
Address 1
-
setAddressLine2
public void setAddressLine2(String addressLine2)
Address 2
-
setAddressLine3
public void setAddressLine3(String addressLine3)
Address 3
-
setCity
public void setCity(String city)
City
-
setStateProvinceRegion
public void setStateProvinceRegion(String stateProvinceRegion)
Typically two or three character State, Province, or Region code (e.g. TX, NY, CA in the US; AB, ON, BC in CA)
-
setCountry
public void setCountry(String country)
Country code
-
setPostalCode
public void setPostalCode(String postalCode)
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
-
canEqual
protected boolean canEqual(Object other)
-
-