Class AddressBaseType

java.lang.Object
org.projecthusky.common.basetypes.AddressBaseType
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Address

public class AddressBaseType extends Object implements Serializable
This class provides the basic information for a postal address according to the HL7 address entity. This class does not have any foreign framework dependencies and is therefore one of the base elements of the Husky.
See Also:
  • Constructor Details

    • AddressBaseType

      public AddressBaseType()
      Instantiates a new AddressBaseType. Default constructor.
  • Method Details

    • builder

      @Generated("SparkTools") public static AddressBaseType.Builder builder()
      Creates builder to build AddressBaseType.
      Returns:
      created builder
    • equals

      public boolean equals(Object obj)
      Checks whether the two objects are equal (based on their content).
      Overrides:
      equals in class Object
      Parameters:
      obj - the AddressBaseType to compare
      Returns:
      true, if equal; false otherwise.
    • getAdditionalLocator

      public String getAdditionalLocator()
      Gets the additional locator. This can be a unit designator, such as apartment number, suite number, or floor. There may be several unit designators in an address (e.g., "3rd floor, Appt. 342"). This can also be a designator pointing away from the location, rather than specifying a smaller location within some larger one (e.g., Dutch "t.o." means "opposite to" for house boats located across the street facing houses).
      Returns:
      the additional locator
    • setAdditionalLocator

      public void setAdditionalLocator(String additionalLocator)
      Sets the additional locator. See getter getAdditionalLocator() for more details.
      Parameters:
      additionalLocator - the new additional locator
    • getBuildingNumber

      public String getBuildingNumber()
      Gets the building number. The number of a building, house or lot alongside the street. Also known as "primary street number". This does not number the street but rather the building.
      Returns:
      the building number
    • setBuildingNumber

      public void setBuildingNumber(String buildingNumber)
      Sets the building number. See getter getBuildingNumber() for more details.
      Parameters:
      buildingNumber - the new building number
    • getCity

      public String getCity()
      Gets the city. The name of the city, town, village, or other community or delivery center.
      Returns:
      the city
    • setCity

      public void setCity(String city)
      Sets the city. See getter getCity() for more details.
      Parameters:
      city - the new city
    • getCountry

      public String getCountry()
      Gets the country.
      Returns:
      the country
    • setCountry

      public void setCountry(String country)
      Sets the country.See getter getCountry() for more details.
      Parameters:
      country - the new country
    • getNullFlavor

      public NullFlavor getNullFlavor()
      Gets the null flavor.
      Returns:
      the null flavor
    • getPostalCode

      public String getPostalCode()
      Gets the postal code. A postal code designating a region defined by the postal service.
      Returns:
      the postal code
    • setPostalCode

      public void setPostalCode(String postalCode)
      Sets the postal code. See getter getPostalCode() for more details.
      Parameters:
      postalCode - the new postal code
    • getPostBox

      public String getPostBox()
      Gets the post box. A numbered box located in a post station.
      Returns:
      the post box
    • setPostBox

      public void setPostBox(String postBox)
      Sets the post box. See getter getPostBox() for more details.
      Parameters:
      postBox - the new post box
    • getState

      public String getState()
      Gets the state. A sub-unit of a country with limited sovereignty in a federally organized country (e.g. Switzerland: canton).
      Returns:
      the state
    • setState

      public void setState(String state)
      Sets the state See getter getState() for more details.
      Parameters:
      state - the new state
    • getStreetAddressLine1

      public String getStreetAddressLine1()
      Gets the street address line 1. Can be used for an additional locator, a delivery address or a street address.
      Returns:
      the street address line 1
    • setStreetAddressLine1

      public void setStreetAddressLine1(String streetAddressLine1)
      Sets the street address line 1. See getter getStreetAddressLine1() for more details.
      Parameters:
      streetAddressLine1 - the new street address line 1
    • getStreetAddressLine2

      public String getStreetAddressLine2()
      Gets the street address line 2. Can be used for an additional locator, a delivery address or a street address.
      Returns:
      the street address line 2
    • setStreetAddressLine2

      public void setStreetAddressLine2(String streetAddressLine2)
      Sets the street address line 2. See getter getStreetAddressLine2() for more details.
      Parameters:
      streetAddressLine2 - the new street address line 2
    • getStreetName

      public String getStreetName()
      Gets the street name. The name of a roadway or artery recognized by a municipality.
      Returns:
      the street name
    • setStreetName

      public void setStreetName(String streetName)
      Sets the street name.See getter getStreetName() for more details.
      Parameters:
      streetName - the new street name
    • getUsage

      public PostalAddressUse getUsage()
      Gets type of usage (such as private, business, ...).
      Returns:
      the usage
    • setUsage

      public void setUsage(PostalAddressUse usage)
      Sets the type of usage. See getter getUsage() for more details.
      Parameters:
      usage - the new usage
    • hashCode

      public int hashCode()
      Hash code.
      Overrides:
      hashCode in class Object
      Returns:
      the int
    • isNullFlavor

      public boolean isNullFlavor()
      Checks if the current instance is null flavored.
      Returns:
      true, if is null flavor
    • setNullFlavor

      public void setNullFlavor(NullFlavor nullFlavor)
      Sets the null flavor.
      Parameters:
      nullFlavor - the new null flavor
    • toString

      public String toString()
      Builds a string of the whole address.
      Overrides:
      toString in class Object
      Returns:
      the string