|
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.SessionImpl | +--com.beasys.commerce.foundation.property.EntityPropertyManagerImpl
This class is used to expedite access to EntityProperties and the mapping of their names. This stateful session bean will "cache" a set of Entity Properties
EntityPropertyManager
,
EntityPropertyManagerHome
, Serialized FormField Summary | |
protected static boolean |
enableCache
|
protected static java.lang.String |
ENTITY_ID_CACHE
|
protected static java.lang.String |
ENTITY_PROPERTY_CACHE
|
protected static java.lang.String |
PROPERTY_DEFAULT_CACHE
|
Fields inherited from class com.beasys.commerce.foundation.SessionImpl |
_ctx,
_environmentNamingContext,
_environmentPropertyCache,
_isDirty |
Constructor Summary | |
EntityPropertyManagerImpl()
|
Method Summary | |
void |
addPropertyValue(PropertyLocator locator,
java.lang.String scopeName,
java.lang.String key,
java.lang.Object value)
Implementation incomplete. |
void |
addPropertyValueMapped(PropertyLocator locator,
java.lang.String scopeName,
java.lang.String key,
java.lang.String mapKey,
java.lang.Object value)
Implementation incomplete. |
protected void |
cacheAsNull(PropertyLocator locator,
EntityPropertyCacheKey key)
Mark a property as having a null value in an entity's property cache. |
void |
ejbActivate()
N/A for stateless session bean. |
void |
ejbCreate()
Initializes the sequencers and the DataSource used for obtaining database connections. |
void |
ejbPassivate()
N/A for stateless session bean. |
void |
ejbRemove()
Does nothing (no resources need to be released). |
protected long |
getCachedEntityId(PropertyLocator loc)
Retrieve a cached entity id |
protected java.lang.Object |
getCachedPropertyDefault(PropertyDefaultCacheKey key)
Get a value from the default value cache |
protected java.lang.Object |
getCachedValue(PropertyLocator locator,
EntityPropertyCacheKey key)
Get a value from an entity's property cache |
java.lang.String[] |
getDynamicProperties(PropertyLocator locator,
java.lang.String scopeName)
Returns a list of dynamically assigned properties for the given entity, that have been named with the given scope name. |
java.util.Map |
getProperties(PropertyLocator locator)
Returns a map of PropertyMapKey to Objects for all properties set for the entity. |
java.util.Map |
getProperties(PropertyLocator locator,
java.lang.String scopeName)
Returns a map of PropertyMapKey to Objects for all properties set for the entity for the specified scope. |
java.lang.Object |
getProperty(PropertyLocator locator,
java.lang.String scopeName,
java.lang.String key)
Returns the value of the property defined for the specified key and scopeName. |
java.lang.Object |
getPropertyDefault(PropertyLocator locator,
java.lang.String scopeName,
java.lang.String key)
|
PropertyMetaData |
getPropertyMetaData(PropertyLocator locator,
java.lang.String scopeName,
java.lang.String key)
Returns the PropertyMetaData associated with the property specified the schema group name defined in the property locator, the scope name, and the key. |
java.util.Enumeration |
getPropertyMetaDatum(PropertyLocator locator)
|
java.util.Map |
getSchemaDefaults(java.lang.String schemaName,
java.lang.String schemaGroupName)
Returns a map of property name/default value pairs for the given property set. |
long |
getUniqueId(java.lang.String homeName,
java.lang.String pkString)
Returns the number that uniquely identifies the entity specified by the home name and the pk string. |
protected boolean |
isCachedAsNull(PropertyLocator locator,
EntityPropertyCacheKey key)
Determine if a property has been marked as having a null value in an entity's property cache. |
protected boolean |
isPropertyDefaultCached(PropertyDefaultCacheKey key)
Determines if a property default value has been cached. |
protected void |
putCachedPropertyDefault(PropertyDefaultCacheKey key,
java.lang.Object value)
Put a property value in the default value cache |
protected void |
putCachedValue(PropertyLocator locator,
EntityPropertyCacheKey key,
java.lang.Object value)
Put a property value in an entity's property cache |
protected void |
removeCachedEntityId(PropertyLocator loc)
|
protected void |
removeCachedValue(PropertyLocator locator,
EntityPropertyCacheKey key)
Remove a value from an entity's property cache |
protected void |
removeCachedValues(PropertyLocator locator)
Remove all values from an entity's property cache |
void |
removeProperties(PropertyLocator locator)
Removes all properties for all scopes associated with the entity specified by the property locator. |
java.lang.Object |
removeProperty(PropertyLocator locator,
java.lang.String scopeName,
java.lang.String key)
Removes the property for the entity identified by the locator for the specified scope and key. |
java.lang.Object |
removePropertyValue(PropertyLocator locator,
java.lang.String scopeName,
java.lang.String key,
java.lang.Object value)
|
java.lang.Object |
removePropertyValueMapped(PropertyLocator locator,
java.lang.String scopeName,
java.lang.String key,
java.lang.String mapKey)
|
protected void |
setCachedEntityId(PropertyLocator loc,
long entityId)
Cache an entity id |
void |
setProperties(PropertyLocator locator,
java.util.Map propertyValues)
|
void |
setProperty(PropertyLocator locator,
java.lang.String scopeName,
java.lang.String key,
java.lang.Object value)
Associates the property value to the entity identified by the locator for the specified scope and key. |
void |
setSessionContext(javax.ejb.SessionContext ctx)
Delegate the setting of the SessionContext to the parent class. |
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_CACHE
protected static java.lang.String ENTITY_ID_CACHE
protected static java.lang.String PROPERTY_DEFAULT_CACHE
protected static boolean enableCache
Constructor Detail |
public EntityPropertyManagerImpl() throws javax.ejb.CreateException
Method Detail |
public void ejbCreate() throws javax.ejb.CreateException
public void ejbActivate() throws javax.ejb.EJBException
public void ejbPassivate() throws javax.ejb.EJBException
public void ejbRemove() throws javax.ejb.EJBException
public void setSessionContext(javax.ejb.SessionContext ctx) throws javax.ejb.EJBException
public void addPropertyValue(PropertyLocator locator, java.lang.String scopeName, java.lang.String key, java.lang.Object value) throws java.rmi.RemoteException
public void addPropertyValueMapped(PropertyLocator locator, java.lang.String scopeName, java.lang.String key, java.lang.String mapKey, java.lang.Object value) throws java.rmi.RemoteException
public java.util.Map getProperties(PropertyLocator locator) throws java.rmi.RemoteException
locator
- specifies the JNDIHomeName and Pk string needed to retrieve the entityId.
Also specifies the schemaGroupName that is used to retrieved the type of the property.public java.util.Map getProperties(PropertyLocator locator, java.lang.String scopeName) throws java.rmi.RemoteException
locator
- specifies the JNDIHomeName and Pk string needed to retrieve the entityId.
Also specifies the schemaGroupName that is used to retrieved the type of the property.scopeName
- specifies the scopeName in which the properties are defined.public java.lang.Object getProperty(PropertyLocator locator, java.lang.String scopeName, java.lang.String key) throws java.rmi.RemoteException
public PropertyMetaData getPropertyMetaData(PropertyLocator locator, java.lang.String scopeName, java.lang.String key) throws java.rmi.RemoteException
public java.util.Enumeration getPropertyMetaDatum(PropertyLocator locator) throws java.rmi.RemoteException
public long getUniqueId(java.lang.String homeName, java.lang.String pkString) throws java.rmi.RemoteException
public void removeProperties(PropertyLocator locator) throws java.rmi.RemoteException
public java.lang.Object removeProperty(PropertyLocator locator, java.lang.String scopeName, java.lang.String key) throws java.rmi.RemoteException
public java.lang.Object removePropertyValue(PropertyLocator locator, java.lang.String scopeName, java.lang.String key, java.lang.Object value) throws java.rmi.RemoteException
public java.lang.Object removePropertyValueMapped(PropertyLocator locator, java.lang.String scopeName, java.lang.String key, java.lang.String mapKey) throws java.rmi.RemoteException
public void setProperty(PropertyLocator locator, java.lang.String scopeName, java.lang.String key, java.lang.Object value) throws java.rmi.RemoteException
public void setProperties(PropertyLocator locator, java.util.Map propertyValues) throws java.rmi.RemoteException
public java.lang.Object getPropertyDefault(PropertyLocator locator, java.lang.String scopeName, java.lang.String key) throws java.rmi.RemoteException
public java.util.Map getSchemaDefaults(java.lang.String schemaName, java.lang.String schemaGroupName) throws java.rmi.RemoteException
public java.lang.String[] getDynamicProperties(PropertyLocator locator, java.lang.String scopeName) throws java.rmi.RemoteException
protected java.lang.Object getCachedValue(PropertyLocator locator, EntityPropertyCacheKey key)
locator
- the key for the entitykey
- the key to lookup the property valueprotected void removeCachedValue(PropertyLocator locator, EntityPropertyCacheKey key)
locator
- the key for the entitykey
- the key of the property to removeprotected void putCachedValue(PropertyLocator locator, EntityPropertyCacheKey key, java.lang.Object value)
locator
- the key for the entitykey
- the property's keyvalue
- the value to cache for that propertyprotected void removeCachedValues(PropertyLocator locator)
locator
- the key for the entityprotected void putCachedPropertyDefault(PropertyDefaultCacheKey key, java.lang.Object value)
key
- the property's keyvalue
- the value to cache for that propertyprotected java.lang.Object getCachedPropertyDefault(PropertyDefaultCacheKey key)
key
- the property's keyprotected boolean isPropertyDefaultCached(PropertyDefaultCacheKey key)
protected void cacheAsNull(PropertyLocator locator, EntityPropertyCacheKey key)
locator
- the key for the entitykey
- the key of the propertyprotected boolean isCachedAsNull(PropertyLocator locator, EntityPropertyCacheKey key)
locator
- the key for the entitykey
- the key of the propertyprotected long getCachedEntityId(PropertyLocator loc)
locator
- the key of an entity (leave propertySet as null)protected void setCachedEntityId(PropertyLocator loc, long entityId)
locator
- the key of an entity (leave propertySet as null)entityId
- the id to cache for that entityprotected void removeCachedEntityId(PropertyLocator loc)
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |