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
Modifier and TypeClassDescriptionstatic interface
Marker interface for a proxy entry set. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Set
afterEntrySet
(ProxyMap map, Set entries) Wrap the given entry set in a proxy.static Object
Call after invokingMap.get(java.lang.Object)
on super.static Object
Call after invokingMap.put(K, V)
on super.static Object
afterRemove
(ProxyMap map, Object key, Object ret, boolean before) Call after invokingMap.remove(java.lang.Object)
on super.static boolean
afterRemove
(ProxyMap map, Object key, Object value, boolean ret, boolean before) See OPENJPA-2442.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.static void
beforeClear
(ProxyMap map) Call before invokingMap.clear()
on super.static boolean
Call before invokingMap.get(java.lang.Object)
on super.static void
beforeLoad
(ProxyMap map, InputStream in) Call before invokingProperties.load(java.io.Reader)
on super.static void
beforeLoadFromXML
(ProxyMap map, InputStream in) Call before invokingProperties#loadXML
on super.static boolean
Call before invokingMap.put(K, V)
on super.static boolean
beforeRemove
(ProxyMap map, Object key) Call before invokingMap.remove(java.lang.Object)
on super.static boolean
beforeRemove
(ProxyMap map, Object key, Object value) See OPENJPA-2442.static boolean
beforeSetProperty
(ProxyMap map, String key, String value) Call before invokingProperties.setProperty(java.lang.String, java.lang.String)
on super.static Set
Override forMap.keySet()
.static void
Overload forMap.putAll(java.util.Map<? extends K, ? extends V>)
.static Collection
Override 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#loadXML
on 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)
-