@Component(value="cuba_EntityFetcher")
public class EntityFetcher
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected EntityStates |
entityStates |
protected Metadata |
metadata |
static java.lang.String |
NAME |
protected Persistence |
persistence |
protected ViewRepository |
viewRepository |
Constructor and Description |
---|
EntityFetcher() |
Modifier and Type | Method and Description |
---|---|
void |
fetch(Entity instance,
java.lang.String viewName)
Fetch instance by view name.
|
void |
fetch(Entity instance,
java.lang.String viewName,
boolean optimizeForDetached)
Fetch instance by view name.
|
void |
fetch(Entity instance,
View view)
Fetch instance by view object.
|
void |
fetch(Entity instance,
View view,
boolean optimizeForDetached)
Fetch instance by view object.
|
protected void |
fetch(Entity entity,
View view,
java.util.Map<Instance,java.util.Set<View>> visited,
boolean optimizeForDetached) |
protected boolean |
needReloading(Entity entity,
View view) |
public static final java.lang.String NAME
@Inject protected Metadata metadata
@Inject protected ViewRepository viewRepository
@Inject protected Persistence persistence
@Inject protected EntityStates entityStates
public void fetch(Entity instance, java.lang.String viewName)
public void fetch(Entity instance, View view, boolean optimizeForDetached)
optimizeForDetached
- if true, detached objects encountered in the graph will be first checked whether all
required attributes are already loaded, and reloaded only when needed.
If the argument is false, all detached objects are reloaded anyway.public void fetch(Entity instance, java.lang.String viewName, boolean optimizeForDetached)
optimizeForDetached
- if true, detached objects encountered in the graph will be first checked whether all
required attributes are already loaded, and reloaded only when needed.
If the argument is false, all detached objects are reloaded anyway.protected void fetch(Entity entity, View view, java.util.Map<Instance,java.util.Set<View>> visited, boolean optimizeForDetached)