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 interface
ProxyCollections.ProxyIterator
Marker interface for a proxied iterator.static interface
ProxyCollections.ProxyListIterator
Marker 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 boolean
addAll(ProxyCollection coll, int index, java.util.Collection values)
Override forList.addAll(int, Collection)
.static boolean
addAll(ProxyCollection coll, java.util.Collection values)
Override forCollection.addAll(java.util.Collection<? extends E>)
.static boolean
afterAdd(ProxyCollection coll, java.lang.Object value, boolean added)
Call after invokingCollection.add(Object)
on super.static void
afterAddElement(ProxyCollection coll, java.lang.Object value)
Call after invokingVector.addElement(Object)
on super.static void
afterAddLast(ProxyCollection coll, java.lang.Object value)
Call after invokingLinkedList.addLast(Object)
on super.static java.util.Iterator
afterIterator(ProxyCollection coll, java.util.Iterator itr)
Wrap given iterator in a proxy.static java.util.ListIterator
afterListIterator(ProxyCollection coll, int idx, java.util.ListIterator itr)
Wrap given iterator in a proxy.static java.util.ListIterator
afterListIterator(ProxyCollection coll, java.util.ListIterator itr)
Wrap given iterator in a proxy.static boolean
afterOffer(ProxyCollection coll, java.lang.Object value, boolean added)
Call after invokingQueue#offer(Object)
on super.static java.lang.Object
afterPoll(ProxyCollection coll, java.lang.Object removed)
Call after invokingQueue#poll
on super.static java.lang.Object
afterRemove(ProxyCollection coll, int index, java.lang.Object removed)
Call after invokingList.remove(int)
on super.static java.lang.Object
afterRemove(ProxyCollection coll, java.lang.Object removed)
Call after invokingQueue#remove
on super.static boolean
afterRemove(ProxyCollection coll, java.lang.Object o, boolean removed)
Call after invokingCollection.remove(java.lang.Object)
on super.static boolean
afterRemoveElement(ProxyCollection coll, java.lang.Object o, boolean removed)
Call after invokingVector.removeElement(java.lang.Object)
on super.static java.lang.Object
afterRemoveFirst(ProxyCollection coll, java.lang.Object removed)
Call after invokingLinkedList.removeFirst()
on super.static java.lang.Object
afterRemoveLast(ProxyCollection coll, java.lang.Object removed)
Call after invokingLinkedList.removeLast()
on super.static java.lang.Object
afterSet(ProxyCollection coll, int index, java.lang.Object element, java.lang.Object replaced)
Call after invokingList.set(int, E)
on super.static java.lang.Object
afterSetElementAt(ProxyCollection coll, java.lang.Object element, int index, java.lang.Object replaced)
Call after invokingVector.setElementAt(E, int)
on super.static void
beforeAdd(ProxyCollection coll, int index, java.lang.Object value)
Call before invokingList.add(int,Object)
on super.static void
beforeAdd(ProxyCollection coll, java.lang.Object value)
Call before invokingCollection.add(Object)
on super.static void
beforeAddElement(ProxyCollection coll, java.lang.Object value)
Call before invokingVector.addElement(Object)
on super.static void
beforeAddFirst(ProxyCollection coll, java.lang.Object value)
Call before invokingLinkedList.addFirst(Object)
on super.static void
beforeAddLast(ProxyCollection coll, java.lang.Object value)
Call before invokingLinkedList.addLast(Object)
on super.static void
beforeClear(ProxyCollection coll)
Call before clearing collection.static void
beforeInsertElementAt(ProxyCollection coll, java.lang.Object value, int index)
Call before invokingVector.insertElementAt(Object,int)
on super.static void
beforeOffer(ProxyCollection coll, java.lang.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, java.lang.Object o)
Call before invokingCollection.remove(java.lang.Object)
on super.static void
beforeRemoveAllElements(ProxyCollection coll)
Call before clearing vector.static void
beforeRemoveElement(ProxyCollection coll, java.lang.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
beforeRemoveFirst(ProxyCollection coll)
Call before invokingLinkedList.removeFirst()
on super.static void
beforeRemoveLast(ProxyCollection coll)
Call after invokingLinkedList.removeLast()
on super.static void
beforeSet(ProxyCollection coll, int index, java.lang.Object element)
Call before invokingList.set(int, E)
on super.static void
beforeSetElementAt(ProxyCollection coll, java.lang.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, java.util.Collection<?> vals)
Override forCollection.removeAll(java.util.Collection<?>)
.static boolean
retainAll(ProxyCollection coll, java.util.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, java.lang.Object value)
Call before invokingList.add(int,Object)
on super.
-
beforeInsertElementAt
public static void beforeInsertElementAt(ProxyCollection coll, java.lang.Object value, int index)
Call before invokingVector.insertElementAt(Object,int)
on super.
-
beforeAdd
public static void beforeAdd(ProxyCollection coll, java.lang.Object value)
Call before invokingCollection.add(Object)
on super.
-
afterAdd
public static boolean afterAdd(ProxyCollection coll, java.lang.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, java.lang.Object value)
Call before invokingVector.addElement(Object)
on super.
-
afterAddElement
public static void afterAddElement(ProxyCollection coll, java.lang.Object value)
Call after invokingVector.addElement(Object)
on super.
-
beforeAddFirst
public static void beforeAddFirst(ProxyCollection coll, java.lang.Object value)
Call before invokingLinkedList.addFirst(Object)
on super.
-
beforeAddLast
public static void beforeAddLast(ProxyCollection coll, java.lang.Object value)
Call before invokingLinkedList.addLast(Object)
on super.
-
afterAddLast
public static void afterAddLast(ProxyCollection coll, java.lang.Object value)
Call after invokingLinkedList.addLast(Object)
on super.
-
beforeOffer
public static void beforeOffer(ProxyCollection coll, java.lang.Object value)
Call before invokingQueue#offer(Object)
on super.
-
afterOffer
public static boolean afterOffer(ProxyCollection coll, java.lang.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, java.util.Collection values)
Override forList.addAll(int, Collection)
.
-
addAll
public static boolean addAll(ProxyCollection coll, java.util.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 java.util.Iterator afterIterator(ProxyCollection coll, java.util.Iterator itr)
Wrap given iterator in a proxy.
-
afterListIterator
public static java.util.ListIterator afterListIterator(ProxyCollection coll, int idx, java.util.ListIterator itr)
Wrap given iterator in a proxy.
-
afterListIterator
public static java.util.ListIterator afterListIterator(ProxyCollection coll, java.util.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 java.lang.Object afterRemove(ProxyCollection coll, int index, java.lang.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, java.lang.Object o)
Call before invokingCollection.remove(java.lang.Object)
on super.
-
afterRemove
public static boolean afterRemove(ProxyCollection coll, java.lang.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, java.lang.Object o)
Call before invokingVector.removeElement(java.lang.Object)
on super.
-
afterRemoveElement
public static boolean afterRemoveElement(ProxyCollection coll, java.lang.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 java.lang.Object afterRemoveFirst(ProxyCollection coll, java.lang.Object removed)
Call after invokingLinkedList.removeFirst()
on super.
-
beforeRemoveLast
public static void beforeRemoveLast(ProxyCollection coll)
Call after invokingLinkedList.removeLast()
on super.
-
afterRemoveLast
public static java.lang.Object afterRemoveLast(ProxyCollection coll, java.lang.Object removed)
Call after invokingLinkedList.removeLast()
on super.
-
beforeRemove
public static void beforeRemove(ProxyCollection coll)
Call before invokingQueue#remove
on super.
-
afterRemove
public static java.lang.Object afterRemove(ProxyCollection coll, java.lang.Object removed)
Call after invokingQueue#remove
on super.
-
beforePoll
public static void beforePoll(ProxyCollection coll)
Call before invokingQueue#poll
on super.
-
afterPoll
public static java.lang.Object afterPoll(ProxyCollection coll, java.lang.Object removed)
Call after invokingQueue#poll
on super.
-
removeAll
public static boolean removeAll(ProxyCollection coll, java.util.Collection<?> vals)
Override forCollection.removeAll(java.util.Collection<?>)
.
-
retainAll
public static boolean retainAll(ProxyCollection coll, java.util.Collection<?> vals)
Override forCollection.retainAll(java.util.Collection<?>)
.
-
beforeSet
public static void beforeSet(ProxyCollection coll, int index, java.lang.Object element)
Call before invokingList.set(int, E)
on super.
-
afterSet
public static java.lang.Object afterSet(ProxyCollection coll, int index, java.lang.Object element, java.lang.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, java.lang.Object element, int index)
Call before invokingVector.setElementAt(E, int)
on super.
-
afterSetElementAt
public static java.lang.Object afterSetElementAt(ProxyCollection coll, java.lang.Object element, int index, java.lang.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)
-
-