Package org.apache.openjpa.util.proxy
Class ProxyMaps
- java.lang.Object
 - 
- org.apache.openjpa.util.Proxies
 - 
- org.apache.openjpa.util.proxy.ProxyMaps
 
 
 
- 
public class ProxyMaps extends Proxies
Utility methods used by map proxies.- Author:
 - Abe White
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceProxyMaps.ProxyEntrySetMarker interface for a proxy entry set. 
- 
Constructor Summary
Constructors Constructor Description ProxyMaps() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SetafterEntrySet(ProxyMap map, Set entries)Wrap the given entry set in a proxy.static ObjectafterGet(ProxyMap map, Object key, Object ret, boolean before)Call after invokingMap.get(java.lang.Object)on super.static ObjectafterPut(ProxyMap map, Object key, Object value, Object ret, boolean before)Call after invokingMap.put(K, V)on super.static ObjectafterRemove(ProxyMap map, Object key, Object ret, boolean before)Call after invokingMap.remove(java.lang.Object)on super.static booleanafterRemove(ProxyMap map, Object key, Object value, boolean ret, boolean before)See OPENJPA-2442.static ObjectafterSetProperty(ProxyMap map, String key, String value, Object ret, boolean before)Call after invokingProperties.setProperty(java.lang.String, java.lang.String)on super.static voidbeforeClear(ProxyMap map)Call before invokingMap.clear()on super.static booleanbeforeGet(ProxyMap map, Object key)Call before invokingMap.get(java.lang.Object)on super.static voidbeforeLoad(ProxyMap map, InputStream in)Call before invokingProperties.load(java.io.Reader)on super.static voidbeforeLoadFromXML(ProxyMap map, InputStream in)Call before invokingProperties#loadXMLon super.static booleanbeforePut(ProxyMap map, Object key, Object value)Call before invokingMap.put(K, V)on super.static booleanbeforeRemove(ProxyMap map, Object key)Call before invokingMap.remove(java.lang.Object)on super.static booleanbeforeRemove(ProxyMap map, Object key, Object value)See OPENJPA-2442.static booleanbeforeSetProperty(ProxyMap map, String key, String value)Call before invokingProperties.setProperty(java.lang.String, java.lang.String)on super.static SetkeySet(ProxyMap map)Override forMap.keySet().static voidputAll(ProxyMap map, Map values)Overload forMap.putAll(java.util.Map<? extends K, ? extends V>).static Collectionvalues(ProxyMap map)Override forMap.values().- 
Methods inherited from class org.apache.openjpa.util.Proxies
assertAllowedType, dirty, isOwner, removed, writeReplace 
 - 
 
 - 
 
- 
- 
Method Detail
- 
beforeClear
public static void beforeClear(ProxyMap map)
Call before invokingMap.clear()on super. 
- 
keySet
public static Set keySet(ProxyMap map)
Override forMap.keySet(). 
- 
values
public static Collection values(ProxyMap map)
Override forMap.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 invokingMap.get(java.lang.Object)on super. 
- 
afterGet
public static Object afterGet(ProxyMap map, Object key, Object ret, boolean before)
Call after invokingMap.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 methodbefore- the return value frombeforeGet(org.apache.openjpa.util.proxy.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 invokingMap.put(K, V)on super. 
- 
afterPut
public static Object afterPut(ProxyMap map, Object key, Object value, Object ret, boolean before)
Call after invokingMap.put(K, V)on super.- Parameters:
 ret- the return value from the super's methodbefore- the return value frombeforePut(org.apache.openjpa.util.proxy.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 invokingProperties.setProperty(java.lang.String, java.lang.String)on super. 
- 
afterSetProperty
public static Object afterSetProperty(ProxyMap map, String key, String value, Object ret, boolean before)
Call after invokingProperties.setProperty(java.lang.String, java.lang.String)on super.- Parameters:
 ret- the return value from the super's methodbefore- the return value frombeforeSetProperty(org.apache.openjpa.util.proxy.ProxyMap, java.lang.String, java.lang.String)- Returns:
 - the value to return from 
Properties.setProperty(java.lang.String, java.lang.String) 
 
- 
beforeLoad
public static void beforeLoad(ProxyMap map, InputStream in)
Call before invokingProperties.load(java.io.Reader)on super. 
- 
beforeLoadFromXML
public static void beforeLoadFromXML(ProxyMap map, InputStream in)
Call before invokingProperties#loadXMLon super. 
- 
putAll
public static void putAll(ProxyMap map, Map values)
Overload forMap.putAll(java.util.Map<? extends K, ? extends V>). 
- 
beforeRemove
public static boolean beforeRemove(ProxyMap map, Object key)
Call before invokingMap.remove(java.lang.Object)on super. 
- 
afterRemove
public static Object afterRemove(ProxyMap map, Object key, Object ret, boolean before)
Call after invokingMap.remove(java.lang.Object)on super.- Parameters:
 ret- the return value from the super's methodbefore- the return value frombeforeRemove(org.apache.openjpa.util.proxy.ProxyMap, java.lang.Object)- Returns:
 - the value to return from 
Map.remove(java.lang.Object) 
 
- 
beforeRemove
public static boolean beforeRemove(ProxyMap map, Object key, Object value)
See OPENJPA-2442. Call before invokingMap#remove(key, value)on super. 
- 
afterRemove
public static boolean afterRemove(ProxyMap map, Object key, Object value, boolean ret, boolean before)
See OPENJPA-2442. Call after invokingMap#remove(key, value)on super.- Parameters:
 ret- the return value from the super's methodbefore- the return value frombeforeRemove(org.apache.openjpa.util.proxy.ProxyMap, java.lang.Object)- Returns:
 - the value to return from 
Map.remove(java.lang.Object) 
 
 - 
 
 -