Package org.apache.openjpa.util.proxy
Class DelayedLinkedHashSetProxy
- java.lang.Object
- 
- java.util.AbstractCollection<E>
- 
- java.util.AbstractSet<E>
- 
- java.util.HashSet<E>
- 
- java.util.LinkedHashSet
- 
- org.apache.openjpa.util.proxy.DelayedLinkedHashSetProxy
 
 
 
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Cloneable,- java.lang.Iterable,- java.util.Collection,- java.util.Set,- Proxy,- DelayedProxy,- ProxyCollection
 
 public class DelayedLinkedHashSetProxy extends java.util.LinkedHashSet implements DelayedProxy, ProxyCollection LinkedHashSet 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:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description DelayedLinkedHashSetProxy()DelayedLinkedHashSetProxy(int paramInt)DelayedLinkedHashSetProxy(int paramInt, float paramFloat)DelayedLinkedHashSetProxy(java.util.Collection<?> paramCollection)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(java.lang.Object paramObject)booleanaddAll(java.util.Collection paramCollection)voidclear()java.lang.Objectclone()voidcloseBroker()Close the broker that is used to service this proxy.booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection c)java.lang.Objectcopy(java.lang.Object paramObject)Return an unproxied copy of the given instance.booleanequals(java.lang.Object paramObject)BrokergetBroker()Get the broker that is used to service this proxy.BrokerFactorygetBrokerFactory()ChangeTrackergetChangeTracker()Return the change tracker for this proxy, or null if none.intgetDelayedField()Returns the expected field index even if this collection was detached.OpenJPAStateManagergetDelayedOwner()Returns a state manager that can service this proxy even if the collection was detached.java.lang.ClassgetElementType()The collection element type.OpenJPAStateManagergetOwner()Return the owning object.intgetOwnerField()Return the owning field index.OpenJPAStateManagergetOwnerStateManager()Returns the state manager of the owning instance.inthashCode()protected booleanisDelayLoad()booleanisDetached()Returns whether the proxy is detached.booleanisDirectAccess()Returns whether the caller has direct-call access to the proxied object.booleanisEmpty()java.util.Iteratoriterator()voidload()Load the proxy if it was delay-loaded.ProxyCollectionnewInstance(java.lang.Class paramClass, java.util.Comparator paramComparator, boolean paramBoolean1, boolean paramBoolean2)Create a new instance of this proxy type.booleanremove(java.lang.Object paramObject)booleanremoveAll(java.util.Collection paramCollection)booleanretainAll(java.util.Collection paramCollection)protected voidsetChangeTracker(CollectionChangeTracker ct)voidsetDirectAccess(boolean direct)Sets whether the caller has direct-call access to the proxied object.protected voidsetElementType(java.lang.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()java.lang.Object[]toArray()java.lang.Object[]toArray(java.lang.Object[] a)java.lang.Object[]toArray(java.util.function.IntFunction generator)java.lang.StringtoString()protected java.lang.ObjectwriteReplace()
 
- 
- 
- 
Constructor Detail- 
DelayedLinkedHashSetProxypublic DelayedLinkedHashSetProxy(java.util.Collection<?> paramCollection) 
 - 
DelayedLinkedHashSetProxypublic DelayedLinkedHashSetProxy(int paramInt, float paramFloat)
 - 
DelayedLinkedHashSetProxypublic DelayedLinkedHashSetProxy(int paramInt) 
 - 
DelayedLinkedHashSetProxypublic DelayedLinkedHashSetProxy() 
 
- 
 - 
Method Detail- 
setOwnerpublic void setOwner(OpenJPAStateManager paramOpenJPAStateManager, int paramInt) 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.
 - 
getOwnerpublic OpenJPAStateManager getOwner() Description copied from interface:ProxyReturn the owning object.
 - 
getOwnerFieldpublic int getOwnerField() Description copied from interface:ProxyReturn the owning field index.- Specified by:
- getOwnerFieldin interface- Proxy
 
 - 
getChangeTrackerpublic ChangeTracker getChangeTracker() Description copied from interface:ProxyReturn the change tracker for this proxy, or null if none.- Specified by:
- getChangeTrackerin interface- Proxy
 
 - 
setChangeTrackerprotected void setChangeTracker(CollectionChangeTracker ct) 
 - 
copypublic java.lang.Object copy(java.lang.Object paramObject) 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.
 - 
getElementTypepublic java.lang.Class getElementType() Description copied from interface:ProxyCollectionThe collection element type.- Specified by:
- getElementTypein interface- ProxyCollection
 
 - 
setElementTypeprotected void setElementType(java.lang.Class<?> elemType) 
 - 
newInstancepublic ProxyCollection newInstance(java.lang.Class paramClass, java.util.Comparator paramComparator, boolean paramBoolean1, boolean paramBoolean2) Description copied from interface:ProxyCollectionCreate a new instance of this proxy type.- Specified by:
- newInstancein interface- ProxyCollection
 
 - 
clonepublic java.lang.Object clone() - Overrides:
- clonein class- java.util.HashSet
 
 - 
addpublic boolean add(java.lang.Object paramObject) - Specified by:
- addin interface- java.util.Collection
- Specified by:
- addin interface- java.util.Set
- Overrides:
- addin class- java.util.HashSet
 
 - 
clearpublic void clear() - Specified by:
- clearin interface- java.util.Collection
- Specified by:
- clearin interface- java.util.Set
- Overrides:
- clearin class- java.util.HashSet
 
 - 
iteratorpublic java.util.Iterator iterator() - Specified by:
- iteratorin interface- java.util.Collection
- Specified by:
- iteratorin interface- java.lang.Iterable
- Specified by:
- iteratorin interface- java.util.Set
- Overrides:
- iteratorin class- java.util.HashSet
 
 - 
removepublic boolean remove(java.lang.Object paramObject) - Specified by:
- removein interface- java.util.Collection
- Specified by:
- removein interface- java.util.Set
- Overrides:
- removein class- java.util.HashSet
 
 - 
removeAllpublic boolean removeAll(java.util.Collection paramCollection) - Specified by:
- removeAllin interface- java.util.Collection
- Specified by:
- removeAllin interface- java.util.Set
- Overrides:
- removeAllin class- java.util.AbstractSet
 
 - 
addAllpublic boolean addAll(java.util.Collection paramCollection) - Specified by:
- addAllin interface- java.util.Collection
- Specified by:
- addAllin interface- java.util.Set
- Overrides:
- addAllin class- java.util.AbstractCollection
 
 - 
retainAllpublic boolean retainAll(java.util.Collection paramCollection) - Specified by:
- retainAllin interface- java.util.Collection
- Specified by:
- retainAllin interface- java.util.Set
- Overrides:
- retainAllin class- java.util.AbstractCollection
 
 - 
writeReplaceprotected java.lang.Object writeReplace() throws java.io.ObjectStreamException- Throws:
- java.io.ObjectStreamException
 
 - 
sizepublic int size() - Specified by:
- sizein interface- java.util.Collection
- Specified by:
- sizein interface- java.util.Set
- Overrides:
- sizein class- java.util.HashSet
 
 - 
isEmptypublic boolean isEmpty() - Specified by:
- isEmptyin interface- java.util.Collection
- Specified by:
- isEmptyin interface- java.util.Set
- Overrides:
- isEmptyin class- java.util.HashSet
 
 - 
containspublic boolean contains(java.lang.Object o) - Specified by:
- containsin interface- java.util.Collection
- Specified by:
- containsin interface- java.util.Set
- Overrides:
- containsin class- java.util.HashSet
 
 - 
toArraypublic java.lang.Object[] toArray() - Specified by:
- toArrayin interface- java.util.Collection
- Specified by:
- toArrayin interface- java.util.Set
- Overrides:
- toArrayin class- java.util.AbstractCollection
 
 - 
toArraypublic java.lang.Object[] toArray(java.lang.Object[] a) - Specified by:
- toArrayin interface- java.util.Collection
- Specified by:
- toArrayin interface- java.util.Set
- Overrides:
- toArrayin class- java.util.AbstractCollection
 
 - 
toArraypublic java.lang.Object[] toArray(java.util.function.IntFunction generator) - Specified by:
- toArrayin interface- java.util.Collection
 
 - 
containsAllpublic boolean containsAll(java.util.Collection c) - Specified by:
- containsAllin interface- java.util.Collection
- Specified by:
- containsAllin interface- java.util.Set
- Overrides:
- containsAllin class- java.util.AbstractCollection
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.util.AbstractCollection
 
 - 
equalspublic boolean equals(java.lang.Object paramObject) - Specified by:
- equalsin interface- java.util.Collection
- Specified by:
- equalsin interface- java.util.Set
- Overrides:
- equalsin class- java.util.AbstractSet
 
 - 
hashCodepublic int hashCode() - Specified by:
- hashCodein interface- java.util.Collection
- Specified by:
- hashCodein interface- java.util.Set
- Overrides:
- hashCodein class- java.util.AbstractSet
 
 - 
getDelayedFieldpublic int getDelayedField() Description copied from interface:DelayedProxyReturns the expected field index even if this collection was detached.- Specified by:
- getDelayedFieldin interface- DelayedProxy
 
 - 
getDelayedOwnerpublic OpenJPAStateManager getDelayedOwner() Description copied from interface:DelayedProxyReturns a state manager that can service this proxy even if the collection was detached.- Specified by:
- getDelayedOwnerin interface- DelayedProxy
 
 - 
isDirectAccesspublic 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 interface- DelayedProxy
 
 - 
setDirectAccesspublic 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 interface- DelayedProxy
 
 - 
getBrokerFactorypublic BrokerFactory getBrokerFactory() 
 - 
loadpublic void load() Description copied from interface:DelayedProxyLoad the proxy if it was delay-loaded.- Specified by:
- loadin interface- DelayedProxy
 
 - 
getBrokerpublic Broker getBroker() Description copied from interface:DelayedProxyGet the broker that is used to service this proxy.- Specified by:
- getBrokerin interface- DelayedProxy
 
 - 
closeBrokerpublic void closeBroker() Description copied from interface:DelayedProxyClose the broker that is used to service this proxy.- Specified by:
- closeBrokerin interface- DelayedProxy
 
 - 
getOwnerStateManagerpublic OpenJPAStateManager getOwnerStateManager() Description copied from interface:DelayedProxyReturns the state manager of the owning instance.- Specified by:
- getOwnerStateManagerin interface- DelayedProxy
 
 - 
isDetachedpublic boolean isDetached() Description copied from interface:DelayedProxyReturns whether the proxy is detached.- Specified by:
- isDetachedin interface- DelayedProxy
 
 - 
isDelayLoadprotected boolean isDelayLoad() 
 
- 
 
-