@InstallSubject(value="loadDelegate") public interface CollectionLoader<E extends Entity> extends BaseCollectionLoader
Modifier and Type | Method and Description |
---|---|
LoadContext<E> |
createLoadContext()
Returns
LoadContext which is created by the parameters of this loader. |
CollectionContainer<E> |
getContainer()
Returns the container which accepts loaded entities.
|
java.util.function.Function<LoadContext<E>,java.util.List<E>> |
getLoadDelegate()
Returns a function which will be used to load data instead of standard implementation.
|
View |
getView()
Returns the view which is used when loading.
|
boolean |
isCacheable()
Returns true if the query for loading data is cacheable.
|
boolean |
isLoadDynamicAttributes()
Returns true if the entity's dynamic attributes are loaded.
|
void |
setCacheable(boolean cacheable)
Sets the query for loading data cacheable.
|
void |
setContainer(CollectionContainer<E> container)
Sets the container which accepts loaded entities.
|
void |
setLoadDelegate(java.util.function.Function<LoadContext<E>,java.util.List<E>> delegate)
Sets a function which will be used to load data instead of standard implementation.
|
void |
setLoadDynamicAttributes(boolean loadDynamicAttributes)
Set to true to load the entity's dynamic attributes.
|
void |
setView(java.lang.String viewName)
Sets the name of the view which is used when loading.
|
void |
setView(View view)
Sets the view which is used when loading.
|
getFirstResult, getMaxResults, getSort, setFirstResult, setMaxResults, setSort
getCondition, getDataContext, getParameter, getParameters, getQuery, isSoftDeletion, load, removeParameter, setCondition, setDataContext, setParameter, setParameters, setQuery, setSoftDeletion
CollectionContainer<E> getContainer()
getContainer
in interface BaseCollectionLoader
getContainer
in interface DataLoader
void setContainer(CollectionContainer<E> container)
LoadContext<E> createLoadContext()
LoadContext
which is created by the parameters of this loader. The LoadContext
can be used with DataManager
to load data by the same conditions.boolean isLoadDynamicAttributes()
void setLoadDynamicAttributes(boolean loadDynamicAttributes)
boolean isCacheable()
void setCacheable(boolean cacheable)
View getView()
void setView(View view)
void setView(java.lang.String viewName)
java.lang.IllegalStateException
- if the view has already been set by setView(View)
java.util.function.Function<LoadContext<E>,java.util.List<E>> getLoadDelegate()
void setLoadDelegate(java.util.function.Function<LoadContext<E>,java.util.List<E>> delegate)