Package net.solarnetwork.central.domain
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AppSettingappSetting(String key, String type, String value) Create a new setting instance.clone()getKey()Get the key.Get the modification date.getType()Get the type.getValue()Get the value.toString()Create a copy with a new value.Methods inherited from class net.solarnetwork.domain.BasicIdentity
compareTo, equals, getId, hashCodeMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface net.solarnetwork.domain.Identity
getId, hasId
-
Constructor Details
-
AppSetting
Constructor.- Parameters:
id- the IDcreated- the creation datemodified- the modification datevalue- the value- Throws:
IllegalArgumentException- ifidis null
-
AppSetting
Constructor.- Parameters:
key- the keytype- the typecreated- the creation datemodified- the modification datevalue- the value- Throws:
IllegalArgumentException- any argument other thanvalueis null
-
-
Method Details
-
appSetting
Create a new setting instance.- Parameters:
key- the keytype- the typevalue- the value- Returns:
- the new instance
- Throws:
IllegalArgumentException- ifkeyortypeare null
-
withValue
Create a copy with a new value.- Parameters:
value- the new value to set- Returns:
- the new copy
-
clone
- Overrides:
clonein classnet.solarnetwork.domain.BasicIdentity<KeyTypePK>
-
toString
-
getCreated
- Specified by:
getCreatedin interfacenet.solarnetwork.dao.Entity<KeyTypePK>
-
getModified
Get the modification date.- Returns:
- the modification date, or null
-
getKey
Get the key.- Returns:
- the key
-
getType
Get the type.- Returns:
- the type
-
getValue
Get the value.- Returns:
- the value, or null
-