RetrieveFullEntityTransaction#
- public class RetrieveFullEntityTransaction extends BackendTransaction#
Retrieve the full entity from the backend - with all parents, properties, file properties and so on.
TODO: This class should rather be called FullEntityRetrieval or FullEntityRetrieveTransaction.
When the entity which is to be retrieved has a defined list of
Query.Selectionwhich select properties from referenced entities, the referenced entities are retrieved as well. Otherwise, only the referenced id is retrieved and the entity stays rather flat.- Author:
Timm Fitschen
Constructors#
RetrieveFullEntityTransaction#
- public RetrieveFullEntityTransaction(EntityInterface entity, Subject subject)#
RetrieveFullEntityTransaction#
- public RetrieveFullEntityTransaction(Container<? extends EntityInterface> container, Subject subject)#
RetrieveFullEntityTransaction#
Methods#
execute#
- public void execute()#
getContainer#
- public Container<? extends EntityInterface> getContainer()#
getSubSelects#
- public List<Selection> getSubSelects(List<Selection> selections, String select)#
Return all non-null subselects of those selections which match the given select String.
Effectively, this reduces the depth of the selections by one (and drops non-matching selections).
- Parameters:
selections
select
- Returns:
A new list of Selections.
retrieveFullEntitiesInContainer#
- public void retrieveFullEntitiesInContainer(Container<? extends EntityInterface> container)#
Retrieve the entities in the container.
- Parameters:
container
retrieveFullEntity#
- public void retrieveFullEntity(EntityInterface e, List<Selection> selections)#
Retrieve a single full entity.
If the selections are not empty, retrieve the referenced entities matching the ‘selections’ as well.
This method is called recursively during the retrieval of the referenced entities.
- Parameters:
e – The entity.
selections
retrieveSubEntities#
- public void retrieveSubEntities(EntityInterface e, List<Selection> selections)#
Retrieve the Entities which match the selections and are referenced by the Entity ‘e’.
- Parameters:
e
selections