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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddFromMeAddressMappings(org.modelmapper.ModelMapper mapper) protected voidaddToMeAddressMappings(org.modelmapper.ModelMapper mapper) protected booleanbooleanorg.modelmapper.ModelMapperfromMe()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.ApplicationJpaTrackinginthashCode()booleanIndicates if this location is a pickup location.booleanIndicates if this location is a shipping location.booleanIndicates if this location is a "Store" location, or a place where customers can go to shop.voidsetAddressLine1(String addressLine1) Address 1voidsetAddressLine2(String addressLine2) Address 2voidsetAddressLine3(String addressLine3) Address 3voidCityvoidsetContextId(String contextId) The jpa primary key.voidsetCountry(String country) Country codevoidsetLatitude(Double latitude) Latitude, in terms of Earth's coordinates.voidsetLocationNumber(String locationNumber) Arbitrary inventory location number.voidsetLongitude(Double longitude) Longitude, in terms of Earth's coordinates.voidArbitrary name of the location.voidsetPickupLocation(boolean pickupLocation) Indicates if this location is a pickup location.voidsetPostalCode(String postalCode) The postal code, or Zip code (US).voidsetShippingLocation(boolean shippingLocation) Indicates if this location is a shipping location.voidsetStateProvinceRegion(String stateProvinceRegion) Typically two or three character State, Province, or Region code (e.g.voidsetStoreLocation(boolean storeLocation) Indicates if this location is a "Store" location, or a place where customers can go to shop.voidsetTimestamp(Instant timestamp) Temporal state describing the time at which this item was last updated.voidsetTracking(com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking tracking) voidsetVendorRef(String vendorRef) org.modelmapper.ModelMappertoMe()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, waitMethods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
postFromMe, postToMe, preFromMe, preToMeMethods inherited from interface com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
findNotificationStateMethods inherited from interface com.broadleafcommerce.data.tracking.core.Trackable
getDisplay, getNotificationStates, getNotificationStates, setNotificationStatesMethods 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:
fromMein 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:
toMein 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:
getBusinessDomainTypein interfacecom.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
-
getContextId
The jpa primary key.- Specified by:
getContextIdin interfacecom.broadleafcommerce.data.tracking.core.Trackable- Specified by:
getContextIdin 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 areInventoryLocations 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 theTemporalinterface 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:
getTimestampin 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:
getTrackingin interfacecom.broadleafcommerce.data.tracking.core.Trackable- See Also:
-
ApplicationJpaTracking
-
setContextId
The jpa primary key.- Specified by:
setContextIdin 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 areInventoryLocations 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 theTemporalinterface 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:
setTimestampin 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:
setTrackingin interfacecom.broadleafcommerce.data.tracking.core.TypedTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking>- See Also:
-
ApplicationJpaTracking
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-