Class DatumSamplePropertyConfig<V>

java.lang.Object
net.solarnetwork.domain.datum.DatumSamplePropertyConfig<V>
Type Parameters:
V - the configuration type
Direct Known Subclasses:
NumberDatumSamplePropertyConfig

public class DatumSamplePropertyConfig<V> extends Object
Join some sort of configuration with a sample property key and type.
Since:
1.42
Version:
2.0
Author:
matt
  • Constructor Details

    • DatumSamplePropertyConfig

      public DatumSamplePropertyConfig()
      Default constructor.
    • DatumSamplePropertyConfig

      public DatumSamplePropertyConfig(String propertyKey, DatumSamplesType propertyType, V config)
      Construct with values.
      Parameters:
      propertyKey - the sample property key to use
      propertyType - the sample property type to use
      config - the configuration to use
  • Method Details

    • getPropertyKey

      public String getPropertyKey()
      Get the sample property key.

      This value represents a key in a DatumSamples.getSampleData(DatumSamplesType) map.

      Returns:
      the sample property key
    • setPropertyKey

      public void setPropertyKey(String propertyKey)
      Set the sample property key.

      This value represents a key in a DatumSamples.getSampleData(DatumSamplesType) map.

      Parameters:
      propertyKey - the sample property key
    • getPropertyType

      public DatumSamplesType getPropertyType()
      Get the sample property type.

      This value represents the type to use in a DatumSamples.getSampleData(DatumSamplesType) map.

      Returns:
      the sample property type
    • setPropertyType

      public void setPropertyType(DatumSamplesType propertyType)
      Set the sample property type.

      This value represents the type to use in a DatumSamples.getSampleData(DatumSamplesType) map.

      Parameters:
      propertyType - the property type
    • getPropertyTypeKey

      public String getPropertyTypeKey()
      Get the property type key.

      This returns the configured getPropertyType() DatumSamplesType.toKey() value as a string.

      Returns:
      the property type key
    • setPropertyTypeKey

      public void setPropertyTypeKey(String key)
      Set the property type via a key value.

      This uses the first character of key as a DatumSamplesType key value to call setPropertyType(DatumSamplesType).

      Parameters:
      key - the datum property type key to set
    • getConfig

      public V getConfig()
      Get the configuration object.
      Returns:
      the configuration to associate with the sample property key and type
    • setConfig

      public void setConfig(V config)
      Set the configuration object.
      Parameters:
      config - the configuration to associate with the sample property key and type
    • toString

      public String toString()
      Overrides:
      toString in class Object