LazyEntityResolver#
- public class LazyEntityResolver extends EntityWrapper#
Implementation of
EntityInterfacewhich retrieves the parents and properties only when requested via getProperties and getParents.This is particularly useful for jobs sharing the same entity object between jobs which need different parts of it while reducing the logic of checking whether the entity is “only” sparse, or has been retrieved fully and so on.
However, when the entities parents or properties are being retrieved after the transaction’s access has been released, an
IllegalStateExceptionwill be thrown.- Author:
Timm Fitschen
Constructors#
LazyEntityResolver#
- public LazyEntityResolver(EntityInterface entity, Transaction<?> transaction)#
Constructor.
Initialize this with a sparse entity.
Methods#
getParents#
- public ParentContainer getParents()#
getProperties#
- public PropertyContainer getProperties()#
hasParents#
- public boolean hasParents()#
hasProperties#
- public boolean hasProperties()#
resolveAll#
- public void resolveAll()#
resolveParents#
- public void resolveParents()#