Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2004 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

### addCachedPropertyMapped

    public 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`

### addCachedPropertyValue

    public 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`

### getCachedProperty

    public 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`

### removeCachedProperties

    public void removeCachedProperties()
                                throws ApplicationException,
                                       RemoteException

  Clear all the entries in the cache. This is useful when all properties are to be reloaded.

  Throws:
    `ApplicationException`
    `RemoteException`

### removeCachedProperties

    public 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`

### removeCachedProperty

    public 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`

### removeCachedPropertyMapped

    public 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`

### removeCachedPropertyValue

    public 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`

### setCachedProperty

    public 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`

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2004 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 BEA Systems, Inc. All Rights Reserved