org.compass.core.converter.mapping.osem.collection
Class LazyReferenceSet
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet
org.compass.core.converter.mapping.osem.collection.LazyReferenceSet
- All Implemented Interfaces:
- Iterable, Collection, Set, LazyReferenceCollection
public class LazyReferenceSet
- extends AbstractSet
- implements LazyReferenceCollection
A lazy reference set. If no dirty operations are perfomed, will lazily load references from the
search engine. Once a dirty operation is perfomed, will loadFully()
, and then all operations
will be perfoemd on the loaded list.
- Author:
- kimchy
LazyReferenceSet
public LazyReferenceSet(InternalCompassSession session,
int size,
AbstractCollectionMapping.CollectionType collectionType)
addLazyEntry
public void addLazyEntry(LazyReferenceEntry entry)
- Description copied from interface:
LazyReferenceCollection
- Internally used to initialize the lazy collection.
- Specified by:
addLazyEntry
in interface LazyReferenceCollection
iterator
public Iterator iterator()
- Specified by:
iterator
in interface Iterable
- Specified by:
iterator
in interface Collection
- Specified by:
iterator
in interface Set
- Specified by:
iterator
in class AbstractCollection
size
public int size()
- Specified by:
size
in interface Collection
- Specified by:
size
in interface Set
- Specified by:
size
in class AbstractCollection
add
public boolean add(Object o)
- Specified by:
add
in interface Collection
- Specified by:
add
in interface Set
- Overrides:
add
in class AbstractCollection
remove
public boolean remove(Object o)
- Specified by:
remove
in interface Collection
- Specified by:
remove
in interface Set
- Overrides:
remove
in class AbstractCollection
removeAll
public boolean removeAll(Collection c)
- Specified by:
removeAll
in interface Collection
- Specified by:
removeAll
in interface Set
- Overrides:
removeAll
in class AbstractSet
contains
public boolean contains(Object o)
- Specified by:
contains
in interface Collection
- Specified by:
contains
in interface Set
- Overrides:
contains
in class AbstractCollection
addAll
public boolean addAll(Collection c)
- Specified by:
addAll
in interface Collection
- Specified by:
addAll
in interface Set
- Overrides:
addAll
in class AbstractCollection
clear
public void clear()
- Specified by:
clear
in interface Collection
- Specified by:
clear
in interface Set
- Overrides:
clear
in class AbstractCollection
isFullyLoaded
public boolean isFullyLoaded()
- Description copied from interface:
LazyReferenceCollection
- Returns
true
if the collection is fully loaded from the index.
- Specified by:
isFullyLoaded
in interface LazyReferenceCollection
loadFully
public void loadFully()
- Description copied from interface:
LazyReferenceCollection
- Loads all the referneced objects into memory from the search engine.
- Specified by:
loadFully
in interface LazyReferenceCollection
Copyright (c) 2004-2008 The Compass Project.