Package cz.cvut.kbss.jopa.proxy.lazy
Class LazyLoadingSetProxy<O,E> 
java.lang.Object
cz.cvut.kbss.jopa.proxy.lazy.LazyLoadingSetProxy<O,E> 
- All Implemented Interfaces:
- LazyLoadingProxy<Set<E>>,- Iterable<E>,- Collection<E>,- Set<E>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final FieldSpecification<? super O,Set<E>> protected final Oprotected final UnitOfWork
- 
Constructor SummaryConstructorsConstructorDescriptionLazyLoadingSetProxy(O owner, FieldSpecification<? super O, Set<E>> fieldSpec, UnitOfWork persistenceContext) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends E> c) voidclear()booleanbooleancontainsAll(Collection<?> c) If this proxy has already been loaded, this method returns the loaded value.booleanisEmpty()booleanisLoaded()Checks whether this proxy has already been loaded.iterator()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()Object[]toArray()<ET> ET[]toArray(ET[] a) toString()Triggers value loading.unwrap()Gets a value that should be used to replace this proxy outside a persistence context.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.CollectionparallelStream, removeIf, stream, toArray
- 
Field Details- 
owner
- 
fieldSpec
- 
persistenceContext
 
- 
- 
Constructor Details- 
LazyLoadingSetProxypublic LazyLoadingSetProxy(O owner, FieldSpecification<? super O, Set<E>> fieldSpec, UnitOfWork persistenceContext) 
 
- 
- 
Method Details- 
unwrapDescription copied from interface:LazyLoadingProxyGets a value that should be used to replace this proxy outside a persistence context.- Specified by:
- unwrapin interface- LazyLoadingProxy<O>
- Returns:
- Default value to replace this proxy with
 
- 
triggerLazyLoadingDescription copied from interface:LazyLoadingProxyTriggers value loading.- Specified by:
- triggerLazyLoadingin interface- LazyLoadingProxy<O>
- Returns:
- Loaded value
 
- 
isLoadedpublic boolean isLoaded()Description copied from interface:LazyLoadingProxyChecks whether this proxy has already been loaded.- Specified by:
- isLoadedin interface- LazyLoadingProxy<O>
- Returns:
- trueif this proxy has been loaded,- falseotherwise
 
- 
getLoadedValueDescription copied from interface:LazyLoadingProxyIf this proxy has already been loaded, this method returns the loaded value.- Specified by:
- getLoadedValuein interface- LazyLoadingProxy<O>
- Returns:
- The loaded value, nullif this proxy has not been loaded, yet
- See Also:
 
- 
sizepublic int size()- Specified by:
- sizein interface- Collection<O>
 
- 
isEmptypublic boolean isEmpty()- Specified by:
- isEmptyin interface- Collection<O>
 
- 
contains- Specified by:
- containsin interface- Collection<O>
 
- 
iterator- Specified by:
- iteratorin interface- Collection<O>
- Specified by:
- iteratorin interface- Iterable<O>
 
- 
toArray- Specified by:
- toArrayin interface- Collection<O>
 
- 
toArraypublic <ET> ET[] toArray(ET[] a) - Specified by:
- toArrayin interface- Collection<O>
 
- 
add- Specified by:
- addin interface- Collection<O>
 
- 
remove- Specified by:
- removein interface- Collection<O>
 
- 
containsAll- Specified by:
- containsAllin interface- Collection<O>
 
- 
addAll- Specified by:
- addAllin interface- Collection<O>
 
- 
removeAll- Specified by:
- removeAllin interface- Collection<O>
 
- 
retainAll- Specified by:
- retainAllin interface- Collection<O>
 
- 
clearpublic void clear()- Specified by:
- clearin interface- Collection<O>
 
- 
toString
 
-