Package com.storedobject.ui.util
Class ObjectListLoader<T extends StoredObject>
java.lang.Object
com.storedobject.ui.util.ObjectListLoader<T>
- All Implemented Interfaces:
FilterMethods<T>,ObjectLoader<T>,ObjectLoader<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method is called whenever a filter condition is changed.voidThis method is called whenever a filter predicate is changed.voidclear()Clear - remove all entries.getEffectiveCondition(String condition) Get the "effective" filter condition that must be applied for loading.getList()Get the load filter.The class of the instances.voidload(ObjectIterator<T> objectIterator) Load the given instances.final intsize()Get the instances count.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.core.FilterMethods
getFilterCondition, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setLoadFilter, setLoadFilter, setViewFilter, setViewFilterMethods inherited from interface com.storedobject.core.ObjectLoader
canContain, getAllowAny, getLinkType, getMaster, getOrderBy, isAllowAny, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, reload, setLinkType, setLinkType, setMaster, setMaster, setOrderBy, setOrderByMethods inherited from interface com.storedobject.ui.ObjectLoader
addDataLoadedListener, clear, get, getCacheLevel, getDelegatedLoader, getFixedFilter, getObjectCount, indexOf, setExtraFilter, setExtraFilter, setFilter, setFilter, setFixedFilter, setFixedFilter, setFixedFilter, setFixedFilter, streamAll, streamFiltered
-
Constructor Details
-
ObjectListLoader
-
ObjectListLoader
-
ObjectListLoader
-
-
Method Details
-
getObjectClass
Description copied from interface:ObjectLoaderThe class of the instances.- Specified by:
getObjectClassin interfaceObjectLoader<T extends StoredObject>- Returns:
- The class of the instances to load.
-
getList
-
size
public final int size()Description copied from interface:ObjectLoaderGet the instances count.- Specified by:
sizein interfaceObjectLoader<T extends StoredObject>- Specified by:
sizein interfaceObjectLoader<T extends StoredObject>- Returns:
- Count.
-
load
Description 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 interfaceObjectLoader<T extends StoredObject>- Specified by:
loadin interfaceObjectLoader<T extends StoredObject>- Parameters:
objectIterator- Objects to be loaded.
-
clear
public void clear()Description copied from interface:ObjectLoaderClear - remove all entries.- Specified by:
clearin interfaceObjectLoader<T extends StoredObject>
-
getLoadFilter
Description copied from interface:FilterMethodsGet the load filter.- Specified by:
getLoadFilterin interfaceFilterMethods<T extends StoredObject>- Specified by:
getLoadFilterin interfaceObjectLoader<T extends StoredObject>- Returns:
- Current load filter.
-
applyFilterPredicate
public void applyFilterPredicate()Description copied from interface:FilterMethodsThis method is called whenever a filter predicate is changed. Methods with a 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 interfaceFilterMethods<T extends StoredObject>- Specified by:
applyFilterPredicatein interfaceObjectLoader<T extends StoredObject>
-
applyFilter
public void applyFilter()Description copied from interface:FilterMethodsThis method is called whenever a filter condition is changed. Methods with a 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.- Specified by:
applyFilterin interfaceFilterMethods<T extends StoredObject>- Specified by:
applyFilterin interfaceObjectLoader<T extends StoredObject>
-
getEffectiveCondition
Description copied from interface:FilterMethodsGet the "effective" filter condition that must be applied for loading. The result fromFilterMethods.getFilterCondition()will be passed as a parameter to this method to get a modified "condition" if required.- Specified by:
getEffectiveConditionin interfaceFilterMethods<T extends StoredObject>- Specified by:
getEffectiveConditionin interfaceObjectLoader<T extends StoredObject>- Parameters:
condition- Condition obtained fromFilterMethods.getFilterCondition().- Returns:
- Modified condition or the same if no modification required.
-