jsdai.lang
Class SharedEntityKey
java.lang.Object
jsdai.lang.SharedEntityKey
- public class SharedEntityKey
- extends java.lang.Object
This class extends the usage of user defined entity instance data.
It allows to store and retrieve entity instance user data using
String
key. The methods of this class are thread safe.
This class is primarily intended for internal JSDAI use.
- See Also:
EEntity.getTemp(Object)
,
EEntity.setTemp(Object, Object)
Method Summary |
static java.lang.Object |
getKeyValue(EEntity instance,
java.lang.String keyName)
Returns the user data stored by the instance
and identified by a key. |
static void |
setKeyValue(EEntity instance,
java.lang.String keyName,
java.lang.Object value)
Stores the user data by the instance which is identified by a key. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SharedEntityKey
public SharedEntityKey()
getKeyValue
public static java.lang.Object getKeyValue(EEntity instance,
java.lang.String keyName)
throws SdaiException
- Returns the user data stored by the instance
and identified by a key.
- Parameters:
instance
- The entity instance for which user data has to be returnedkeyName
- The name of the key
- Returns:
- The user defined data
- Throws:
SdaiException
- if an error occurs in underlying JSDAI operations
setKeyValue
public static void setKeyValue(EEntity instance,
java.lang.String keyName,
java.lang.Object value)
throws SdaiException
- Stores the user data by the instance which is identified by a key.
- Parameters:
instance
- The entity instance for which user data has to be storedkeyName
- The name of the keyvalue
- The user defined data
- Throws:
SdaiException
- if an error occurs in underlying JSDAI operations