Class DelayedVectorProxy
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
java.util.Vector
org.apache.openjpa.util.proxy.DelayedVectorProxy
- All Implemented Interfaces:
Serializable, Cloneable, Iterable, Collection, List, RandomAccess, Proxy, DelayedProxy, ProxyCollection
Vector 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 Vector
capacityIncrement, elementCount, elementDataFields inherited from class AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionDelayedVectorProxy(int paramInt) DelayedVectorProxy(int paramInt1, int paramInt2) DelayedVectorProxy(Collection paramCollection) -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int paramInt, Collection paramCollection) booleanaddAll(Collection paramCollection) voidaddElement(Object paramObject) voidvoidintcapacity()voidclear()clone()voidClose the broker that is used to service this proxy.booleanbooleancontainsAll(Collection collection) Return an unproxied copy of the given instance.voidelementAt(int index) elements()voidensureCapacity(int minCapacity) booleanget(int location) 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()intintvoidinsertElementAt(Object paramObject, int paramInt) booleanbooleanReturns whether the proxy is detached.booleanReturns whether the caller has direct-call access to the proxied object.booleanisEmpty()iterator()intlastIndexOf(Object object) intlastIndexOf(Object o, int index) listIterator(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.remove(int paramInt) booleanbooleanremoveAll(Collection paramCollection) voidbooleanremoveElement(Object paramObject) voidremoveElementAt(int paramInt) protected voidremoveRange(int fromIndex, int toIndex) booleanretainAll(Collection paramCollection) reversed()protected voidvoidsetDirectAccess(boolean direct) Sets whether the caller has direct-call access to the proxied object.voidsetElementAt(Object paramObject, int paramInt) 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.voidsetSize(int paramInt) intsize()subList(int start, int end) Object[]toArray()Object[]Object[]toArray(IntFunction generator) toString()voidprotected ObjectMethods inherited from class Vector
forEach, removeIf, replaceAll, sort, spliteratorMethods inherited from interface Collection
parallelStream, removeIf, stream
-
Constructor Details
-
DelayedVectorProxy
public DelayedVectorProxy(int paramInt) -
DelayedVectorProxy
public DelayedVectorProxy() -
DelayedVectorProxy
-
DelayedVectorProxy
public DelayedVectorProxy(int paramInt1, int paramInt2)
-
-
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. -
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
-
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
-
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
-
getChangeTracker
Description copied from interface:ProxyReturn the change tracker for this proxy, or null if none.- Specified by:
getChangeTrackerin interfaceProxy
-
setChangeTracker
-
copy
-
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
-
add
-
add
-
clear
-
addAll
-
addAll
-
addElement
- Overrides:
addElementin classVector
-
remove
-
remove
-
set
-
removeAll
-
retainAll
-
insertElementAt
- Overrides:
insertElementAtin classVector
-
removeAllElements
public void removeAllElements()- Overrides:
removeAllElementsin classVector
-
removeElement
- Overrides:
removeElementin classVector
-
removeElementAt
public void removeElementAt(int paramInt) - Overrides:
removeElementAtin classVector
-
setElementAt
- Overrides:
setElementAtin classVector
-
iterator
-
listIterator
- Specified by:
listIteratorin interfaceList- Overrides:
listIteratorin classVector
-
listIterator
- Specified by:
listIteratorin interfaceList- Overrides:
listIteratorin classVector
-
setSize
-
writeReplace
- Throws:
ObjectStreamException
-
contains
-
containsAll
- Specified by:
containsAllin interfaceCollection- Specified by:
containsAllin interfaceList- Overrides:
containsAllin classVector
-
isEmpty
-
size
-
toArray
-
toArray
-
toArray
- Specified by:
toArrayin interfaceCollection
-
equals
-
hashCode
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList- Overrides:
lastIndexOfin classVector
-
subList
-
get
-
indexOf
-
indexOf
-
copyInto
-
trimToSize
public void trimToSize()- Overrides:
trimToSizein classVector
-
ensureCapacity
public void ensureCapacity(int minCapacity) - Overrides:
ensureCapacityin classVector
-
capacity
-
elements
-
lastIndexOf
- Overrides:
lastIndexOfin classVector
-
elementAt
-
firstElement
- Overrides:
firstElementin classVector
-
lastElement
- Overrides:
lastElementin classVector
-
toString
-
removeRange
protected void removeRange(int fromIndex, int toIndex) - Overrides:
removeRangein classVector
-
getFirst
-
getLast
-
addFirst
-
addLast
-
removeFirst
-
removeLast
-
reversed
-