|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConfigurableEntity
The ConfigurableEntity provides the interface to an Entity that can be configured at runtime by associating properties via name-value pairs. The values are permanently associated with the entity by use of the EntityPropertyManager.
The name to associate the value with is made of an optional property set name and a key. Property sets define namespaces for keys. Duplicate keys are allowed in different property sets, and not specifying a property set means the "default" property set.
Entities that derive from ConfigurableEntity will require that the EntityPropertyManager and PropertySetType environment variables be set in their EJB deployment descriptors.
The EntityPropertyManager is a stateless session bean that is used to persist the runtime properties. That bean in turn can be configured to persist its properties in a separate set of tables.
PropertySet
,
EntityPropertyManager
Field Summary | |
---|---|
static String |
RESERVED_PROPERTY_SET
keyword for external property set |
Method Summary | |
---|---|
String |
getJndiName()
Retrieve the jndi name for an entity. |
String |
getPkString()
Retrieve the pk string for an entity. |
Object |
getProperty(String propertySet,
String propertyName)
Retrieve the value that was persisted for this entity for the given property, within the given property set. |
String |
getPropertyAsString(String propertySet,
String propertyName)
Convenience method to return a property as a String. |
Object |
getPropertyNoDefault(String propertySet,
String propertyName)
Retrieve the value associated with the named key in the specified property set, but does not return a default value from the property's PropertyDefinition if a value was not persisted for this entity. |
long |
getUniqueId()
Retrieve the unique identifier generated for this ConfigurableEntity. |
Object |
removeProperty(String propertySet,
String propertyName)
Remove the property associated with the named key in the specified property set. |
void |
setProperty(String propertySet,
String propertyName,
Object value)
Associate the specified value with the named key in the specified property set. |
Field Detail |
---|
static final String RESERVED_PROPERTY_SET
Method Detail |
---|
Object getProperty(String propertySet, String propertyName) throws RemoteException
propertySet
- The name of the property set to look inpropertyName
- The name of the property to retrieve.
RemoteException
String getPropertyAsString(String propertySet, String propertyName) throws RemoteException
propertySet
- The name of the property set to look inpropertyName
- The name of the property to retrieve.
RemoteException
Object getPropertyNoDefault(String propertySet, String propertyName) throws RemoteException
propertySet
- The name of the property setpropertyName
- The name of the property to retrieve.
RemoteException
void setProperty(String propertySet, String propertyName, Object value) throws PropertyValidationException, RemoteException
propertySet
- The name of the property set.propertyName
- The name of the property to assignvalue
- The value to associate with the property name
PropertyValidationException
- If the property value does not match the PropertyDefinition for this property set
RemoteException
Object removeProperty(String propertySet, String propertyName) throws RemoteException
NOTE: if an explicit setter method is found for this property, this method will set the value to null.
propertySet
- The name of the property set.propertyName
- The name of the property to remove.
RemoteException
long getUniqueId() throws RemoteException
RemoteException
String getPkString() throws RemoteException
RemoteException
String getJndiName() throws RemoteException
RemoteException
|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |