Class BasicLocationLookupSettingSpecifier

java.lang.Object
net.solarnetwork.settings.support.BaseSettingSpecifier
net.solarnetwork.settings.support.BaseKeyedSettingSpecifier<Long>
net.solarnetwork.node.settings.support.BasicLocationLookupSettingSpecifier
All Implemented Interfaces:
DatumLocation, LocationLookupSettingSpecifier, net.solarnetwork.settings.KeyedSettingSpecifier<Long>, net.solarnetwork.settings.MappableSpecifier, net.solarnetwork.settings.SettingSpecifier

public class BasicLocationLookupSettingSpecifier extends net.solarnetwork.settings.support.BaseKeyedSettingSpecifier<Long> implements LocationLookupSettingSpecifier
Basic implementation of LocationLookupSettingSpecifier.
Version:
2.0
Author:
matt
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.solarnetwork.settings.MappableSpecifier

    net.solarnetwork.settings.MappableSpecifier.Mapper
  • Field Summary

    Fields inherited from interface net.solarnetwork.node.domain.datum.DatumLocation

    DAY_TYPE, PRICE_TYPE, WEATHER_TYPE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Construct with a key and default value.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the location this setting is for.
    Get a unique ID of this location.
    Get a name for this location.
    Get the location type or tag, e.g.
    net.solarnetwork.domain.datum.GeneralDatumMetadata
    Get metadata about the location.
    Get a unique ID of the source of this location.
    Get the name of the source of this location.
    net.solarnetwork.settings.SettingSpecifier
    mappedWithMapper(net.solarnetwork.settings.MappableSpecifier.Mapper mapper)
     
    net.solarnetwork.settings.SettingSpecifier
     

    Methods inherited from class net.solarnetwork.settings.support.BaseKeyedSettingSpecifier

    getDefaultValue, getDescriptionArguments, getKey, isTransient, mappedTo, setDefaultValue, setDescriptionArguments, setKey, setTransient, toString

    Methods inherited from class net.solarnetwork.settings.support.BaseSettingSpecifier

    getTitle, getType, setTitle

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.solarnetwork.settings.KeyedSettingSpecifier

    getDefaultValue, getDescriptionArguments, getKey, isTransient

    Methods inherited from interface net.solarnetwork.settings.MappableSpecifier

    mappedTo

    Methods inherited from interface net.solarnetwork.settings.SettingSpecifier

    getTitle, getType
  • Constructor Details

    • BasicLocationLookupSettingSpecifier

      public BasicLocationLookupSettingSpecifier(String key, String locationType, DatumLocation location)
      Construct with a key and default value.
      Parameters:
      key - the key
      locationType - the location type
      location - the location
  • Method Details

    • mappedWithPlaceholer

      public net.solarnetwork.settings.SettingSpecifier mappedWithPlaceholer(String template)
      Specified by:
      mappedWithPlaceholer in interface net.solarnetwork.settings.MappableSpecifier
    • mappedWithMapper

      public net.solarnetwork.settings.SettingSpecifier mappedWithMapper(net.solarnetwork.settings.MappableSpecifier.Mapper mapper)
      Specified by:
      mappedWithMapper in interface net.solarnetwork.settings.MappableSpecifier
    • getLocation

      public DatumLocation getLocation()
      Description copied from interface: LocationLookupSettingSpecifier
      Get the location this setting is for.
      Specified by:
      getLocation in interface LocationLookupSettingSpecifier
      Returns:
      a Location, or null if none available
    • getLocationId

      public Long getLocationId()
      Description copied from interface: DatumLocation
      Get a unique ID of this location.
      Specified by:
      getLocationId in interface DatumLocation
      Returns:
      the location ID
    • getLocationName

      public String getLocationName()
      Description copied from interface: DatumLocation
      Get a name for this location.
      Specified by:
      getLocationName in interface DatumLocation
      Returns:
      the location name
    • getSourceId

      public String getSourceId()
      Description copied from interface: DatumLocation
      Get a unique ID of the source of this location.
      Specified by:
      getSourceId in interface DatumLocation
      Returns:
      the source ID
    • getSourceName

      public String getSourceName()
      Description copied from interface: DatumLocation
      Get the name of the source of this location.
      Specified by:
      getSourceName in interface DatumLocation
      Returns:
      the source name
    • getMetadata

      public net.solarnetwork.domain.datum.GeneralDatumMetadata getMetadata()
      Description copied from interface: DatumLocation
      Get metadata about the location.
      Specified by:
      getMetadata in interface DatumLocation
      Returns:
      metadata
    • getLocationTypeKey

      public String getLocationTypeKey()
      Description copied from interface: LocationLookupSettingSpecifier
      Get the location type or tag, e.g. "weather", "price", etc.
      Specified by:
      getLocationTypeKey in interface LocationLookupSettingSpecifier
      Returns:
      the location type