Class CollectionValuePropertyHolder

java.lang.Object
org.eclipse.persistence.internal.indirection.DatabaseValueHolder
org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder
io.jmix.eclipselink.impl.lazyloading.AbstractValueHolder
io.jmix.eclipselink.impl.lazyloading.CollectionValuePropertyHolder
All Implemented Interfaces:
Serializable, Cloneable, org.eclipse.persistence.indirection.ValueHolderInterface, org.eclipse.persistence.indirection.WeavedAttributeValueHolderInterface, org.eclipse.persistence.internal.indirection.WrappingValueHolder

public class CollectionValuePropertyHolder extends AbstractValueHolder
See Also:
  • Constructor Details

    • CollectionValuePropertyHolder

      public CollectionValuePropertyHolder(org.springframework.beans.factory.BeanFactory beanFactory, org.eclipse.persistence.indirection.ValueHolderInterface originalValueHolder, Object owner, MetaProperty metaProperty)
  • Method Details

    • setRootEntity

      public void setRootEntity(Object rootEntity)
    • getRootEntity

      public Object getRootEntity()
    • shouldDelegateOnRecursiveLoad

      protected boolean shouldDelegateOnRecursiveLoad()
      Description copied from class: AbstractValueHolder
      Allows a reentrant AbstractValueHolder.getValue() call, made while this holder is already loading, to delegate to the original EclipseLink holder instead of starting the same Jmix load again.

      Keep this opt-in: it is needed for collection holders whose owner is managed. During the internal owner reload, EclipseLink may resolve the same owner instance from the persistence context and touch the same collection holder. For detached owners the reload uses another managed instance, so the original holder is not expected to re-enter.

      Overrides:
      shouldDelegateOnRecursiveLoad in class AbstractValueHolder
      Returns:
      true only when delegating is needed to break same-holder recursion
    • loadValue

      protected Object loadValue()
      Specified by:
      loadValue in class AbstractValueHolder
    • afterLoadValue

      protected void afterLoadValue(Object value)
      Specified by:
      afterLoadValue in class AbstractValueHolder
    • createLoadContextByOwner

      protected LoadContext<?> createLoadContextByOwner(MetaClass metaClass)
    • replaceCollectionExistingReferences

      protected void replaceCollectionExistingReferences(Collection<Object> collection, Object entityToReplace)