Package org.apache.openjpa.util.proxy
Class ProxyCollections
- java.lang.Object
-
- org.apache.openjpa.util.Proxies
-
- org.apache.openjpa.util.proxy.ProxyCollections
-
public class ProxyCollections extends Proxies
Utility methods used by collection proxies.- Author:
- Abe White
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceProxyCollections.ProxyIteratorMarker interface for a proxied iterator.static interfaceProxyCollections.ProxyListIteratorMarker interface for a proxied list iterator.
-
Constructor Summary
Constructors Constructor Description ProxyCollections()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanaddAll(ProxyCollection coll, int index, Collection values)Override forList.addAll(int, Collection).static booleanaddAll(ProxyCollection coll, Collection values)Override forCollection.addAll(java.util.Collection<? extends E>).static booleanafterAdd(ProxyCollection coll, Object value, boolean added)Call after invokingCollection.add(Object)on super.static voidafterAddElement(ProxyCollection coll, Object value)Call after invokingVector.addElement(Object)on super.static voidafterAddLast(ProxyCollection coll, Object value)Call after invokingLinkedList.addLast(Object)on super.static IteratorafterIterator(ProxyCollection coll, Iterator itr)Wrap given iterator in a proxy.static ListIteratorafterListIterator(ProxyCollection coll, int idx, ListIterator itr)Wrap given iterator in a proxy.static ListIteratorafterListIterator(ProxyCollection coll, ListIterator itr)Wrap given iterator in a proxy.static booleanafterOffer(ProxyCollection coll, Object value, boolean added)Call after invokingQueue#offer(Object)on super.static ObjectafterPoll(ProxyCollection coll, Object removed)Call after invokingQueue#pollon super.static ObjectafterRemove(ProxyCollection coll, int index, Object removed)Call after invokingList.remove(int)on super.static ObjectafterRemove(ProxyCollection coll, Object removed)Call after invokingQueue#removeon super.static booleanafterRemove(ProxyCollection coll, Object o, boolean removed)Call after invokingCollection.remove(java.lang.Object)on super.static booleanafterRemoveElement(ProxyCollection coll, Object o, boolean removed)Call after invokingVector.removeElement(java.lang.Object)on super.static ObjectafterRemoveFirst(ProxyCollection coll, Object removed)Call after invokingLinkedList.removeFirst()on super.static ObjectafterRemoveLast(ProxyCollection coll, Object removed)Call after invokingLinkedList.removeLast()on super.static ObjectafterSet(ProxyCollection coll, int index, Object element, Object replaced)Call after invokingList.set(int, E)on super.static ObjectafterSetElementAt(ProxyCollection coll, Object element, int index, Object replaced)Call after invokingVector.setElementAt(E, int)on super.static voidbeforeAdd(ProxyCollection coll, int index, Object value)Call before invokingList.add(int,Object)on super.static voidbeforeAdd(ProxyCollection coll, Object value)Call before invokingCollection.add(Object)on super.static voidbeforeAddElement(ProxyCollection coll, Object value)Call before invokingVector.addElement(Object)on super.static voidbeforeAddFirst(ProxyCollection coll, Object value)Call before invokingLinkedList.addFirst(Object)on super.static voidbeforeAddLast(ProxyCollection coll, Object value)Call before invokingLinkedList.addLast(Object)on super.static voidbeforeClear(ProxyCollection coll)Call before clearing collection.static voidbeforeInsertElementAt(ProxyCollection coll, Object value, int index)Call before invokingVector.insertElementAt(Object,int)on super.static voidbeforeOffer(ProxyCollection coll, Object value)Call before invokingQueue#offer(Object)on super.static voidbeforePoll(ProxyCollection coll)Call before invokingQueue#pollon super.static voidbeforeRemove(ProxyCollection coll)Call before invokingQueue#removeon super.static voidbeforeRemove(ProxyCollection coll, int index)Call before invokingList.remove(int)on super.static voidbeforeRemove(ProxyCollection coll, Object o)Call before invokingCollection.remove(java.lang.Object)on super.static voidbeforeRemoveAllElements(ProxyCollection coll)Call before clearing vector.static voidbeforeRemoveElement(ProxyCollection coll, Object o)Call before invokingVector.removeElement(java.lang.Object)on super.static voidbeforeRemoveElementAt(ProxyCollection coll, int index)Call before invokingVector.removeElementAt(int)on super.static voidbeforeRemoveFirst(ProxyCollection coll)Call before invokingLinkedList.removeFirst()on super.static voidbeforeRemoveLast(ProxyCollection coll)Call after invokingLinkedList.removeLast()on super.static voidbeforeSet(ProxyCollection coll, int index, Object element)Call before invokingList.set(int, E)on super.static voidbeforeSetElementAt(ProxyCollection coll, Object element, int index)Call before invokingVector.setElementAt(E, int)on super.static booleanisDelayed(ProxyCollection proxy)static voidloadCollection(ProxyCollection proxy)static voidloadCollection(ProxyCollection proxy, boolean detaching)static booleanremoveAll(ProxyCollection coll, Collection<?> vals)Override forCollection.removeAll(java.util.Collection<?>).static booleanretainAll(ProxyCollection coll, Collection<?> vals)Override forCollection.retainAll(java.util.Collection<?>).-
Methods inherited from class org.apache.openjpa.util.Proxies
assertAllowedType, dirty, isOwner, removed, writeReplace
-
-
-
-
Method Detail
-
beforeAdd
public static void beforeAdd(ProxyCollection coll, int index, Object value)
Call before invokingList.add(int,Object)on super.
-
beforeInsertElementAt
public static void beforeInsertElementAt(ProxyCollection coll, Object value, int index)
Call before invokingVector.insertElementAt(Object,int)on super.
-
beforeAdd
public static void beforeAdd(ProxyCollection coll, Object value)
Call before invokingCollection.add(Object)on super.
-
afterAdd
public static boolean afterAdd(ProxyCollection coll, Object value, boolean added)
Call after invokingCollection.add(Object)on super.- Parameters:
added- whether the object was added- Returns:
added, for convenience
-
beforeAddElement
public static void beforeAddElement(ProxyCollection coll, Object value)
Call before invokingVector.addElement(Object)on super.
-
afterAddElement
public static void afterAddElement(ProxyCollection coll, Object value)
Call after invokingVector.addElement(Object)on super.
-
beforeAddFirst
public static void beforeAddFirst(ProxyCollection coll, Object value)
Call before invokingLinkedList.addFirst(Object)on super.
-
beforeAddLast
public static void beforeAddLast(ProxyCollection coll, Object value)
Call before invokingLinkedList.addLast(Object)on super.
-
afterAddLast
public static void afterAddLast(ProxyCollection coll, Object value)
Call after invokingLinkedList.addLast(Object)on super.
-
beforeOffer
public static void beforeOffer(ProxyCollection coll, Object value)
Call before invokingQueue#offer(Object)on super.
-
afterOffer
public static boolean afterOffer(ProxyCollection coll, Object value, boolean added)
Call after invokingQueue#offer(Object)on super.- Parameters:
added- whether the object was added- Returns:
added, for convenience
-
addAll
public static boolean addAll(ProxyCollection coll, int index, Collection values)
Override forList.addAll(int, Collection).
-
addAll
public static boolean addAll(ProxyCollection coll, Collection values)
Override forCollection.addAll(java.util.Collection<? extends E>).
-
beforeClear
public static void beforeClear(ProxyCollection coll)
Call before clearing collection.
-
beforeRemoveAllElements
public static void beforeRemoveAllElements(ProxyCollection coll)
Call before clearing vector.
-
afterIterator
public static Iterator afterIterator(ProxyCollection coll, Iterator itr)
Wrap given iterator in a proxy.
-
afterListIterator
public static ListIterator afterListIterator(ProxyCollection coll, int idx, ListIterator itr)
Wrap given iterator in a proxy.
-
afterListIterator
public static ListIterator afterListIterator(ProxyCollection coll, ListIterator itr)
Wrap given iterator in a proxy.
-
beforeRemove
public static void beforeRemove(ProxyCollection coll, int index)
Call before invokingList.remove(int)on super.
-
afterRemove
public static Object afterRemove(ProxyCollection coll, int index, Object removed)
Call after invokingList.remove(int)on super.- Parameters:
removed- the removed object- Returns:
- the removed object, for convenience
-
beforeRemoveElementAt
public static void beforeRemoveElementAt(ProxyCollection coll, int index)
Call before invokingVector.removeElementAt(int)on super.
-
beforeRemove
public static void beforeRemove(ProxyCollection coll, Object o)
Call before invokingCollection.remove(java.lang.Object)on super.
-
afterRemove
public static boolean afterRemove(ProxyCollection coll, Object o, boolean removed)
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
public static void beforeRemoveElement(ProxyCollection coll, Object o)
Call before invokingVector.removeElement(java.lang.Object)on super.
-
afterRemoveElement
public static boolean afterRemoveElement(ProxyCollection coll, Object o, boolean removed)
Call after invokingVector.removeElement(java.lang.Object)on super.
-
beforeRemoveFirst
public static void beforeRemoveFirst(ProxyCollection coll)
Call before invokingLinkedList.removeFirst()on super.
-
afterRemoveFirst
public static Object afterRemoveFirst(ProxyCollection coll, Object removed)
Call after invokingLinkedList.removeFirst()on super.
-
beforeRemoveLast
public static void beforeRemoveLast(ProxyCollection coll)
Call after invokingLinkedList.removeLast()on super.
-
afterRemoveLast
public static Object afterRemoveLast(ProxyCollection coll, Object removed)
Call after invokingLinkedList.removeLast()on super.
-
beforeRemove
public static void beforeRemove(ProxyCollection coll)
Call before invokingQueue#removeon super.
-
afterRemove
public static Object afterRemove(ProxyCollection coll, Object removed)
Call after invokingQueue#removeon super.
-
beforePoll
public static void beforePoll(ProxyCollection coll)
Call before invokingQueue#pollon super.
-
afterPoll
public static Object afterPoll(ProxyCollection coll, Object removed)
Call after invokingQueue#pollon super.
-
removeAll
public static boolean removeAll(ProxyCollection coll, Collection<?> vals)
Override forCollection.removeAll(java.util.Collection<?>).
-
retainAll
public static boolean retainAll(ProxyCollection coll, Collection<?> vals)
Override forCollection.retainAll(java.util.Collection<?>).
-
beforeSet
public static void beforeSet(ProxyCollection coll, int index, Object element)
Call before invokingList.set(int, E)on super.
-
afterSet
public static Object afterSet(ProxyCollection coll, int index, Object element, Object replaced)
Call after invokingList.set(int, E)on super.- Parameters:
replaced- the replaced object- Returns:
- the replaced object, for convenience
-
beforeSetElementAt
public static void beforeSetElementAt(ProxyCollection coll, Object element, int index)
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
public static void loadCollection(ProxyCollection proxy)
-
loadCollection
public static void loadCollection(ProxyCollection proxy, boolean detaching)
-
isDelayed
public static boolean isDelayed(ProxyCollection proxy)
-
-