.. java:import:: org.caosdb.server.database.backend.transaction RetrieveParents .. java:import:: org.caosdb.server.database.backend.transaction RetrieveProperties .. java:import:: org.caosdb.server.entity EntityInterface .. java:import:: org.caosdb.server.entity.container ParentContainer .. java:import:: org.caosdb.server.entity.container PropertyContainer .. java:import:: org.caosdb.server.entity.wrapper EntityWrapper .. java:import:: org.caosdb.server.transaction Transaction LazyEntityResolver ================== .. java:package:: org.caosdb.server.jobs :noindex: .. java:type:: public class LazyEntityResolver extends EntityWrapper Implementation of \ :java:ref:`EntityInterface`\ which 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 \ :java:ref:`IllegalStateException`\ will be thrown. :author: Timm Fitschen Constructors ------------ LazyEntityResolver ^^^^^^^^^^^^^^^^^^ .. java:constructor:: public LazyEntityResolver(EntityInterface entity, Transaction transaction) :outertype: LazyEntityResolver Constructor. Initialize this with a sparse entity. Methods ------- getParents ^^^^^^^^^^ .. java:method:: @Override public ParentContainer getParents() :outertype: LazyEntityResolver getProperties ^^^^^^^^^^^^^ .. java:method:: @Override public PropertyContainer getProperties() :outertype: LazyEntityResolver hasParents ^^^^^^^^^^ .. java:method:: @Override public boolean hasParents() :outertype: LazyEntityResolver hasProperties ^^^^^^^^^^^^^ .. java:method:: @Override public boolean hasProperties() :outertype: LazyEntityResolver resolveAll ^^^^^^^^^^ .. java:method:: public void resolveAll() :outertype: LazyEntityResolver resolveParents ^^^^^^^^^^^^^^ .. java:method:: public void resolveParents() :outertype: LazyEntityResolver