Class ApplicationPreference
java.lang.Object
org.openwms.core.preferences.impl.file.AbstractPreference
org.openwms.core.preferences.impl.file.GenericPreference
org.openwms.core.preferences.impl.file.ApplicationPreference
- All Implemented Interfaces:
Serializable
An ApplicationPreference is used to store a configuration setting in application scope.
The table model of an ApplicationPreference spans an unique key over the columns C_TYPE and C_KEY.
It's counterpart in the context of JAXB is the applicationPreference element.
- Author:
- Heiko Scherrer
- See Also:
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.openwms.core.preferences.impl.file.GenericPreference
description, maximum, minimum, type, value
-
Constructor Summary
ModifierConstructorDescriptionCreate a newApplicationPreference
.Create a newApplicationPreference
.private
-
Method Summary
Modifier and TypeMethodDescriptionboolean
protected Object[]
Return all fields as an array of objects.getKey()
Get the key.Return aPreferenceKey
of this preference.int
hashCode()
void
toString()
Methods inherited from class org.openwms.core.preferences.impl.file.GenericPreference
getDescription, getMaximum, getMinimum, getType, getValue, setDescription, setMaximum, setMinimum, setType, setValue
-
Field Details
-
key
Key of the preference (not nullable).
-
-
Constructor Details
-
ApplicationPreference
public ApplicationPreference()Create a newApplicationPreference
. Only defined by the JAXB implementation. -
ApplicationPreference
Create a newApplicationPreference
.- Parameters:
key
- the key- Throws:
IllegalArgumentException
- when key is null or empty
-
ApplicationPreference
-
-
Method Details
-
getKey
Get the key.- Returns:
- the key
-
setKey
-
getFields
Return all fields as an array of objects.- Specified by:
getFields
in classAbstractPreference
- Returns:
- fields as array
-
getPrefKey
Return aPreferenceKey
of this preference.Uses the type and key to create a
PreferenceKey
instance.- Specified by:
getPrefKey
in classAbstractPreference
- Returns:
- A
PreferenceKey
- See Also:
-
equals
- Overrides:
equals
in classGenericPreference
-
hashCode
public int hashCode()- Overrides:
hashCode
in classGenericPreference
-
toString
- Overrides:
toString
in classGenericPreference
-