Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.openjpa.util
Class ProxyMaps

    java.lang.Object
      org.apache.openjpa.util.Proxies
          org.apache.openjpa.util.ProxyMaps

Direct Known Subclasses:
  ProxyConcurrentMaps

    public class ProxyMaps

extends Proxies

Utility methods used by map proxies.

Author:
  Abe White

Nested Class Summary
`static interface` | `ProxyMaps.ProxyEntrySet` Marker interface for a proxy entry set.

Constructor Summary
`ProxyMaps()`

Method Summary
`static Set` | `afterEntrySet(ProxyMap map, Set entries)` Wrap the given entry set in a proxy.
`static Object` | `afterGet(ProxyMap map, Object key, Object ret, boolean before)` Call after invoking `Map.get(java.lang.Object)` on super.
`static Object` | `afterPut(ProxyMap map, Object key, Object value, Object ret, boolean before)` Call after invoking `Map.put(K, V)` on super.
`static Object` | `afterRemove(ProxyMap map, Object key, Object ret, boolean before)` Call after invoking `Map.remove(java.lang.Object)` on super.
`static Object` | `afterSetProperty(ProxyMap map, String key, String value, Object ret, boolean before)` Call after invoking `Properties#setProperty` on super.
`static void` | `beforeClear(ProxyMap map)` Call before invoking `Map.clear()` on super.
`static boolean` | `beforeGet(ProxyMap map, Object key)` Call before invoking `Map.get(java.lang.Object)` on super.
`static void` | `beforeLoad(ProxyMap map, InputStream in)` Call before invoking `Properties#load` on super.
`static void` | `beforeLoadFromXML(ProxyMap map, InputStream in)` Call before invoking `Properties#loadXML` on super.
`static boolean` | `beforePut(ProxyMap map, Object key, Object value)` Call before invoking `Map.put(K, V)` on super.
`static boolean` | `beforeRemove(ProxyMap map, Object key)` Call before invoking `Map.remove(java.lang.Object)` on super.
`static boolean` | `beforeSetProperty(ProxyMap map, String key, String value)` Call before invoking `Properties#setProperty` on super.
`static Set` | `keySet(ProxyMap map)` Override for `Map.keySet()`.
`static void` | `putAll(ProxyMap map, Map values)` Overload for `Map.putAll(java.util.Map)`.
`static Collection` | `values(ProxyMap map)` Override for `Map.values()`.

Methods inherited from class org.apache.openjpa.util.Proxies
`assertAllowedType, dirty, isOwner, removed, writeReplace`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ProxyMaps

    public ProxyMaps()

Method Detail

### beforeClear

    public static void beforeClear(ProxyMap map)

  Call before invoking `Map.clear()` on super.

### keySet

    public static Set keySet(ProxyMap map)

  Override for `Map.keySet()`.

### values

    public static Collection values(ProxyMap map)

  Override for `Map.values()`.

### afterEntrySet

    public static Set afterEntrySet(ProxyMap map,
                                    Set entries)

  Wrap the given entry set in a proxy.

### beforeGet

    public static boolean beforeGet(ProxyMap map,
                                    Object key)

  Call before invoking `Map.get(java.lang.Object)` on super.

### afterGet

    public static Object afterGet(ProxyMap map,
                                  Object key,
                                  Object ret,
                                  boolean before)

  Call after invoking `Map.get(java.lang.Object)` on super. The potential change is tracked when the get method is called. This change will not translated to an update statement if the retrieved value is not dirty.

  Parameters:
    `ret` - the return value from the super's method
    `before` - the return value from `beforeGet(org.apache.openjpa.util.ProxyMap, java.lang.Object)`
  Returns:
    the value to return from `Map.get(java.lang.Object)`

### beforePut

    public static boolean beforePut(ProxyMap map,
                                    Object key,
                                    Object value)

  Call before invoking `Map.put(K, V)` on super.

### afterPut

    public static Object afterPut(ProxyMap map,
                                  Object key,
                                  Object value,
                                  Object ret,
                                  boolean before)

  Call after invoking `Map.put(K, V)` on super.

  Parameters:
    `ret` - the return value from the super's method
    `before` - the return value from `beforePut(org.apache.openjpa.util.ProxyMap, java.lang.Object, java.lang.Object)`
  Returns:
    the value to return from `Map.put(K, V)`

### beforeSetProperty

    public static boolean beforeSetProperty(ProxyMap map,
                                            String key,
                                            String value)

  Call before invoking `Properties#setProperty` on super.

### afterSetProperty

    public static Object afterSetProperty(ProxyMap map,
                                          String key,
                                          String value,
                                          Object ret,
                                          boolean before)

  Call after invoking `Properties#setProperty` on super.

  Parameters:
    `ret` - the return value from the super's method
    `before` - the return value from `beforeSetProperty(org.apache.openjpa.util.ProxyMap, java.lang.String, java.lang.String)`
  Returns:
    the value to return from `Properties#setProperty`

### beforeLoad

    public static void beforeLoad(ProxyMap map,
                                  InputStream in)

  Call before invoking `Properties#load` on super.

### beforeLoadFromXML

    public static void beforeLoadFromXML(ProxyMap map,
                                         InputStream in)

  Call before invoking `Properties#loadXML` on super.

### putAll

    public static void putAll(ProxyMap map,
                              Map values)

  Overload for `Map.putAll(java.util.Map)`.

### beforeRemove

    public static boolean beforeRemove(ProxyMap map,
                                       Object key)

  Call before invoking `Map.remove(java.lang.Object)` on super.

### afterRemove

    public static Object afterRemove(ProxyMap map,
                                     Object key,
                                     Object ret,
                                     boolean before)

  Call after invoking `Map.remove(java.lang.Object)` on super.

  Parameters:
    `ret` - the return value from the super's method
    `before` - the return value from `beforeRemove(org.apache.openjpa.util.ProxyMap, java.lang.Object)`
  Returns:
    the value to return from `Map.remove(java.lang.Object)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.