com.beasys.commerce.foundation
Interface PropertyCache


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(String scope, String key, String mapKey, Object value)
          Add the specified value to the cache in the case where the value is a map.
 void addCachedPropertyValue(String scope, String key, Object value)
          Add the specified value to the cache for a multivalued property.
 Object getCachedProperty(String scope, 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(String scope)
          Clear all entries in the cache for the specified scope.
 Object removeCachedProperty(String scope, String key)
          Retrieve the value associated with the key from the object cache.
 Object removeCachedPropertyMapped(String scope, String key, String mapKey)
          Remove the value at the specified key from a named property that represents a map.
 void removeCachedPropertyValue(String scope, String key, Object value)
          Add the specified value to the cache.
 void setCachedProperty(String scope, String key, Object value)
          Add the specified value to the cache.
 

Method Detail

setCachedProperty

void setCachedProperty(String scope,
                       String key,
                       Object value)
                       throws ApplicationException,
                              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.
Throws
ApplicationException
RemoteException

getCachedProperty

Object getCachedProperty(String scope,
                         String key)
                         throws ApplicationException,
                                RemoteException
Retrieve the value associated with the scope and key from the object cache

Parameters
scope -
key -
Returns
The property value.
Throws
ApplicationException
RemoteException

removeCachedProperty

Object removeCachedProperty(String scope,
                            String key)
                            throws ApplicationException,
                                   RemoteException
Retrieve the value associated with the key from the object cache.

Parameters
scope -
key -
Returns
java.lang.Object The object that was removed.
Throws
ApplicationException
RemoteException

addCachedPropertyValue

void addCachedPropertyValue(String scope,
                            String key,
                            Object value)
                            throws ApplicationException,
                                   RemoteException
Add the specified value to the cache for a multivalued property.

Parameters
scope -
key -
value - java.lang.Object the value to be set.
Throws
ApplicationException
RemoteException

removeCachedPropertyValue

void removeCachedPropertyValue(String scope,
                               String key,
                               Object value)
                               throws ApplicationException,
                                      RemoteException
Add the specified value to the cache.

Parameters
scope -
key -
value - java.lang.Object the value to be set.
Throws
ApplicationException
RemoteException

addCachedPropertyMapped

void addCachedPropertyMapped(String scope,
                             String key,
                             String mapKey,
                             Object value)
                             throws ApplicationException,
                                    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.
Throws
ApplicationException
RemoteException

removeCachedPropertyMapped

Object removeCachedPropertyMapped(String scope,
                                  String key,
                                  String mapKey)
                                  throws ApplicationException,
                                         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.
Throws
ApplicationException
RemoteException

removeCachedProperties

void removeCachedProperties(String scope)
                            throws ApplicationException,
                                   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.
Throws
ApplicationException
RemoteException

removeCachedProperties

void removeCachedProperties()
                            throws ApplicationException,
                                   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.
Throws
ApplicationException
RemoteException


Copyright © 2006 BEA Systems, Inc. All Rights Reserved