@InstallSubject(value="loadDelegate") public interface InstanceLoader<E extends Entity> extends DataLoader
Modifier and Type | Method and Description |
---|---|
InstanceContainer<E> |
getContainer()
Returns the container which accepts the loaded entity.
|
java.lang.Object |
getEntityId()
Returns id of the entity to load.
|
java.util.function.Function<LoadContext<E>,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 |
isLoadDynamicAttributes()
Returns true if the entity's dynamic attributes are loaded.
|
void |
setContainer(InstanceContainer<E> container)
Sets the container which accepts the loaded entity.
|
void |
setEntityId(java.lang.Object entityId)
Sets the id of the entity to load.
|
void |
setLoadDelegate(java.util.function.Function<LoadContext<E>,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.
|
getCondition, getDataContext, getParameter, getParameters, getQuery, isSoftDeletion, load, removeParameter, setCondition, setDataContext, setParameter, setParameters, setQuery, setSoftDeletion
InstanceContainer<E> getContainer()
getContainer
in interface DataLoader
void setContainer(InstanceContainer<E> container)
java.lang.Object getEntityId()
void setEntityId(java.lang.Object entityId)
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)
boolean isLoadDynamicAttributes()
void setLoadDynamicAttributes(boolean loadDynamicAttributes)
java.util.function.Function<LoadContext<E>,E> getLoadDelegate()
void setLoadDelegate(java.util.function.Function<LoadContext<E>,E> delegate)