# com.beasys.commerce.foundation
PropertyCache Interface

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

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

## Method Detail

### addCachedPropertyMapped(String, String, String, Object) Method

    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.

#### Exceptions

``ApplicationException``
``RemoteException``

### addCachedPropertyValue(String, String, Object) Method

    public void addCachedPropertyValue(String scope,
                                       String key,
                                       Object value)
         throws ApplicationException, RemoteException

Add the specified value to the cache for a multivalued property.

#### Exceptions

``ApplicationException``
``RemoteException``

### getCachedProperty(String, String) Method

    public Object getCachedProperty(String scope,
                                    String key)
         throws ApplicationException, RemoteException

Retrieve the value associated with the scope and key from the object cache

#### Returns

The property value.

#### Exceptions

``ApplicationException``
``RemoteException``

### removeCachedProperties(String) Method

    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.

#### Exceptions

``ApplicationException``
``RemoteException``

### removeCachedProperties() Method

    public void removeCachedProperties()
         throws ApplicationException, RemoteException

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

#### Exceptions

``ApplicationException``
``RemoteException``

### removeCachedProperty(String, String) Method

    public Object removeCachedProperty(String scope,
                                       String key)
         throws ApplicationException, RemoteException

Retrieve the value associated with the key from the object cache.

#### Returns

java.lang.Object The object that was removed.

#### Exceptions

``ApplicationException``
``RemoteException``

### removeCachedPropertyMapped(String, String, String) Method

    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.

#### Returns

value The object that was removed or a null if the map entry was empty.

#### Exceptions

``ApplicationException``
``RemoteException``

### removeCachedPropertyValue(String, String, Object) Method

    public void removeCachedPropertyValue(String scope,
                                          String key,
                                          Object value)
         throws ApplicationException, RemoteException

Add the specified value to the cache.

#### Exceptions

``ApplicationException``
``RemoteException``

### setCachedProperty(String, String, Object) Method

    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.

#### Exceptions

``ApplicationException``
``RemoteException``