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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
boolean
addAll
(int paramInt, Collection paramCollection) boolean
addAll
(Collection paramCollection) void
void
void
clear()
clone()
void
Close the broker that is used to service this proxy.boolean
boolean
Return an unproxied copy of the given instance.element()
boolean
get
(int index) Get the broker that is used to service this proxy.Return the change tracker for this proxy, or null if none.int
Returns 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.int
Return the owning field index.Returns the state manager of the owning instance.int
hashCode()
int
boolean
boolean
Returns whether the proxy is detached.boolean
Returns whether the caller has direct-call access to the proxied object.boolean
isEmpty()
iterator()
int
listIterator
(int paramInt) void
load()
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.boolean
boolean
offerFirst
(Object paramObject) boolean
peek()
peekLast()
poll()
pollLast()
pop()
void
remove()
remove
(int paramInt) boolean
boolean
removeAll
(Collection paramCollection) boolean
removeFirstOccurrence
(Object paramObject) boolean
removeLastOccurrence
(Object paramObject) boolean
retainAll
(Collection paramCollection) protected void
void
setDirectAccess
(boolean direct) Sets whether the caller has direct-call access to the proxied object.protected void
setElementType
(Class<?> elemType) void
setOwner
(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.int
size()
subList
(int fromIndex, int toIndex) Object[]
toArray()
Object[]
Object[]
toArray
(IntFunction generator) protected Object
Methods inherited from class java.util.LinkedList
spliterator
Methods inherited from class java.util.AbstractList
removeRange
Methods inherited from class java.util.AbstractCollection
toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream
Methods inherited from interface java.util.List
replaceAll, sort
-
Constructor Details
-
DelayedLinkedListProxy
-
DelayedLinkedListProxy
public DelayedLinkedListProxy()
-
-
Method Details
-
setOwner
Description copied from interface:Proxy
Reset 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:Proxy
Return the owning object. -
getOwnerField
public int getOwnerField()Description copied from interface:Proxy
Return the owning field index.- Specified by:
getOwnerField
in interfaceProxy
-
getChangeTracker
Description copied from interface:Proxy
Return the change tracker for this proxy, or null if none.- Specified by:
getChangeTracker
in interfaceProxy
-
setChangeTracker
-
copy
Description copied from interface:Proxy
Return 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:ProxyCollection
The collection element type.- Specified by:
getElementType
in interfaceProxyCollection
-
setElementType
-
newInstance
public ProxyCollection newInstance(Class paramClass, Comparator paramComparator, boolean paramBoolean1, boolean paramBoolean2) Description copied from interface:ProxyCollection
Create a new instance of this proxy type.- Specified by:
newInstance
in interfaceProxyCollection
-
getDelayedField
public int getDelayedField()Description copied from interface:DelayedProxy
Returns the expected field index even if this collection was detached.- Specified by:
getDelayedField
in interfaceDelayedProxy
-
getDelayedOwner
Description copied from interface:DelayedProxy
Returns a state manager that can service this proxy even if the collection was detached.- Specified by:
getDelayedOwner
in interfaceDelayedProxy
-
isDirectAccess
public boolean isDirectAccess()Description copied from interface:DelayedProxy
Returns 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:
isDirectAccess
in interfaceDelayedProxy
-
setDirectAccess
public void setDirectAccess(boolean direct) Description copied from interface:DelayedProxy
Sets 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:
setDirectAccess
in interfaceDelayedProxy
-
getBrokerFactory
-
load
public void load()Description copied from interface:DelayedProxy
Load the proxy if it was delay-loaded.- Specified by:
load
in interfaceDelayedProxy
-
getBroker
Description copied from interface:DelayedProxy
Get the broker that is used to service this proxy.- Specified by:
getBroker
in interfaceDelayedProxy
-
closeBroker
public void closeBroker()Description copied from interface:DelayedProxy
Close the broker that is used to service this proxy.- Specified by:
closeBroker
in interfaceDelayedProxy
-
getOwnerStateManager
Description copied from interface:DelayedProxy
Returns the state manager of the owning instance.- Specified by:
getOwnerStateManager
in interfaceDelayedProxy
-
isDetached
public boolean isDetached()Description copied from interface:DelayedProxy
Returns whether the proxy is detached.- Specified by:
isDetached
in interfaceDelayedProxy
-
isDelayLoad
public boolean isDelayLoad() -
clone
- Overrides:
clone
in classLinkedList
-
add
- Specified by:
add
in interfaceList
- Overrides:
add
in classLinkedList
-
add
- Specified by:
add
in interfaceCollection
- Specified by:
add
in interfaceDeque
- Specified by:
add
in interfaceList
- Specified by:
add
in interfaceQueue
- Overrides:
add
in classLinkedList
-
clear
public void clear()- Specified by:
clear
in interfaceCollection
- Specified by:
clear
in interfaceList
- Overrides:
clear
in classLinkedList
-
addAll
- Specified by:
addAll
in interfaceCollection
- Specified by:
addAll
in interfaceDeque
- Specified by:
addAll
in interfaceList
- Overrides:
addAll
in classLinkedList
-
addAll
- Specified by:
addAll
in interfaceList
- Overrides:
addAll
in classLinkedList
-
remove
- Specified by:
remove
in interfaceCollection
- Specified by:
remove
in interfaceDeque
- Specified by:
remove
in interfaceList
- Overrides:
remove
in classLinkedList
-
remove
- Specified by:
remove
in interfaceList
- Overrides:
remove
in classLinkedList
-
remove
-
set
- Specified by:
set
in interfaceList
- Overrides:
set
in classLinkedList
-
poll
-
listIterator
- Specified by:
listIterator
in interfaceList
- Overrides:
listIterator
in classLinkedList
-
addFirst
- Specified by:
addFirst
in interfaceDeque
- Overrides:
addFirst
in classLinkedList
-
addLast
- Specified by:
addLast
in interfaceDeque
- Overrides:
addLast
in classLinkedList
-
offer
-
removeFirst
- Specified by:
removeFirst
in interfaceDeque
- Overrides:
removeFirst
in classLinkedList
-
removeLast
- Specified by:
removeLast
in interfaceDeque
- Overrides:
removeLast
in classLinkedList
-
iterator
- Specified by:
iterator
in interfaceCollection
- Specified by:
iterator
in interfaceDeque
- Specified by:
iterator
in interfaceIterable
- Specified by:
iterator
in interfaceList
- Overrides:
iterator
in classAbstractSequentialList
-
listIterator
- Specified by:
listIterator
in interfaceList
- Overrides:
listIterator
in classAbstractList
-
removeAll
- Specified by:
removeAll
in interfaceCollection
- Specified by:
removeAll
in interfaceList
- Overrides:
removeAll
in classAbstractCollection
-
retainAll
- Specified by:
retainAll
in interfaceCollection
- Specified by:
retainAll
in interfaceList
- Overrides:
retainAll
in classAbstractCollection
-
removeFirstOccurrence
- Specified by:
removeFirstOccurrence
in interfaceDeque
- Overrides:
removeFirstOccurrence
in classLinkedList
-
removeLastOccurrence
- Specified by:
removeLastOccurrence
in interfaceDeque
- Overrides:
removeLastOccurrence
in classLinkedList
-
writeReplace
- Throws:
ObjectStreamException
-
equals
- Specified by:
equals
in interfaceCollection
- Specified by:
equals
in interfaceList
- Overrides:
equals
in classAbstractList
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceCollection
- Specified by:
hashCode
in interfaceList
- Overrides:
hashCode
in classAbstractList
-
subList
- Specified by:
subList
in interfaceList
- Overrides:
subList
in classAbstractList
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList
- Overrides:
lastIndexOf
in classLinkedList
-
indexOf
- Specified by:
indexOf
in interfaceList
- Overrides:
indexOf
in classLinkedList
-
get
- Specified by:
get
in interfaceList
- Overrides:
get
in classLinkedList
-
containsAll
- Specified by:
containsAll
in interfaceCollection
- Specified by:
containsAll
in interfaceList
- Overrides:
containsAll
in classAbstractCollection
-
toArray
- Specified by:
toArray
in interfaceCollection
- Specified by:
toArray
in interfaceList
- Overrides:
toArray
in classLinkedList
-
toArray
- Specified by:
toArray
in interfaceCollection
- Specified by:
toArray
in interfaceList
- Overrides:
toArray
in classLinkedList
-
toArray
- Specified by:
toArray
in interfaceCollection
-
contains
- Specified by:
contains
in interfaceCollection
- Specified by:
contains
in interfaceDeque
- Specified by:
contains
in interfaceList
- Overrides:
contains
in classLinkedList
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection
- Specified by:
isEmpty
in interfaceList
- Overrides:
isEmpty
in classAbstractCollection
-
size
public int size()- Specified by:
size
in interfaceCollection
- Specified by:
size
in interfaceDeque
- Specified by:
size
in interfaceList
- Overrides:
size
in classLinkedList
-
offerFirst
- Specified by:
offerFirst
in interfaceDeque
- Overrides:
offerFirst
in classLinkedList
-
offerLast
- Specified by:
offerLast
in interfaceDeque
- Overrides:
offerLast
in classLinkedList
-
pollFirst
- Specified by:
pollFirst
in interfaceDeque
- Overrides:
pollFirst
in classLinkedList
-
pollLast
- Specified by:
pollLast
in interfaceDeque
- Overrides:
pollLast
in classLinkedList
-
getFirst
- Specified by:
getFirst
in interfaceDeque
- Overrides:
getFirst
in classLinkedList
-
getLast
- Specified by:
getLast
in interfaceDeque
- Overrides:
getLast
in classLinkedList
-
peekFirst
- Specified by:
peekFirst
in interfaceDeque
- Overrides:
peekFirst
in classLinkedList
-
peekLast
- Specified by:
peekLast
in interfaceDeque
- Overrides:
peekLast
in classLinkedList
-
element
-
peek
-
push
- Specified by:
push
in interfaceDeque
- Overrides:
push
in classLinkedList
-
pop
- Specified by:
pop
in interfaceDeque
- Overrides:
pop
in classLinkedList
-
descendingIterator
- Specified by:
descendingIterator
in interfaceDeque
- Overrides:
descendingIterator
in classLinkedList
-