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.
Related Topics
PropertySet
EntityPropertyManager
AbstractConfigurableEntity, Event, HttpConfigurableEntity, CatalogItemImpl, CategoryImpl, MutableCategoryImpl, MutableCatalogItemImpl, MutableProductItemImpl, ProductItemImpl, NodeDocument, AbstractHierarchicalEntity
CatalogItem, Category, Content, Customer, Document, HierarchicalEntity, MutableCatalogItem, MutableCategory, MutableProductItem, ProductItem
Field Summary |
public static final |
|
Method Summary |
public |
|
public |
|
public |
|
public |
|
public |
|
public long |
|
public |
|
public void |
|
Field Detail |
public static final String RESERVED_PROPERTY_SET
Method Detail |
publicRetrieve the jndi name for an entity. A combination of pk string and jndi name is always unique between entities.StringgetJndiName()
throwsRemoteException
RemoteException
publicRetrieve the pk string for an entity. A combination of pk string and jndi name is always unique between entities.StringgetPkString()
throwsRemoteException
RemoteException
publicRetrieve the value that was persisted for this entity for the given property, within the given property set. If the entity does not have a value persisted for this property, the default value from the property set will be returned.ObjectgetProperty(StringpropertySet,StringpropertyName)
throwsRemoteException
RemoteException
publicConvenience method to return a property as a String.StringgetPropertyAsString(StringpropertySet,StringpropertyName)
throwsRemoteException
RemoteException
publicRetrieve 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. This method is used by the implementation of the getProperty methods so that the search in the successor hierarchy does not return a default value from the Schema.ObjectgetPropertyNoDefault(StringpropertySet,StringpropertyName)
throwsRemoteException
RemoteException
public long getUniqueId()Retrieve the unique identifier generated for this ConfigurableEntity. The unique identifier is used by the EntityPropertyManager to optimize the foreign keys in the persistent storage. This method may not be implemented in a lightweight implementation of ConfigurableEntity.
throwsRemoteException
RemoteException
publicRemove the property associated with the named key in the specified property set.ObjectremoveProperty(StringpropertySet,StringpropertyName)
throwsRemoteException
NOTE: if an explicit setter method is found for this property, this method will set the value to null.
RemoteException
public void setProperty(Associate the specified value with the named key in the specified property set.StringpropertySet,StringpropertyName,Objectvalue)
throwsPropertyValidationException,RemoteException
PropertyValidationException
RemoteException