Class OObjectLazySet<TYPE>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.HashSet<TYPE>
com.orientechnologies.orient.object.db.OObjectLazySet<TYPE>
- All Implemented Interfaces:
OLazyObjectSetInterface<TYPE>,OObjectLazyMultivalueElement<Set<TYPE>>,Serializable,Cloneable,Iterable<TYPE>,Collection<TYPE>,Set<TYPE>
public class OObjectLazySet<TYPE>
extends HashSet<TYPE>
implements OLazyObjectSetInterface<TYPE>, OObjectLazyMultivalueElement<Set<TYPE>>, Serializable
Lazy implementation of Set. It's bound to a source ORecord object to keep track of changes. This
avoid to call the makeDirty() by hand when the set is changed.
- Author:
- Luca Molino (molino.luca--at--gmail.com)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOObjectLazySet(Object iSourceRecord, Set<OIdentifiable> iRecordSource, boolean orphanRemoval) OObjectLazySet(Object iSourceRecord, Set<OIdentifiable> iRecordSource, Set<? extends TYPE> iSourceCollection, boolean orphanRemoval) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends TYPE> c) voidclear()booleanbooleancontainsAll(Collection<?> c) protected voidprotected voidprotected voidconvertAndDetachAll(boolean nonProxiedInstance, Map<Object, Object> alreadyDetached, Map<Object, Object> lazyObjects) voiddetach()voiddetach(boolean nonProxiedInstance) voiddetachAll(boolean nonProxiedInstance, Map<Object, Object> alreadyDetached, Map<Object, Object> lazyObjects) protected OObjectDatabaseTxbooleanbooleanbooleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) voidsetConvertToRecord(boolean convertToRecord) voidsetDirty()setFetchPlan(String fetchPlan) intsize()Object[]toArray()<T> T[]toArray(T[] a) toString()Methods inherited from class java.util.HashSet
clone, spliteratorMethods inherited from class java.util.AbstractSet
equals, hashCodeMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
equals, hashCode, spliterator
-
Constructor Details
-
OObjectLazySet
public OObjectLazySet(Object iSourceRecord, Set<OIdentifiable> iRecordSource, boolean orphanRemoval) -
OObjectLazySet
public OObjectLazySet(Object iSourceRecord, Set<OIdentifiable> iRecordSource, Set<? extends TYPE> iSourceCollection, boolean orphanRemoval)
-
-
Method Details
-
iterator
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
toArray
-
toArray
public <T> T[] toArray(T[] a) -
add
-
remove
-
containsAll
- Specified by:
containsAllin interfaceCollection<TYPE>- Specified by:
containsAllin interfaceSet<TYPE>- Overrides:
containsAllin classAbstractCollection<TYPE>
-
addAll
- Specified by:
addAllin interfaceCollection<TYPE>- Specified by:
addAllin interfaceSet<TYPE>- Overrides:
addAllin classAbstractCollection<TYPE>
-
retainAll
- Specified by:
retainAllin interfaceCollection<TYPE>- Specified by:
retainAllin interfaceSet<TYPE>- Overrides:
retainAllin classAbstractCollection<TYPE>
-
clear
public void clear() -
removeAll
- Specified by:
removeAllin interfaceCollection<TYPE>- Specified by:
removeAllin interfaceSet<TYPE>- Overrides:
removeAllin classAbstractSet<TYPE>
-
getFetchPlan
-
isConverted
public boolean isConverted()- Specified by:
isConvertedin interfaceOLazyObjectSetInterface<TYPE>
-
setFetchPlan
-
isConvertToRecord
public boolean isConvertToRecord() -
setConvertToRecord
public void setConvertToRecord(boolean convertToRecord) - Specified by:
setConvertToRecordin interfaceOLazyObjectSetInterface<TYPE>
-
toString
- Overrides:
toStringin classAbstractCollection<TYPE>
-
setDirty
public void setDirty() -
detach
public void detach() -
detach
public void detach(boolean nonProxiedInstance) - Specified by:
detachin interfaceOObjectLazyMultivalueElement<TYPE>
-
detachAll
public void detachAll(boolean nonProxiedInstance, Map<Object, Object> alreadyDetached, Map<Object, Object> lazyObjects) - Specified by:
detachAllin interfaceOObjectLazyMultivalueElement<TYPE>
-
getNonOrientInstance
- Specified by:
getNonOrientInstancein interfaceOObjectLazyMultivalueElement<TYPE>
-
getUnderlying
- Specified by:
getUnderlyingin interfaceOObjectLazyMultivalueElement<TYPE>
-
convertAll
protected void convertAll() -
convertAllInternal
protected void convertAllInternal() -
convertAndDetachAll
-
getDatabase
-