Class SolarLocation

All Implemented Interfaces:
Serializable, Cloneable, Comparable<Long>, EntityMatch, Filter, FilterMatch<Long>, Location, LocationMatch, net.solarnetwork.dao.Entity<Long>, net.solarnetwork.domain.Identity<Long>, net.solarnetwork.domain.Location

public class SolarLocation extends BaseEntity implements Cloneable, Serializable, Location, LocationMatch
A location entity.
See Also:
  • Constructor Details

    • SolarLocation

      public SolarLocation()
      Default constructor.
    • SolarLocation

      public SolarLocation(Location loc)
      Copy constructor for Location objects.
      Parameters:
      loc - the location to copy
  • Method Details

    • removeEmptyValues

      public void removeEmptyValues()
      Change values that are non-null but empty to null.

      This method is helpful for web form submission, to remove filter values that are empty and would otherwise try to match on empty string values.

    • normalizedLocation

      public static SolarLocation normalizedLocation(Location loc)
      Return a new SolarLocation with normalized values from another Location.
      Parameters:
      loc - the location to normalize
      Returns:
      the normalized location
      Since:
      1.3
    • getFilter

      public Map<String,?> getFilter()
      Description copied from interface: Filter
      Get a mapping of filter keys and associated filter values.
      Specified by:
      getFilter in interface Filter
      Returns:
      a filter map
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getName

      public String getName()
      Description copied from interface: LocationMatch
      A generalized name, can be used for "virtual" locations.
      Specified by:
      getName in interface net.solarnetwork.domain.Location
      Specified by:
      getName in interface LocationMatch
      Returns:
      the location name
    • setName

      public void setName(String name)
    • getCountry

      public String getCountry()
      Description copied from interface: LocationMatch
      Get the ISO 3166-1 alpha-2 character country code.
      Specified by:
      getCountry in interface net.solarnetwork.domain.Location
      Specified by:
      getCountry in interface LocationMatch
      Returns:
      2-character country code
    • setCountry

      public void setCountry(String country)
    • getRegion

      public String getRegion()
      Description copied from interface: LocationMatch
      A country-specific regional identifier.
      Specified by:
      getRegion in interface net.solarnetwork.domain.Location
      Specified by:
      getRegion in interface LocationMatch
      Returns:
      region identifier
    • setRegion

      public void setRegion(String region)
    • getStateOrProvince

      public String getStateOrProvince()
      Description copied from interface: LocationMatch
      Get a country-specific state or province identifier.
      Specified by:
      getStateOrProvince in interface net.solarnetwork.domain.Location
      Specified by:
      getStateOrProvince in interface LocationMatch
      Returns:
      state or province identifier
    • setStateOrProvince

      public void setStateOrProvince(String stateOrProvince)
    • getLocality

      public String getLocality()
      Description copied from interface: LocationMatch
      Get the locality (city, town, etc.).
      Specified by:
      getLocality in interface net.solarnetwork.domain.Location
      Specified by:
      getLocality in interface LocationMatch
      Returns:
      locality
    • setLocality

      public void setLocality(String locality)
    • getPostalCode

      public String getPostalCode()
      Description copied from interface: LocationMatch
      Get a country-specific postal code.
      Specified by:
      getPostalCode in interface net.solarnetwork.domain.Location
      Specified by:
      getPostalCode in interface LocationMatch
      Returns:
      postal code
    • setPostalCode

      public void setPostalCode(String postalCode)
    • getStreet

      public String getStreet()
      Description copied from interface: LocationMatch
      Get the street address.
      Specified by:
      getStreet in interface net.solarnetwork.domain.Location
      Specified by:
      getStreet in interface LocationMatch
      Returns:
      street
    • setStreet

      public void setStreet(String street)
    • getLatitude

      public BigDecimal getLatitude()
      Description copied from interface: LocationMatch
      Get the decimal latitude.
      Specified by:
      getLatitude in interface net.solarnetwork.domain.Location
      Specified by:
      getLatitude in interface LocationMatch
      Returns:
      latitude
    • setLatitude

      public void setLatitude(BigDecimal latitude)
    • setLat

      public void setLat(BigDecimal latitude)
      Set the latitude.

      This method is an alias for setLatitude(BigDecimal) and is provided for compatibility with the JSON serialized form of Location.

      Parameters:
      latitude - the latitude to set
      Since:
      2.1
    • getLongitude

      public BigDecimal getLongitude()
      Description copied from interface: LocationMatch
      Get the decimal longitude.
      Specified by:
      getLongitude in interface net.solarnetwork.domain.Location
      Specified by:
      getLongitude in interface LocationMatch
      Returns:
      longitude
    • setLongitude

      public void setLongitude(BigDecimal longitude)
    • setLon

      public void setLon(BigDecimal longitude)
      Set the longitude.

      This method is an alias for setLongitude(BigDecimal) and is provided for compatibility with the JSON serialized form of Location.

      Parameters:
      longitude - the longitude to set
      Since:
      2.1
    • getTimeZoneId

      public String getTimeZoneId()
      Specified by:
      getTimeZoneId in interface net.solarnetwork.domain.Location
    • setTimeZoneId

      public void setTimeZoneId(String timeZoneId)
    • setZone

      public void setZone(String timeZoneId)
      Set the time zone ID.

      This method is an alias for setTimeZoneId(String) and is provided for compatibility with the JSON serialized form of Location.

      Parameters:
      timeZoneId - the zone ID to set
      Since:
      2.1
    • getElevation

      public BigDecimal getElevation()
      Description copied from interface: LocationMatch
      Get the elevation, in meters.
      Specified by:
      getElevation in interface net.solarnetwork.domain.Location
      Specified by:
      getElevation in interface LocationMatch
      Returns:
      the elevation
    • setElevation

      public void setElevation(BigDecimal elevation)
    • setEl

      public void setEl(BigDecimal elevation)
      Set the elevation.

      This method is an alias for setElevation(BigDecimal) and is provided for compatibility with the JSON serialized form of Location.

      Parameters:
      elevation - the elevation to set
      Since:
      2.1