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
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class -
Field Summary
Fields inherited from class io.jmix.eclipselink.impl.lazyloading.AbstractValueHolder
beanFactoryFields inherited from class org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder
backupValueHolder, mapping, relationshipSourceObject, remoteUnitOfWork, sourceAttributeName, sourceObject, wrappedValueHolder, wrappedValueHolderRemoteIDFields inherited from class org.eclipse.persistence.internal.indirection.DatabaseValueHolder
isCoordinatedWithProperty, row, sessionFields inherited from interface org.eclipse.persistence.indirection.ValueHolderInterface
shouldToStringInstantiate -
Constructor Summary
ConstructorsConstructorDescriptionCollectionValuePropertyHolder(org.springframework.beans.factory.BeanFactory beanFactory, org.eclipse.persistence.indirection.ValueHolderInterface originalValueHolder, Object owner, MetaProperty metaProperty) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafterLoadValue(Object value) protected LoadContext<?> createLoadContextByOwner(MetaClass metaClass) protected Objectprotected voidreplaceCollectionExistingReferences(Collection<Object> collection, Object entityToReplace) voidsetRootEntity(Object rootEntity) protected booleanAllows a reentrantAbstractValueHolder.getValue()call, made while this holder is already loading, to delegate to the original EclipseLink holder instead of starting the same Jmix load again.Methods inherited from class io.jmix.eclipselink.impl.lazyloading.AbstractValueHolder
buildBackupCloneFor, buildCloneFor, getDataManager, getFetchPlans, getLoadOptions, getMapping, getMetadata, getMetadataTools, getOwner, getPropertyInfo, getRow, getSession, getValue, getValue, getWrappedValueHolder, getWrappedValueHolderRemoteID, instantiateForUnitOfWorkValueHolder, isCoordinatedWithProperty, isEasilyInstantiated, isInstantiated, isNewlyWeavedValueHolder, isPessimisticLockingValueHolder, isSerializedRemoteUnitOfWorkValueHolder, postInstantiate, privilegedSetValue, registerLoadedProperty, releaseWrappedValueHolder, replaceLoadOptions, replaceToExistingReferences, setBackupValueHolder, setInstantiated, setIsCoordinatedWithProperty, setIsNewlyWeavedValueHolder, setLoadOptions, setRow, setSession, setUninstantiated, setValue, shouldAllowInstantiationDeferralMethods inherited from class org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder
getBackupValueHolder, getRelationshipSourceObject, getRemoteUnitOfWork, getSourceAttributeName, getSourceObject, getUnitOfWork, getValueFromServerObject, instantiate, instantiateImpl, resetFields, setMapping, setRelationshipSourceObject, setRemoteUnitOfWork, setSourceAttributeName, setSourceObject, setWrappedValueHolder, throwUnfetchedAttributeExceptionMethods inherited from class org.eclipse.persistence.internal.indirection.DatabaseValueHolder
clone, isTransactionalValueHolder, toStringMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.persistence.indirection.ValueHolderInterface
clone
-
Constructor Details
-
CollectionValuePropertyHolder
public CollectionValuePropertyHolder(org.springframework.beans.factory.BeanFactory beanFactory, org.eclipse.persistence.indirection.ValueHolderInterface originalValueHolder, Object owner, MetaProperty metaProperty)
-
-
Method Details
-
setRootEntity
-
getRootEntity
-
shouldDelegateOnRecursiveLoad
protected boolean shouldDelegateOnRecursiveLoad()Description copied from class:AbstractValueHolderAllows a reentrantAbstractValueHolder.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:
shouldDelegateOnRecursiveLoadin classAbstractValueHolder- Returns:
- true only when delegating is needed to break same-holder recursion
-
loadValue
- Specified by:
loadValuein classAbstractValueHolder
-
afterLoadValue
- Specified by:
afterLoadValuein classAbstractValueHolder
-
createLoadContextByOwner
-
replaceCollectionExistingReferences
protected void replaceCollectionExistingReferences(Collection<Object> collection, Object entityToReplace)
-