|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openwms.core.domain.AbstractEntity
org.openwms.core.domain.system.AbstractPreference
org.openwms.core.domain.system.usermanagement.UserPreference
public class UserPreference
An UserPreference is used to store settings specific to an User
.
It is always assigned to a particular User
and not accessible
from, nor valid for, other User
s. UserPreferences cannot be
overruled by any other type of Preferences
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.openwms.core.domain.AbstractEntity |
---|
AbstractEntity.AbstractEntityListener |
Field Summary | |
---|---|
static String |
NQ_FIND_ALL
Query to find all UserPreference s. |
Fields inherited from class org.openwms.core.domain.AbstractEntity |
---|
FIND_ALL, FIND_BY_ID |
Constructor Summary | |
---|---|
UserPreference(String owner,
String key)
Create a new UserPreference. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Compare the uid property field. |
protected Object[] |
getFields()
Return all fields as an array of objects. |
String |
getKey()
Get the key. |
String |
getOwner()
Get the owner. |
PreferenceKey |
getPrefKey()
Return a PreferenceKey of this preference. |
PropertyScope |
getType()
Return the particular type of the preference. |
int |
hashCode()
Use the uid to calculate the hashCode. |
Methods inherited from class org.openwms.core.domain.system.AbstractPreference |
---|
getDescription, getFloatValue, getId, getMaximum, getMinimum, getPropertiesAsString, getValue, getVersion, isFromFile, isNew, setDescription, setFloatValue, setFromFile, setMaximum, setMinimum, setValue |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String NQ_FIND_ALL
UserPreference
s.
Constructor Detail |
---|
public UserPreference(String owner, String key)
owner
- The User's username is set as owner of this preferencekey
- The key of this preference
IllegalArgumentException
- when owner or key is null
or emptyMethod Detail |
---|
public String getOwner()
public String getKey()
public PropertyScope getType()
getType
in class AbstractPreference
AbstractPreference.getType()
protected Object[] getFields()
getFields
in class AbstractPreference
AbstractPreference.getFields()
public PreferenceKey getPrefKey()
PreferenceKey
of this preference.
getPrefKey
in class AbstractPreference
PreferenceKey
AbstractPreference.getPrefKey()
public int hashCode()
Use all fields to calculate the hashCode and don't use the hashCode of the super class.
Uses key, owner and type for hashCode calculation.
hashCode
in class AbstractPreference
Object.hashCode()
public boolean equals(Object obj)
Use all fields for comparison but don't call the super class.
Comparison done with key, owner and type fields. Not delegated to super class.
equals
in class AbstractPreference
Object.equals(java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |