Package com.storedobject.core
Class ObjectMemoryList<T extends StoredObject>
java.lang.Object
com.storedobject.core.MemoryCache<T>
com.storedobject.core.ObjectMemoryList<T>
- All Implemented Interfaces:
- Filtered<T>,- FilterMethods<T>,- ObjectList<T>,- ObjectLoader<T>,- Iterable<T>,- Collection<T>,- List<T>,- SequencedCollection<T>
public class ObjectMemoryList<T extends StoredObject>
extends MemoryCache<T>
implements ObjectList<T>
- 
Constructor SummaryConstructorsConstructorDescriptionObjectMemoryList(Class<T> objectClass) ObjectMemoryList(Class<T> objectClass, boolean any) ObjectMemoryList(Class<T> objectClass, ObjectIterator<T> objects) ObjectMemoryList(Class<T> objectClass, Query query) ObjectMemoryList(Class<T> objectClass, Query query, boolean any) ObjectMemoryList(Class<T> objectClass, Iterable<Id> idList) ObjectMemoryList(Class<T> objectClass, String condition) ObjectMemoryList(Class<T> objectClass, String condition, boolean any) ObjectMemoryList(Class<T> objectClass, String condition, String orderedBy) ObjectMemoryList(Class<T> objectClass, String condition, String orderedBy, boolean any) ObjectMemoryList(Class<T> objectClass, Stream<T> objects) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidbooleanbooleanbooleanaddAll(int index, Collection<? extends T> collection) booleanaddAll(Collection<? extends T> collection) voidThis method is called whenever a filter predicate is changed.intGet the load filter.The class of the instances.intvoidload(int linkType, StoredObject master, String condition, boolean any) Load the links of the given "master" instance.voidload(ObjectIterator<T> objects) Load the given instances.voidLoad the instances created from the query.voidLoad the instances created from the list ofIds.voidLoad the instances.voidLoad the given instances.voidrefresh()voidvoidsetProcessor(Consumer<T> processor) Methods inherited from class com.storedobject.core.MemoryCacheclear, close, contains, containsAll, filter, filter, get, getComparator, getFilter, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, order, remove, remove, removeAll, removeIf, retainAll, set, size, size, sizeAll, sort, stream, streamAll, subList, toArray, toArrayMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.CollectionparallelStream, removeIf, stream, toArrayMethods inherited from interface com.storedobject.core.Filteredfilter, filter, getComparator, getFilter, order, size, size, sizeAll, stream, streamAllMethods inherited from interface com.storedobject.core.FilterMethodsgetEffectiveCondition, getFilterCondition, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setLoadFilter, setLoadFilter, setViewFilter, setViewFilterMethods inherited from interface java.util.ListaddFirst, addLast, contains, containsAll, equals, get, getFirst, getLast, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, set, size, sort, spliterator, subList, toArray, toArrayMethods inherited from interface com.storedobject.core.ObjectListclear, close, idStream, idStreamAll, isEmptyMethods inherited from interface com.storedobject.core.ObjectLoaderapplyFilter, canContain, getAllowAny, getLinkType, getMaster, getOrderBy, isAllowAny, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, reload, setLinkType, setLinkType, setMaster, setMaster, setOrderBy, setOrderBy, size
- 
Constructor Details- 
ObjectMemoryList
- 
ObjectMemoryList
- 
ObjectMemoryList
- 
ObjectMemoryList
- 
ObjectMemoryList
- 
ObjectMemoryList
- 
ObjectMemoryList
- 
ObjectMemoryList
- 
ObjectMemoryList
- 
ObjectMemoryList
- 
ObjectMemoryList
 
- 
- 
Method Details- 
loadDescription copied from interface:ObjectLoaderLoad the instances. Current "load filter" if set will be applied. If "master" is already set, "links" of the "master" will be loaded.- Specified by:
- loadin interface- ObjectLoader<T extends StoredObject>
- Parameters:
- condition- Filtering condition to be applied.
- orderedBy- "ORDER BY" clause to use while loading.
- any- Whether instanced of the subclasses to be retrieved or not.
 
- 
loadDescription copied from interface:ObjectLoaderLoad the links of the given "master" instance. Current "load filter" if set will be applied. The order will be determined by the return value ofObjectLoader.getOrderBy().- Specified by:
- loadin interface- ObjectLoader<T extends StoredObject>
- Parameters:
- linkType- Link type.
- master- Master instance.
- condition- Filtering condition to be applied.
- any- Whether instanced of the subclasses to be retrieved or not.
 
- 
loadDescription copied from interface:ObjectLoaderLoad the instances created from the query. Current "load filter" if set will be applied. However,ObjectLoader.getOrderBy()result will be ignored.- Specified by:
- loadin interface- ObjectLoader<T extends StoredObject>
- Parameters:
- query- Query from which objects to be loaded.
- any- Whether instanced of the subclasses to be retrieved or not.
 
- 
loadDescription copied from interface:ObjectLoaderLoad the instances created from the list ofIds. Current "load filter" if set will be applied. However,ObjectLoader.getOrderBy()result will be ignored. Also, the value returned byObjectLoader.getAllowAny()will determine whether instanced of the subclasses to be restricted or not.- Specified by:
- loadin interface- ObjectLoader<T extends StoredObject>
- Parameters:
- idList- List of- Ids from which objects to be loaded.
 
- 
loadDescription copied from interface:ObjectLoaderLoad the given instances. Current "load filter" if set will be applied. However,ObjectLoader.getOrderBy()result will be ignored. Also, the value returned byObjectLoader.getAllowAny()will determine whether instanced of the subclasses to be restricted or not.- Specified by:
- loadin interface- ObjectLoader<T extends StoredObject>
- Parameters:
- objects- Objects to be loaded.
 
- 
loadDescription copied from interface:ObjectLoaderLoad the given instances. Current "load filter" if set will be applied. However,ObjectLoader.getOrderBy()result will be ignored. Also, the value returned byObjectLoader.getAllowAny()will determine whether instanced of the subclasses to be restricted or not.- Specified by:
- loadin interface- ObjectLoader<T extends StoredObject>
- Parameters:
- objects- Objects to be loaded.
 
- 
applyFilterPredicatepublic void applyFilterPredicate()Description copied from interface:FilterMethodsThis method is called whenever a filter predicate is changed. Methods with default implementation already invoke this method. If any of those methods are overridden, make sure that it invokes this method so that logic to handle filter changes can be coded here.Note: This method is used to show the filtered result of the existing entries - Specified by:
- applyFilterPredicatein interface- FilterMethods<T extends StoredObject>
 
- 
getLoadFilterDescription copied from interface:FilterMethodsGet the load filter.- Specified by:
- getLoadFilterin interface- FilterMethods<T extends StoredObject>
- Returns:
- Current load filter.
 
- 
getObjectClassDescription copied from interface:ObjectLoaderThe class of the instances.- Specified by:
- getObjectClassin interface- ObjectLoader<T extends StoredObject>
- Returns:
- The class of the instances to load.
 
- 
add- Specified by:
- addin interface- ObjectList<T extends StoredObject>
 
- 
indexOf- Specified by:
- indexOfin interface- ObjectList<T extends StoredObject>
 
- 
refreshpublic void refresh()- Specified by:
- refreshin interface- ObjectList<T extends StoredObject>
 
- 
refresh- Specified by:
- refreshin interface- ObjectList<T extends StoredObject>
 
- 
refresh- Specified by:
- refreshin interface- ObjectList<T extends StoredObject>
 
- 
getCacheLevelpublic int getCacheLevel()- Specified by:
- getCacheLevelin interface- ObjectList<T extends StoredObject>
 
- 
setLoader
- 
getLoader
- 
add- Specified by:
- addin interface- Collection<T extends StoredObject>
- Specified by:
- addin interface- List<T extends StoredObject>
- Overrides:
- addin class- MemoryCache<T extends StoredObject>
 
- 
add- Specified by:
- addin interface- List<T extends StoredObject>
- Overrides:
- addin class- MemoryCache<T extends StoredObject>
 
- 
addAll- Specified by:
- addAllin interface- Collection<T extends StoredObject>
- Specified by:
- addAllin interface- List<T extends StoredObject>
- Overrides:
- addAllin class- MemoryCache<T extends StoredObject>
 
- 
addAll- Specified by:
- addAllin interface- List<T extends StoredObject>
- Overrides:
- addAllin class- MemoryCache<T extends StoredObject>
 
- 
setProcessor- Specified by:
- setProcessorin interface- ObjectList<T extends StoredObject>
 
 
-