|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.beasys.commerce.foundation.EntityImpl | +--com.beasys.commerce.foundation.ConfigurableEntityImpl
This is the implementation of the Configurable Entity that combines the pluggable method features of Business Policy, Runtime Configuration, and Persistence. For each remote interface that is derived from the ConfigurableEntity, there must be an equivalent ConfigurableEntityImpl that mirrors its methods.
ConfigurableEntity
, Serialized FormField Summary | |
protected static java.lang.String |
DEFAULT_ENTITY_PROPERTY_MANAGER_HOME
|
protected static java.lang.String |
DEFAULT_SCHEMA_GROUP_NAME
|
protected static java.lang.String |
ENTITY_PROPERTY_MANAGER_HOME
The Entity Property Manager is used to persist the properties. |
protected java.util.HashMap |
propertyMap
This is the map that contains the cache of runtime properties associated with this entity. |
protected static java.lang.String |
SCHEMA_GROUP_NAME
The Shema Group provides an additional mechanism by which the deployer can subdivide the namespace of properties. |
Fields inherited from class com.beasys.commerce.foundation.EntityImpl |
__classIdentifier,
__containingEntity,
__mapKey,
__sequenceNumber,
_ctx,
_environmentNamingContext,
_environmentPropertyCache,
_isDirty,
_smartBMP |
Constructor Summary | |
ConfigurableEntityImpl()
Default constructor. |
Method Summary | |
void |
addBusinessPolicy(java.lang.String policyKey,
BusinessPolicy policy)
Set the named policy on the object. |
void |
addCachedPropertyMapped(java.lang.String scope,
java.lang.String key,
java.lang.String mapKey,
java.lang.Object value)
Add the specified value to the cache. |
void |
addCachedPropertyValue(java.lang.String scope,
java.lang.String key,
java.lang.Object value)
Add the specified value to the cache. |
void |
addPropertyValue(java.lang.String scopeName,
java.lang.String key,
java.lang.Object propertyValue)
Add a Property to a collection associated with the property. |
void |
addPropertyValueMapped(java.lang.String scopeName,
java.lang.String propertyKey,
java.lang.String mappedKey,
java.lang.Object propertyValue)
|
java.lang.String |
buildPolicyKey(java.lang.String policyKey)
Build policy key is a helper function that builds a property name for the business policy that will not collide with user specified keys. |
static PropertyMapKey |
createMapKey(java.lang.String scopeName,
java.lang.String key)
Helper function that will allocate a PropertyMapKey from a scope name and property name. |
void |
ejbActivate()
ejbActivate method. |
SmartKey |
ejbCreate(SmartKey key)
ejbCreate method. |
void |
ejbLoad()
ejbLoad method. |
void |
ejbPassivate()
ejbPassivate method. |
void |
ejbPostCreate(SmartKey key)
ejbPostCreate method. |
void |
ejbRemove()
ejbRemove method. |
void |
ejbStore()
ejbStore method. |
BusinessPolicy |
getBusinessPolicy(java.lang.String policyKey)
Get the named policy from the object. |
java.lang.Object |
getCachedProperty(java.lang.String scope,
java.lang.String key)
Retrieve the value associated with the key from the object cache |
protected java.lang.Object |
getImplicitProperty(java.lang.String scope,
java.lang.String key,
ConfigurableEntity explicitSuccessor,
boolean useDefault)
Search for the runtime property. |
PersistableHandle |
getPersistableHandle()
This method is used to create a long lived handle to an EJB object that can be persisted into a database. |
protected java.lang.Object |
getProperty(java.lang.String key)
This is the simplest way to retrieve a property. |
java.lang.Object |
getProperty(java.lang.String key,
java.lang.Object defaultValue)
Retrieve the value associated with the key. |
java.lang.Object |
getProperty(java.lang.String scopeName,
java.lang.String key,
ConfigurableEntity successor,
java.lang.Object defaultValue)
Retrieve the value associated with the key. |
java.lang.String |
getPropertyAsString(java.lang.String key,
java.lang.String defaultValue)
Retrieve the String value associated with the key and return the result rendered as a string. |
java.lang.String |
getPropertyAsString(java.lang.String scopeName,
java.lang.String key,
ConfigurableEntity successor,
java.lang.String defaultValue)
Equivalent to getProperty except that the return value is turned into a string. |
java.lang.Object |
getPropertyDefault(java.lang.String scope,
java.lang.String key,
ConfigurableEntity explicitSuccessor)
Retrieve the default value from the Schema for the named key and the specified scope. |
java.util.Map |
getPropertyMap()
Allocate the property map and load it using the EntityPropertyManager. |
java.lang.Object |
getPropertyNoDefault(java.lang.String scopeName,
java.lang.String key,
ConfigurableEntity successor)
Retrieve the value associated with the named key in the specified scope but does not return a default value if the property does not exist for the entity of in the hierarchy of successors. |
ConfigurableEntity |
getSuccessor(java.lang.String scopeName)
Retrieve the successor associated with this ConfigurableEntity for the specified scope. |
long |
getUniqueId()
Retrieve the unique identifier generated for this ConfigurableEntity. |
BusinessPolicy |
removeBusinessPolicy(java.lang.String policyKey)
Remove the named policy from the object. |
void |
removeCachedProperties()
Clear all the entries in the cache. |
void |
removeCachedProperties(java.lang.String scope)
Clear all entries in the cache for the specified scope. |
java.lang.Object |
removeCachedProperty(java.lang.String scope,
java.lang.String key)
Retrieve the value associated with the key from the object cache |
java.lang.Object |
removeCachedPropertyMapped(java.lang.String scope,
java.lang.String key,
java.lang.String mapKey)
Remove the value at the specified key from a named property that represents a map. |
void |
removeCachedPropertyValue(java.lang.String scope,
java.lang.String key,
java.lang.Object value)
Add the specified value to the cache. |
java.lang.Object |
removeProperty(java.lang.String key)
Remove the property from this ConfigurableEntity for the default scope and the specified key. |
java.lang.Object |
removeProperty(java.lang.String scopeName,
java.lang.String key)
Remove the property from this ConfigurableEntity for the specified scope name and key. |
java.lang.Object |
removePropertyValue(java.lang.String scopeName,
java.lang.String key,
java.lang.Object propertyValue)
Remove the property value object from the Collection associated with the named key in the specified scope. |
java.lang.Object |
removePropertyValueMapped(java.lang.String scopeName,
java.lang.String propertyKey,
java.lang.String mappedKey)
Remove the property value object from the Map associated with the named key in the specified scope. |
ConfigurableEntity |
removeSuccessor(java.lang.String scopeName)
Remove the successor for the specified scope. |
void |
setCachedProperty(java.lang.String scope,
java.lang.String key,
java.lang.Object value)
Add the specified value to the cache. |
void |
setProperty(java.lang.String key,
java.lang.Object property)
This is the the simplest way to set a property. |
void |
setProperty(java.lang.String scopeName,
java.lang.String key,
java.lang.Object property)
Add a property to this Entity and associated it with the specified scope and key. |
void |
setSuccessor(java.lang.String scopeName,
ConfigurableEntity successor)
This sets the successor for this object. |
static java.lang.String |
upcaseFirst(java.lang.String s)
|
protected boolean |
useEntityPropertyManager()
Determine if this try to use the EntityPropertyManager. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected static java.lang.String ENTITY_PROPERTY_MANAGER_HOME
protected static java.lang.String DEFAULT_ENTITY_PROPERTY_MANAGER_HOME
protected static java.lang.String SCHEMA_GROUP_NAME
protected static java.lang.String DEFAULT_SCHEMA_GROUP_NAME
protected transient java.util.HashMap propertyMap
Constructor Detail |
public ConfigurableEntityImpl()
Method Detail |
public void addBusinessPolicy(java.lang.String policyKey, BusinessPolicy policy) throws SystemException
public void addCachedPropertyMapped(java.lang.String scope, java.lang.String key, java.lang.String mapKey, java.lang.Object value)
scope
- java.lang.Stringkey
- java.lang.StringmapKey
- java.lang.String the key into which the property will be mappedvalue
- java.lang.Object the value to be set.public void addCachedPropertyValue(java.lang.String scope, java.lang.String key, java.lang.Object value)
scope
- java.lang.Stringkey
- java.lang.Stringvalue
- java.lang.Object the value to be set.public void addPropertyValue(java.lang.String scopeName, java.lang.String key, java.lang.Object propertyValue) throws SystemException
public void addPropertyValueMapped(java.lang.String scopeName, java.lang.String propertyKey, java.lang.String mappedKey, java.lang.Object propertyValue) throws SystemException
public java.lang.String buildPolicyKey(java.lang.String policyKey)
public static PropertyMapKey createMapKey(java.lang.String scopeName, java.lang.String key)
scope
- java.lang.Stringkey
- java.lang.Stringpublic void ejbActivate() throws javax.ejb.EJBException
public SmartKey ejbCreate(SmartKey key) throws javax.ejb.CreateException
public void ejbLoad() throws javax.ejb.EJBException
public void ejbPassivate() throws javax.ejb.EJBException
public void ejbPostCreate(SmartKey key) throws javax.ejb.CreateException
public void ejbRemove() throws javax.ejb.RemoveException
public void ejbStore() throws javax.ejb.EJBException
public java.lang.Object getCachedProperty(java.lang.String scope, java.lang.String key) throws SystemException
scope
- java.lang.Stringkey
- java.lang.Stringpublic BusinessPolicy getBusinessPolicy(java.lang.String policyKey) throws SystemException
protected java.lang.Object getImplicitProperty(java.lang.String scope, java.lang.String key, ConfigurableEntity explicitSuccessor, boolean useDefault) throws SystemException
public PersistableHandle getPersistableHandle()
protected java.lang.Object getProperty(java.lang.String key) throws SystemException
key
- The name under which the property is bound.public java.lang.Object getProperty(java.lang.String key, java.lang.Object defaultValue) throws SystemException
key
- java.lang.StringdefaultValue
- java.lang.ObjectgetProperty
public java.lang.Object getProperty(java.lang.String scopeName, java.lang.String key, ConfigurableEntity successor, java.lang.Object defaultValue) throws SystemException
key
- java.lang.Stringpublic java.lang.String getPropertyAsString(java.lang.String key, java.lang.String defaultValue) throws SystemException
key
- java.lang.Stringpublic java.lang.String getPropertyAsString(java.lang.String scopeName, java.lang.String key, ConfigurableEntity successor, java.lang.String defaultValue) throws SystemException
key
- java.lang.Stringpublic java.lang.Object getPropertyDefault(java.lang.String scope, java.lang.String key, ConfigurableEntity explicitSuccessor) throws SystemException
public java.util.Map getPropertyMap() throws SystemException
public java.lang.Object getPropertyNoDefault(java.lang.String scopeName, java.lang.String key, ConfigurableEntity successor) throws SystemException
public ConfigurableEntity getSuccessor(java.lang.String scopeName) throws SystemException
public long getUniqueId() throws SystemException
public BusinessPolicy removeBusinessPolicy(java.lang.String policyKey) throws SystemException
public void removeCachedProperties()
scope
- the scope for which properties are to be removed.public void removeCachedProperties(java.lang.String scope)
scope
- the scope for which properties are to be removed.public java.lang.Object removeCachedProperty(java.lang.String scope, java.lang.String key)
scope
- java.lang.Stringkey
- java.lang.Stringpublic void removeCachedPropertyValue(java.lang.String scope, java.lang.String key, java.lang.Object value)
scope
- java.lang.Stringkey
- java.lang.Stringvalue
- java.lang.Object the value to be set.public java.lang.Object removeCachedPropertyMapped(java.lang.String scope, java.lang.String key, java.lang.String mapKey)
scope
- java.lang.Stringkey
- java.lang.StringmapKey
- java.lang.String the key into which the property will be mappedpublic java.lang.Object removeProperty(java.lang.String key) throws SystemException
public java.lang.Object removeProperty(java.lang.String scopeName, java.lang.String key) throws SystemException
public java.lang.Object removePropertyValue(java.lang.String scopeName, java.lang.String key, java.lang.Object propertyValue) throws SystemException
public java.lang.Object removePropertyValueMapped(java.lang.String scopeName, java.lang.String propertyKey, java.lang.String mappedKey) throws SystemException
public ConfigurableEntity removeSuccessor(java.lang.String scopeName)
public void setProperty(java.lang.String key, java.lang.Object property) throws SystemException
key
- The string to which the property will be boundproperty
- The value that will be bound to that namepublic void setProperty(java.lang.String scopeName, java.lang.String key, java.lang.Object property) throws SystemException
scopeName
- The scopeName and key uniquely identify the propertyNamekey
- property
- The value to associate with the property.public void setSuccessor(java.lang.String scopeName, ConfigurableEntity successor) throws SystemException
successor
- public void setCachedProperty(java.lang.String scope, java.lang.String key, java.lang.Object value) throws SystemException
scope
- java.lang.Stringkey
- java.lang.Stringvalue
- java.lang.Object the value to be set.public static java.lang.String upcaseFirst(java.lang.String s)
protected boolean useEntityPropertyManager()
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |