Package org.apache.openjpa.util.proxy
Class DelayedTreeSetProxy
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.TreeSet
org.apache.openjpa.util.proxy.DelayedTreeSetProxy
- All Implemented Interfaces:
Serializable,Cloneable,Iterable,Collection,NavigableSet,Set,SortedSet,Proxy,DelayedProxy,ProxyCollection
TreeSet 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:
-
Constructor Summary
ConstructorsConstructorDescriptionDelayedTreeSetProxy(Collection paramCollection) DelayedTreeSetProxy(Comparator paramComparator) DelayedTreeSetProxy(SortedSet paramSortedSet) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection paramCollection) voidclear()clone()voidClose the broker that is used to service this proxy.booleanbooleanReturn an unproxied copy of the given instance.booleanfirst()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.getOwner()Return the owning object.intReturn the owning field index.Returns the state manager of the owning instance.inthashCode()booleanbooleanReturns whether the proxy is detached.booleanReturns whether the caller has direct-call access to the proxied object.booleanisEmpty()iterator()last()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.pollLast()booleanbooleanremoveAll(Collection paramCollection) 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()Object[]toArray()Object[]Object[]toArray(IntFunction generator) protected ObjectMethods inherited from class java.util.TreeSet
spliteratorMethods 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, stream
-
Constructor Details
-
DelayedTreeSetProxy
public DelayedTreeSetProxy() -
DelayedTreeSetProxy
-
DelayedTreeSetProxy
-
DelayedTreeSetProxy
-
-
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
-
clone
-
writeReplace
- Throws:
ObjectStreamException
-
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() -
clear
public void clear() -
iterator
- Specified by:
iteratorin interfaceCollection- Specified by:
iteratorin interfaceIterable- Specified by:
iteratorin interfaceNavigableSet- Specified by:
iteratorin interfaceSet- Overrides:
iteratorin classTreeSet
-
remove
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
toArray
- Specified by:
toArrayin interfaceCollection- Specified by:
toArrayin interfaceSet- Overrides:
toArrayin classAbstractCollection
-
toArray
- Specified by:
toArrayin interfaceCollection- Specified by:
toArrayin interfaceSet- Overrides:
toArrayin classAbstractCollection
-
toArray
- Specified by:
toArrayin interfaceCollection
-
comparator
- Specified by:
comparatorin interfaceSortedSet- Overrides:
comparatorin classTreeSet
-
first
-
last
-
add
-
containsAll
- Specified by:
containsAllin interfaceCollection- Specified by:
containsAllin interfaceSet- Overrides:
containsAllin classAbstractCollection
-
addAll
-
retainAll
- Specified by:
retainAllin interfaceCollection- Specified by:
retainAllin interfaceSet- Overrides:
retainAllin classAbstractCollection
-
removeAll
- Specified by:
removeAllin interfaceCollection- Specified by:
removeAllin interfaceSet- Overrides:
removeAllin classAbstractSet
-
lower
- Specified by:
lowerin interfaceNavigableSet- Overrides:
lowerin classTreeSet
-
floor
- Specified by:
floorin interfaceNavigableSet- Overrides:
floorin classTreeSet
-
ceiling
- Specified by:
ceilingin interfaceNavigableSet- Overrides:
ceilingin classTreeSet
-
higher
- Specified by:
higherin interfaceNavigableSet- Overrides:
higherin classTreeSet
-
pollFirst
- Specified by:
pollFirstin interfaceNavigableSet- Overrides:
pollFirstin classTreeSet
-
pollLast
- Specified by:
pollLastin interfaceNavigableSet- Overrides:
pollLastin classTreeSet
-
descendingSet
- Specified by:
descendingSetin interfaceNavigableSet- Overrides:
descendingSetin classTreeSet
-
descendingIterator
- Specified by:
descendingIteratorin interfaceNavigableSet- Overrides:
descendingIteratorin classTreeSet
-
subSet
public NavigableSet subSet(Object fromElement, boolean fromInclusive, Object toElement, boolean toInclusive) - Specified by:
subSetin interfaceNavigableSet- Overrides:
subSetin classTreeSet
-
headSet
- Specified by:
headSetin interfaceNavigableSet- Overrides:
headSetin classTreeSet
-
tailSet
- Specified by:
tailSetin interfaceNavigableSet- Overrides:
tailSetin classTreeSet
-
subSet
-
headSet
-
tailSet
-
equals
- Specified by:
equalsin interfaceCollection- Specified by:
equalsin interfaceSet- Overrides:
equalsin classAbstractSet
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection- Specified by:
hashCodein interfaceSet- Overrides:
hashCodein classAbstractSet
-