Class ModulePreference
java.lang.Object
org.openwms.core.preferences.impl.file.AbstractPreference
org.openwms.core.preferences.impl.file.GenericPreference
org.openwms.core.preferences.impl.file.ModulePreference
- All Implemented Interfaces:
Serializable
A ModulePreference is used to store configuration settings in Module scope.
The table model of an ModulePreference spans an unique key over the columns C_TYPE, C_OWNER and C_KEY.
It's counterpart in the context of JAXB is the modulePreference element.
- Author:
- Heiko Scherrer
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate String
Key of theModulePreference
(not nullable).private String
Owner of theModulePreference
(not nullable).Fields inherited from class org.openwms.core.preferences.impl.file.GenericPreference
description, maximum, minimum, type, value
-
Constructor Summary
ConstructorDescriptionCreate a newModulePreference
.ModulePreference
(String owner, String key) Create a newModulePreference
. -
Method Summary
Methods inherited from class org.openwms.core.preferences.impl.file.GenericPreference
getDescription, getMaximum, getMinimum, getType, getValue, setDescription, setMaximum, setMinimum, setType, setValue
-
Field Details
-
owner
Owner of theModulePreference
(not nullable). -
key
Key of theModulePreference
(not nullable).
-
-
Constructor Details
-
ModulePreference
public ModulePreference()Create a newModulePreference
. Only defined by the JAXB implementation. -
ModulePreference
Create a newModulePreference
.- Parameters:
owner
- The name of the owning modulekey
- the key- Throws:
IllegalArgumentException
- when key or owner is null or empty
-
-
Method Details
-
getKey
Get the key.- Returns:
- the key
-
setKey
-
getOwner
Get the owner.- Returns:
- the owner
-
setOwner
-
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, owner and the key to create a
PreferenceKey
instance.- Specified by:
getPrefKey
in classAbstractPreference
- Returns:
- A
PreferenceKey
-
hashCode
public int hashCode()Uses the type, owner and the key for the hashCode calculation.
- Overrides:
hashCode
in classGenericPreference
-
equals
Comparison done with the type, owner and the key fields. Not delegated to super class.
- Overrides:
equals
in classGenericPreference
-
toString
Use all fields.
- Overrides:
toString
in classGenericPreference
-