Class FulfillmentDestinationDetail

java.lang.Object
com.broadleafcommerce.fulfillment.domain.FulfillmentDestinationDetail

public class FulfillmentDestinationDetail extends Object
Geographic data for a fulfillment destination.
  • Constructor Details

    • FulfillmentDestinationDetail

      public FulfillmentDestinationDetail()
  • Method Details

    • matches

      public boolean matches(com.broadleafcommerce.fulfillment.common.domain.Address address)
      Return true if this detail matches the passed in Address. Does not check radius, only checks fields used with DestinationDetailType.ZONE.
      Parameters:
      address - The Address to check.
      Returns:
      True if the given address matches this destination detail. False otherwise.
    • checkValue

      protected boolean checkValue(String destDetailValue, String addressValue)
      Returns true if the dest detail value is not set. Otherwise, returns true if the two values are equal ignoring case.
      Parameters:
      destDetailValue - The value from this destination detail to compare
      addressValue - The value from the address to compare
      Returns:
      True if the given destDetailValue is empty or if the two given value match ignoring case. False otherwise.
    • getId

      public String getId()
      The id of this instance.
    • getName

      public String getName()
      A name for this instance.
    • getCountryCode

      public String getCountryCode()
      Country code
    • getRegionCode

      public String getRegionCode()
      Region, state, or province
    • getCity

      public String getCity()
      City
    • getPostalCode

      public String getPostalCode()
      Postal Code
    • getType

      public String getType()
      The type of destination detail, either zone or radius.
      See Also:
    • getRadius

      public Double getRadius()

      The radius distance from the given address or coordinates.

      Only used with DestinationDetailType.RADIUS.

    • getRadiusUnit

      public String getRadiusUnit()

      The unit of measurement of the radius. Miles or Kilometers.

      Only used with DestinationDetailType.RADIUS.

    • getAddressLine1

      public String getAddressLine1()

      Address number and street.

      Only used with DestinationDetailType.RADIUS.

    • isUseCoordinates

      public boolean isUseCoordinates()

      Indicate if coordinates or an address should be used for the middle of the circle.

      Only used with DestinationDetailType.RADIUS.

      Only used to drive the admin display.

    • getLatitude

      public Double getLatitude()

      Latitude of the center of the circle of the destination area.

      Only used with DestinationDetailType.RADIUS.

    • getLongitude

      public Double getLongitude()

      Longitude of the center of the circle of the destination area.

      Only used with DestinationDetailType.RADIUS.

    • setId

      public void setId(String id)
      The id of this instance.
    • setName

      public void setName(String name)
      A name for this instance.
    • setCountryCode

      public void setCountryCode(String countryCode)
      Country code
    • setRegionCode

      public void setRegionCode(String regionCode)
      Region, state, or province
    • setCity

      public void setCity(String city)
      City
    • setPostalCode

      public void setPostalCode(String postalCode)
      Postal Code
    • setType

      public void setType(String type)
      The type of destination detail, either zone or radius.
      See Also:
    • setRadius

      public void setRadius(Double radius)

      The radius distance from the given address or coordinates.

      Only used with DestinationDetailType.RADIUS.

    • setRadiusUnit

      public void setRadiusUnit(String radiusUnit)

      The unit of measurement of the radius. Miles or Kilometers.

      Only used with DestinationDetailType.RADIUS.

    • setAddressLine1

      public void setAddressLine1(String addressLine1)

      Address number and street.

      Only used with DestinationDetailType.RADIUS.

    • setUseCoordinates

      public void setUseCoordinates(boolean useCoordinates)

      Indicate if coordinates or an address should be used for the middle of the circle.

      Only used with DestinationDetailType.RADIUS.

      Only used to drive the admin display.

    • setLatitude

      public void setLatitude(Double latitude)

      Latitude of the center of the circle of the destination area.

      Only used with DestinationDetailType.RADIUS.

    • setLongitude

      public void setLongitude(Double longitude)

      Longitude of the center of the circle of the destination area.

      Only used with DestinationDetailType.RADIUS.

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object