Package org.castor.persist.proxy
Class LazyHashSet<E>
java.lang.Object
org.castor.persist.proxy.LazyHashSet<E>
- All Implemented Interfaces:
Iterable<E>,Collection<E>,Set<E>,LazyCollection<E>,TxSynchronizable
It is a lazy Collection. The collection initially contains only the
identities of elements of one type. If any element is needed, it will
be fetched "on the fly".
- Version:
- $Revision$ $Date: 2009-07-13 17:22:43 (Mon, 13 Jul 2009) $
- Author:
- Thomas Yip, Werner Guttmann, Ralf Joachim
-
Constructor Summary
ConstructorsConstructorDescriptionLazyHashSet(TransactionContext tx, ClassMolder molder, List<Identity> ids) Creates an instance of LazyHashSet. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends E> collection) voidclear()voidCalled at the end of a transaction after commit.booleanbooleancontainsAll(Collection<?> collection) booleaninthashCode()booleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> collection) booleanretainAll(Collection<?> collection) voidCalled at the end of a transaction after rollback.intsize()Object[]toArray()<A> A[]toArray(A[] array) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
spliterator
-
Constructor Details
-
LazyHashSet
Creates an instance of LazyHashSet.- Parameters:
tx- Current transaction contextmolder- Associated ClassMolderids- Set of identifiers.
-
-
Method Details
-
add
-
addAll
-
clear
public void clear() -
contains
-
containsAll
- Specified by:
containsAllin interfaceCollection<E>- Specified by:
containsAllin interfaceSet<E>
-
isEmpty
public boolean isEmpty() -
iterator
-
remove
-
removeAll
-
retainAll
-
size
public int size() -
toArray
-
toArray
public <A> A[] toArray(A[] array) -
equals
-
hashCode
public int hashCode() -
getIdsList
- Specified by:
getIdsListin interfaceLazyCollection<E>
-
getRemovedIdsList
- Specified by:
getRemovedIdsListin interfaceLazyCollection<E>
-
getAddedEntitiesList
- Specified by:
getAddedEntitiesListin interfaceLazyCollection<E>
-
committed
Description copied from interface:TxSynchronizableCalled at the end of a transaction after commit.- Specified by:
committedin interfaceTxSynchronizable
-
rolledback
Description copied from interface:TxSynchronizableCalled at the end of a transaction after rollback.- Specified by:
rolledbackin interfaceTxSynchronizable
-