Package org.apache.openjpa.util.proxy
Class DelayedLinkedListProxy
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.AbstractSequentialList<E>
java.util.LinkedList
org.apache.openjpa.util.proxy.DelayedLinkedListProxy
- All Implemented Interfaces:
Serializable,Cloneable,Iterable,Collection,Deque,List,Queue,Proxy,DelayedProxy,ProxyCollection
LinkedList proxy with delay loading capability. Allows non-indexed
add and remove operations to occur on an unloaded collection. Operations
that require a load will trigger a load.
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int paramInt, Collection paramCollection) booleanaddAll(Collection paramCollection) voidvoidvoidclear()clone()voidClose the broker that is used to service this proxy.booleanbooleanReturn an unproxied copy of the given instance.element()booleanget(int index) Get the broker that is used to service this proxy.Return the change tracker for this proxy, or null if none.intReturns the expected field index even if this collection was detached.Returns a state manager that can service this proxy even if the collection was detached.The collection element type.getFirst()getLast()getOwner()Return the owning object.intReturn the owning field index.Returns the state manager of the owning instance.inthashCode()intbooleanbooleanReturns whether the proxy is detached.booleanReturns whether the caller has direct-call access to the proxied object.booleanisEmpty()iterator()intlistIterator(int paramInt) voidload()Load the proxy if it was delay-loaded.newInstance(Class paramClass, Comparator paramComparator, boolean paramBoolean1, boolean paramBoolean2) Create a new instance of this proxy type.booleanbooleanofferFirst(Object paramObject) booleanpeek()peekLast()poll()pollLast()pop()voidremove()remove(int paramInt) booleanbooleanremoveAll(Collection paramCollection) booleanremoveFirstOccurrence(Object paramObject) booleanremoveLastOccurrence(Object paramObject) booleanretainAll(Collection paramCollection) protected voidvoidsetDirectAccess(boolean direct) Sets whether the caller has direct-call access to the proxied object.protected voidsetElementType(Class<?> elemType) voidsetOwner(OpenJPAStateManager paramOpenJPAStateManager, int paramInt) Reset the state of the proxy, and set the owning instance of the proxy and the name of the field it is assigned to.intsize()subList(int fromIndex, int toIndex) Object[]toArray()Object[]Object[]toArray(IntFunction generator) protected ObjectMethods inherited from class java.util.LinkedList
spliteratorMethods inherited from class java.util.AbstractList
removeRangeMethods inherited from class java.util.AbstractCollection
toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, streamMethods inherited from interface java.util.List
replaceAll, sort
-
Constructor Details
-
DelayedLinkedListProxy
-
DelayedLinkedListProxy
public DelayedLinkedListProxy()
-
-
Method Details
-
setOwner
Description copied from interface:ProxyReset the state of the proxy, and set the owning instance of the proxy and the name of the field it is assigned to. Set to null to indicate that the proxy is no longer managed. -
getOwner
Description copied from interface:ProxyReturn the owning object. -
getOwnerField
public int getOwnerField()Description copied from interface:ProxyReturn the owning field index.- Specified by:
getOwnerFieldin interfaceProxy
-
getChangeTracker
Description copied from interface:ProxyReturn the change tracker for this proxy, or null if none.- Specified by:
getChangeTrackerin interfaceProxy
-
setChangeTracker
-
copy
Description copied from interface:ProxyReturn an unproxied copy of the given instance. This method is used by proxy managers to create backup values for use in rollback. -
getElementType
Description copied from interface:ProxyCollectionThe collection element type.- Specified by:
getElementTypein interfaceProxyCollection
-
setElementType
-
newInstance
public ProxyCollection newInstance(Class paramClass, Comparator paramComparator, boolean paramBoolean1, boolean paramBoolean2) Description copied from interface:ProxyCollectionCreate a new instance of this proxy type.- Specified by:
newInstancein interfaceProxyCollection
-
getDelayedField
public int getDelayedField()Description copied from interface:DelayedProxyReturns the expected field index even if this collection was detached.- Specified by:
getDelayedFieldin interfaceDelayedProxy
-
getDelayedOwner
Description copied from interface:DelayedProxyReturns a state manager that can service this proxy even if the collection was detached.- Specified by:
getDelayedOwnerin interfaceDelayedProxy
-
isDirectAccess
public boolean isDirectAccess()Description copied from interface:DelayedProxyReturns whether the caller has direct-call access to the proxied object. Direct access allows calls to be made on the object without triggering a load or proxy state tracking callbacks.- Specified by:
isDirectAccessin interfaceDelayedProxy
-
setDirectAccess
public void setDirectAccess(boolean direct) Description copied from interface:DelayedProxySets whether the caller has direct-call access to the proxied object. Direct access allows calls to be made on the object without triggering a load or proxy state tracking callbacks.- Specified by:
setDirectAccessin interfaceDelayedProxy
-
getBrokerFactory
-
load
public void load()Description copied from interface:DelayedProxyLoad the proxy if it was delay-loaded.- Specified by:
loadin interfaceDelayedProxy
-
getBroker
Description copied from interface:DelayedProxyGet the broker that is used to service this proxy.- Specified by:
getBrokerin interfaceDelayedProxy
-
closeBroker
public void closeBroker()Description copied from interface:DelayedProxyClose the broker that is used to service this proxy.- Specified by:
closeBrokerin interfaceDelayedProxy
-
getOwnerStateManager
Description copied from interface:DelayedProxyReturns the state manager of the owning instance.- Specified by:
getOwnerStateManagerin interfaceDelayedProxy
-
isDetached
public boolean isDetached()Description copied from interface:DelayedProxyReturns whether the proxy is detached.- Specified by:
isDetachedin interfaceDelayedProxy
-
isDelayLoad
public boolean isDelayLoad() -
clone
- Overrides:
clonein classLinkedList
-
add
- Specified by:
addin interfaceList- Overrides:
addin classLinkedList
-
add
- Specified by:
addin interfaceCollection- Specified by:
addin interfaceDeque- Specified by:
addin interfaceList- Specified by:
addin interfaceQueue- Overrides:
addin classLinkedList
-
clear
public void clear()- Specified by:
clearin interfaceCollection- Specified by:
clearin interfaceList- Overrides:
clearin classLinkedList
-
addAll
- Specified by:
addAllin interfaceCollection- Specified by:
addAllin interfaceDeque- Specified by:
addAllin interfaceList- Overrides:
addAllin classLinkedList
-
addAll
- Specified by:
addAllin interfaceList- Overrides:
addAllin classLinkedList
-
remove
- Specified by:
removein interfaceCollection- Specified by:
removein interfaceDeque- Specified by:
removein interfaceList- Overrides:
removein classLinkedList
-
remove
- Specified by:
removein interfaceList- Overrides:
removein classLinkedList
-
remove
-
set
- Specified by:
setin interfaceList- Overrides:
setin classLinkedList
-
poll
-
listIterator
- Specified by:
listIteratorin interfaceList- Overrides:
listIteratorin classLinkedList
-
addFirst
- Specified by:
addFirstin interfaceDeque- Overrides:
addFirstin classLinkedList
-
addLast
- Specified by:
addLastin interfaceDeque- Overrides:
addLastin classLinkedList
-
offer
-
removeFirst
- Specified by:
removeFirstin interfaceDeque- Overrides:
removeFirstin classLinkedList
-
removeLast
- Specified by:
removeLastin interfaceDeque- Overrides:
removeLastin classLinkedList
-
iterator
- Specified by:
iteratorin interfaceCollection- Specified by:
iteratorin interfaceDeque- Specified by:
iteratorin interfaceIterable- Specified by:
iteratorin interfaceList- Overrides:
iteratorin classAbstractSequentialList
-
listIterator
- Specified by:
listIteratorin interfaceList- Overrides:
listIteratorin classAbstractList
-
removeAll
- Specified by:
removeAllin interfaceCollection- Specified by:
removeAllin interfaceList- Overrides:
removeAllin classAbstractCollection
-
retainAll
- Specified by:
retainAllin interfaceCollection- Specified by:
retainAllin interfaceList- Overrides:
retainAllin classAbstractCollection
-
removeFirstOccurrence
- Specified by:
removeFirstOccurrencein interfaceDeque- Overrides:
removeFirstOccurrencein classLinkedList
-
removeLastOccurrence
- Specified by:
removeLastOccurrencein interfaceDeque- Overrides:
removeLastOccurrencein classLinkedList
-
writeReplace
- Throws:
ObjectStreamException
-
equals
- Specified by:
equalsin interfaceCollection- Specified by:
equalsin interfaceList- Overrides:
equalsin classAbstractList
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection- Specified by:
hashCodein interfaceList- Overrides:
hashCodein classAbstractList
-
subList
- Specified by:
subListin interfaceList- Overrides:
subListin classAbstractList
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList- Overrides:
lastIndexOfin classLinkedList
-
indexOf
- Specified by:
indexOfin interfaceList- Overrides:
indexOfin classLinkedList
-
get
- Specified by:
getin interfaceList- Overrides:
getin classLinkedList
-
containsAll
- Specified by:
containsAllin interfaceCollection- Specified by:
containsAllin interfaceList- Overrides:
containsAllin classAbstractCollection
-
toArray
- Specified by:
toArrayin interfaceCollection- Specified by:
toArrayin interfaceList- Overrides:
toArrayin classLinkedList
-
toArray
- Specified by:
toArrayin interfaceCollection- Specified by:
toArrayin interfaceList- Overrides:
toArrayin classLinkedList
-
toArray
- Specified by:
toArrayin interfaceCollection
-
contains
- Specified by:
containsin interfaceCollection- Specified by:
containsin interfaceDeque- Specified by:
containsin interfaceList- Overrides:
containsin classLinkedList
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection- Specified by:
isEmptyin interfaceList- Overrides:
isEmptyin classAbstractCollection
-
size
public int size()- Specified by:
sizein interfaceCollection- Specified by:
sizein interfaceDeque- Specified by:
sizein interfaceList- Overrides:
sizein classLinkedList
-
offerFirst
- Specified by:
offerFirstin interfaceDeque- Overrides:
offerFirstin classLinkedList
-
offerLast
- Specified by:
offerLastin interfaceDeque- Overrides:
offerLastin classLinkedList
-
pollFirst
- Specified by:
pollFirstin interfaceDeque- Overrides:
pollFirstin classLinkedList
-
pollLast
- Specified by:
pollLastin interfaceDeque- Overrides:
pollLastin classLinkedList
-
getFirst
- Specified by:
getFirstin interfaceDeque- Overrides:
getFirstin classLinkedList
-
getLast
- Specified by:
getLastin interfaceDeque- Overrides:
getLastin classLinkedList
-
peekFirst
- Specified by:
peekFirstin interfaceDeque- Overrides:
peekFirstin classLinkedList
-
peekLast
- Specified by:
peekLastin interfaceDeque- Overrides:
peekLastin classLinkedList
-
element
-
peek
-
push
- Specified by:
pushin interfaceDeque- Overrides:
pushin classLinkedList
-
pop
- Specified by:
popin interfaceDeque- Overrides:
popin classLinkedList
-
descendingIterator
- Specified by:
descendingIteratorin interfaceDeque- Overrides:
descendingIteratorin classLinkedList
-