BEA Systems, Inc.

com.beasys.commerce.foundation
Interface PropertyCache

All Known Implementing Classes:
ConfigurableEntityImpl

public interface PropertyCache

This class defines the interfaces that are needed to maintain a local cache of entity properties. SmartBMP classes can uses this interface to add runtime properties from sources other than the the EntityPropertyManager


Method Summary
 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 in the case where the value is a map.
 void addCachedPropertyValue(java.lang.String scope, java.lang.String key, java.lang.Object value)
          Add the specified value to the cache for a multivalued property.
 java.lang.Object getCachedProperty(java.lang.String scope, java.lang.String key)
          Retrieve the value associated with the scope and key from the object cache
 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.
 void setCachedProperty(java.lang.String scope, java.lang.String key, java.lang.Object value)
          Add the specified value to the cache.
 

Method Detail

setCachedProperty

public void setCachedProperty(java.lang.String scope,
                              java.lang.String key,
                              java.lang.Object value)
                       throws ApplicationException,
                              java.rmi.RemoteException
Add the specified value to the cache. This does not have the side effect of persisting the value in the EntityPropertyManager so that persistence mechanism can also populate this map.
Parameters:
scope -  
key -  
value - java.lang.Object the value to be set.

getCachedProperty

public java.lang.Object getCachedProperty(java.lang.String scope,
                                          java.lang.String key)
                                   throws ApplicationException,
                                          java.rmi.RemoteException
Retrieve the value associated with the scope and key from the object cache
Parameters:
scope -  
key -  
Returns:
The property value.

removeCachedProperty

public java.lang.Object removeCachedProperty(java.lang.String scope,
                                             java.lang.String key)
                                      throws ApplicationException,
                                             java.rmi.RemoteException
Retrieve the value associated with the key from the object cache.
Parameters:
scope -  
key -  
Returns:
java.lang.Object The object that was removed.

addCachedPropertyValue

public void addCachedPropertyValue(java.lang.String scope,
                                   java.lang.String key,
                                   java.lang.Object value)
                            throws ApplicationException,
                                   java.rmi.RemoteException
Add the specified value to the cache for a multivalued property.
Parameters:
scope -  
key -  
value - java.lang.Object the value to be set.

removeCachedPropertyValue

public void removeCachedPropertyValue(java.lang.String scope,
                                      java.lang.String key,
                                      java.lang.Object value)
                               throws ApplicationException,
                                      java.rmi.RemoteException
Add the specified value to the cache.
Parameters:
scope -  
key -  
value - java.lang.Object the value to be set.

addCachedPropertyMapped

public void addCachedPropertyMapped(java.lang.String scope,
                                    java.lang.String key,
                                    java.lang.String mapKey,
                                    java.lang.Object value)
                             throws ApplicationException,
                                    java.rmi.RemoteException
Add the specified value to the cache in the case where the value is a map.
Parameters:
scope -  
key -  
mapKey - The key into which the property will be mapped
value - The value to be set.

removeCachedPropertyMapped

public java.lang.Object removeCachedPropertyMapped(java.lang.String scope,
                                                   java.lang.String key,
                                                   java.lang.String mapKey)
                                            throws ApplicationException,
                                                   java.rmi.RemoteException
Remove the value at the specified key from a named property that represents a map.
Parameters:
scope -  
key -  
mapKey - The key into which the property will be mapped
Returns:
value The object that was removed or a null if the map entry was empty.

removeCachedProperties

public void removeCachedProperties(java.lang.String scope)
                            throws ApplicationException,
                                   java.rmi.RemoteException
Clear all entries in the cache for the specified scope. This is useful when all properties for a scope are to be reloaded.
Parameters:
scope - the scope for which properties are to be removed.

removeCachedProperties

public void removeCachedProperties()
                            throws ApplicationException,
                                   java.rmi.RemoteException
Clear all the entries in the cache. This is useful when all properties are to be reloaded.
Parameters:
scope - the scope for which properties are to be removed.

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved