jsdai.lang
Class SharedEntityKey

java.lang.Object
  extended byjsdai.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)

Constructor Summary
SharedEntityKey()
           
 
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
 

Constructor Detail

SharedEntityKey

public SharedEntityKey()
Method Detail

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 returned
keyName - 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 stored
keyName - The name of the key
value - The user defined data
Throws:
SdaiException - if an error occurs in underlying JSDAI operations

Copyright © LKSoftWare GmbH, 1999-2008