Class AppSetting

java.lang.Object
net.solarnetwork.domain.BasicIdentity<KeyTypePK>
net.solarnetwork.central.domain.AppSetting
All Implemented Interfaces:
Serializable, Cloneable, Comparable<KeyTypePK>, net.solarnetwork.dao.Entity<KeyTypePK>, net.solarnetwork.domain.Identity<KeyTypePK>

public class AppSetting extends net.solarnetwork.domain.BasicIdentity<KeyTypePK> implements net.solarnetwork.dao.Entity<KeyTypePK>, Cloneable, Serializable
An application setting.
See Also:
  • Constructor Details

    • AppSetting

      public AppSetting(KeyTypePK id, Instant created, Instant modified, String value)
      Constructor.
      Parameters:
      id - the ID
      created - the creation date
      modified - the modification date
      value - the value
      Throws:
      IllegalArgumentException - if id is null
    • AppSetting

      public AppSetting(String key, String type, Instant created, Instant modified, String value)
      Constructor.
      Parameters:
      key - the key
      type - the type
      created - the creation date
      modified - the modification date
      value - the value
      Throws:
      IllegalArgumentException - any argument other than value is null
  • Method Details

    • appSetting

      public static AppSetting appSetting(String key, String type, String value)
      Create a new setting instance.
      Parameters:
      key - the key
      type - the type
      value - the value
      Returns:
      the new instance
      Throws:
      IllegalArgumentException - if key or type are null
    • withValue

      public AppSetting withValue(String value)
      Create a copy with a new value.
      Parameters:
      value - the new value to set
      Returns:
      the new copy
    • clone

      public AppSetting clone()
      Overrides:
      clone in class net.solarnetwork.domain.BasicIdentity<KeyTypePK>
    • toString

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

      public Instant getCreated()
      Specified by:
      getCreated in interface net.solarnetwork.dao.Entity<KeyTypePK>
    • getModified

      public Instant getModified()
      Get the modification date.
      Returns:
      the modification date, or null
    • getKey

      public String getKey()
      Get the key.
      Returns:
      the key
    • getType

      public String getType()
      Get the type.
      Returns:
      the type
    • getValue

      public String getValue()
      Get the value.
      Returns:
      the value, or null