Class CollectionProxy<U,T extends Collection<U>>
- java.lang.Object
-
- org.hibernate.envers.internal.entities.mapper.relation.lazy.proxy.CollectionProxy<U,T>
-
- All Implemented Interfaces:
Serializable
,Iterable<U>
,Collection<U>
,LazyInitializable
- Direct Known Subclasses:
ListProxy
,SetProxy
,SortedSetProxy
public abstract class CollectionProxy<U,T extends Collection<U>> extends Object implements Collection<U>, LazyInitializable, Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CollectionProxy()
CollectionProxy(Initializor<T> initializor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(U o)
boolean
addAll(Collection<? extends U> c)
protected void
checkInit()
void
clear()
boolean
contains(Object o)
boolean
containsAll(Collection<?> c)
boolean
equals(Object obj)
void
forceInitialization()
To be called internally by the session, forcing immediate initialization.int
hashCode()
boolean
isEmpty()
Iterator<U>
iterator()
boolean
remove(Object o)
boolean
removeAll(Collection<?> c)
boolean
retainAll(Collection<?> c)
int
size()
Object[]
toArray()
<V> V[]
toArray(V[] a)
String
toString()
boolean
wasInitialized()
Is this instance initialized?-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
Field Detail
-
delegate
protected T extends Collection<U> delegate
-
-
Constructor Detail
-
CollectionProxy
protected CollectionProxy()
-
CollectionProxy
public CollectionProxy(Initializor<T> initializor)
-
-
Method Detail
-
checkInit
protected void checkInit()
-
wasInitialized
public final boolean wasInitialized()
Description copied from interface:LazyInitializable
Is this instance initialized?- Specified by:
wasInitialized
in interfaceLazyInitializable
- Returns:
- Was this collection initialized? Or is its data still not (fully) loaded?
- See Also:
Hibernate.isInitialized(Object)
-
forceInitialization
public final void forceInitialization()
Description copied from interface:LazyInitializable
To be called internally by the session, forcing immediate initialization.- Specified by:
forceInitialization
in interfaceLazyInitializable
- See Also:
Hibernate.initialize(Object)
-
size
public int size()
- Specified by:
size
in interfaceCollection<U>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<U>
-
contains
public boolean contains(Object o)
- Specified by:
contains
in interfaceCollection<U>
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceCollection<U>
-
toArray
public <V> V[] toArray(V[] a)
- Specified by:
toArray
in interfaceCollection<U>
-
add
public boolean add(U o)
- Specified by:
add
in interfaceCollection<U>
-
remove
public boolean remove(Object o)
- Specified by:
remove
in interfaceCollection<U>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll
in interfaceCollection<U>
-
addAll
public boolean addAll(Collection<? extends U> c)
- Specified by:
addAll
in interfaceCollection<U>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll
in interfaceCollection<U>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAll
in interfaceCollection<U>
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<U>
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceCollection<U>
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceCollection<U>
- Overrides:
hashCode
in classObject
-
-