Package org.apache.openjpa.util.proxy
Class ProxyCollections
java.lang.Object
org.apache.openjpa.util.Proxies
org.apache.openjpa.util.proxy.ProxyCollections
Utility methods used by collection proxies.
- Author:
- Abe White
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Marker interface for a proxied iterator.static interface
Marker interface for a proxied list iterator. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
addAll
(ProxyCollection coll, int index, Collection values) Override forList.addAll(int, Collection)
.static boolean
addAll
(ProxyCollection coll, Collection values) Override forCollection.addAll(java.util.Collection<? extends E>)
.static boolean
afterAdd
(ProxyCollection coll, Object value, boolean added) Call after invokingCollection.add(Object)
on super.static void
afterAddElement
(ProxyCollection coll, Object value) Call after invokingVector.addElement(Object)
on super.static void
afterAddLast
(ProxyCollection coll, Object value) Call after invokingLinkedList.addLast(Object)
on super.static Iterator
afterIterator
(ProxyCollection coll, Iterator itr) Wrap given iterator in a proxy.static ListIterator
afterListIterator
(ProxyCollection coll, int idx, ListIterator itr) Wrap given iterator in a proxy.static ListIterator
afterListIterator
(ProxyCollection coll, ListIterator itr) Wrap given iterator in a proxy.static boolean
afterOffer
(ProxyCollection coll, Object value, boolean added) Call after invokingQueue#offer(Object)
on super.static Object
afterPoll
(ProxyCollection coll, Object removed) Call after invokingQueue#poll
on super.static Object
afterRemove
(ProxyCollection coll, int index, Object removed) Call after invokingList.remove(int)
on super.static Object
afterRemove
(ProxyCollection coll, Object removed) Call after invokingQueue#remove
on super.static boolean
afterRemove
(ProxyCollection coll, Object o, boolean removed) Call after invokingCollection.remove(java.lang.Object)
on super.static boolean
afterRemoveElement
(ProxyCollection coll, Object o, boolean removed) Call after invokingVector.removeElement(java.lang.Object)
on super.static Object
afterRemoveFirst
(ProxyCollection coll, Object removed) Call after invokingLinkedList.removeFirst()
on super.static Object
afterRemoveLast
(ProxyCollection coll, Object removed) Call after invokingLinkedList.removeLast()
on super.static Object
afterSet
(ProxyCollection coll, int index, Object element, Object replaced) Call after invokingList.set(int, E)
on super.static Object
afterSetElementAt
(ProxyCollection coll, Object element, int index, Object replaced) Call after invokingVector.setElementAt(E, int)
on super.static void
beforeAdd
(ProxyCollection coll, int index, Object value) Call before invokingList.add(int,Object)
on super.static void
beforeAdd
(ProxyCollection coll, Object value) Call before invokingCollection.add(Object)
on super.static void
beforeAddElement
(ProxyCollection coll, Object value) Call before invokingVector.addElement(Object)
on super.static void
beforeAddFirst
(ProxyCollection coll, Object value) Call before invokingLinkedList.addFirst(Object)
on super.static void
beforeAddLast
(ProxyCollection coll, Object value) Call before invokingLinkedList.addLast(Object)
on super.static void
beforeClear
(ProxyCollection coll) Call before clearing collection.static void
beforeInsertElementAt
(ProxyCollection coll, Object value, int index) Call before invokingVector.insertElementAt(Object,int)
on super.static void
beforeOffer
(ProxyCollection coll, Object value) Call before invokingQueue#offer(Object)
on super.static void
beforePoll
(ProxyCollection coll) Call before invokingQueue#poll
on super.static void
beforeRemove
(ProxyCollection coll) Call before invokingQueue#remove
on super.static void
beforeRemove
(ProxyCollection coll, int index) Call before invokingList.remove(int)
on super.static void
beforeRemove
(ProxyCollection coll, Object o) Call before invokingCollection.remove(java.lang.Object)
on super.static void
Call before clearing vector.static void
beforeRemoveElement
(ProxyCollection coll, Object o) Call before invokingVector.removeElement(java.lang.Object)
on super.static void
beforeRemoveElementAt
(ProxyCollection coll, int index) Call before invokingVector.removeElementAt(int)
on super.static void
Call before invokingLinkedList.removeFirst()
on super.static void
Call after invokingLinkedList.removeLast()
on super.static void
beforeSet
(ProxyCollection coll, int index, Object element) Call before invokingList.set(int, E)
on super.static void
beforeSetElementAt
(ProxyCollection coll, Object element, int index) Call before invokingVector.setElementAt(E, int)
on super.static boolean
isDelayed
(ProxyCollection proxy) static void
loadCollection
(ProxyCollection proxy) static void
loadCollection
(ProxyCollection proxy, boolean detaching) static boolean
removeAll
(ProxyCollection coll, Collection<?> vals) Override forCollection.removeAll(java.util.Collection<?>)
.static boolean
retainAll
(ProxyCollection coll, Collection<?> vals) Override forCollection.retainAll(java.util.Collection<?>)
.Methods inherited from class org.apache.openjpa.util.Proxies
assertAllowedType, dirty, isOwner, removed, writeReplace
-
Constructor Details
-
ProxyCollections
public ProxyCollections()
-
-
Method Details
-
beforeAdd
Call before invokingList.add(int,Object)
on super. -
beforeInsertElementAt
Call before invokingVector.insertElementAt(Object,int)
on super. -
beforeAdd
Call before invokingCollection.add(Object)
on super. -
afterAdd
Call after invokingCollection.add(Object)
on super.- Parameters:
added
- whether the object was added- Returns:
added
, for convenience
-
beforeAddElement
Call before invokingVector.addElement(Object)
on super. -
afterAddElement
Call after invokingVector.addElement(Object)
on super. -
beforeAddFirst
Call before invokingLinkedList.addFirst(Object)
on super. -
beforeAddLast
Call before invokingLinkedList.addLast(Object)
on super. -
afterAddLast
Call after invokingLinkedList.addLast(Object)
on super. -
beforeOffer
Call before invokingQueue#offer(Object)
on super. -
afterOffer
Call after invokingQueue#offer(Object)
on super.- Parameters:
added
- whether the object was added- Returns:
added
, for convenience
-
addAll
Override forList.addAll(int, Collection)
. -
addAll
Override forCollection.addAll(java.util.Collection<? extends E>)
. -
beforeClear
Call before clearing collection. -
beforeRemoveAllElements
Call before clearing vector. -
afterIterator
Wrap given iterator in a proxy. -
afterListIterator
Wrap given iterator in a proxy. -
afterListIterator
Wrap given iterator in a proxy. -
beforeRemove
Call before invokingList.remove(int)
on super. -
afterRemove
Call after invokingList.remove(int)
on super.- Parameters:
removed
- the removed object- Returns:
- the removed object, for convenience
-
beforeRemoveElementAt
Call before invokingVector.removeElementAt(int)
on super. -
beforeRemove
Call before invokingCollection.remove(java.lang.Object)
on super. -
afterRemove
Call after invokingCollection.remove(java.lang.Object)
on super.- Parameters:
removed
- whether the object was removed- Returns:
- whether the object was removed, for convenience
-
beforeRemoveElement
Call before invokingVector.removeElement(java.lang.Object)
on super. -
afterRemoveElement
Call after invokingVector.removeElement(java.lang.Object)
on super. -
beforeRemoveFirst
Call before invokingLinkedList.removeFirst()
on super. -
afterRemoveFirst
Call after invokingLinkedList.removeFirst()
on super. -
beforeRemoveLast
Call after invokingLinkedList.removeLast()
on super. -
afterRemoveLast
Call after invokingLinkedList.removeLast()
on super. -
beforeRemove
Call before invokingQueue#remove
on super. -
afterRemove
Call after invokingQueue#remove
on super. -
beforePoll
Call before invokingQueue#poll
on super. -
afterPoll
Call after invokingQueue#poll
on super. -
removeAll
Override forCollection.removeAll(java.util.Collection<?>)
. -
retainAll
Override forCollection.retainAll(java.util.Collection<?>)
. -
beforeSet
Call before invokingList.set(int, E)
on super. -
afterSet
Call after invokingList.set(int, E)
on super.- Parameters:
replaced
- the replaced object- Returns:
- the replaced object, for convenience
-
beforeSetElementAt
Call before invokingVector.setElementAt(E, int)
on super. -
afterSetElementAt
public static Object afterSetElementAt(ProxyCollection coll, Object element, int index, Object replaced) Call after invokingVector.setElementAt(E, int)
on super. -
loadCollection
-
loadCollection
-
isDelayed
-