Package org.apache.openjpa.util.proxy
Class ProxyMaps
java.lang.Object
org.apache.openjpa.util.Proxies
org.apache.openjpa.util.proxy.ProxyMaps
Utility methods used by map proxies.
- Author:
- Abe White
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceMarker interface for a proxy entry set. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SetafterEntrySet(ProxyMap map, Set entries) Wrap the given entry set in a proxy.static ObjectCall after invokingMap.get(java.lang.Object)on super.static ObjectCall 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 booleanCall 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 booleanCall 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 SetOverride forMap.keySet().static voidOverload forMap.putAll(java.util.Map<? extends K, ? extends V>).static CollectionOverride forMap.values().Methods inherited from class org.apache.openjpa.util.Proxies
assertAllowedType, dirty, isOwner, removed, writeReplace
-
Constructor Details
-
ProxyMaps
public ProxyMaps()
-
-
Method Details
-
beforeClear
Call before invokingMap.clear()on super. -
keySet
Override forMap.keySet(). -
values
Override forMap.values(). -
afterEntrySet
Wrap the given entry set in a proxy. -
beforeGet
Call before invokingMap.get(java.lang.Object)on super. -
afterGet
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
Call before invokingMap.put(K, V)on super. -
afterPut
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
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
Call before invokingProperties.load(java.io.Reader)on super. -
beforeLoadFromXML
Call before invokingProperties#loadXMLon super. -
putAll
Overload forMap.putAll(java.util.Map<? extends K, ? extends V>). -
beforeRemove
Call before invokingMap.remove(java.lang.Object)on super. -
afterRemove
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
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)
-