/** * INTERNAL: * Return a backup clone of the attribute. */ public Object backupCloneAttribute(Object attributeValue, Object clone, Object backup, UnitOfWorkImpl unitOfWork) { IndirectContainer container = (IndirectContainer)attributeValue; ValueHolderInterface valueHolder = container.getValueHolder(); ValueHolderInterface newValueHolder = (ValueHolderInterface)super.backupCloneAttribute(valueHolder, clone, backup, unitOfWork); return buildContainer(newValueHolder); }
/** * INTERNAL: * Return a backup clone of the attribute. */ public Object backupCloneAttribute(Object attributeValue, Object clone, Object backup, UnitOfWorkImpl unitOfWork) { IndirectContainer container = (IndirectContainer)attributeValue; ValueHolderInterface valueHolder = container.getValueHolder(); ValueHolderInterface newValueHolder = (ValueHolderInterface)super.backupCloneAttribute(valueHolder, clone, backup, unitOfWork); return buildContainer(newValueHolder); }
/** * INTERNAL: * Return a backup clone of the attribute. */ public Object backupCloneAttribute(Object attributeValue, Object clone, Object backup, UnitOfWorkImpl unitOfWork) { IndirectContainer container = (IndirectContainer)attributeValue; ValueHolderInterface valueHolder = container.getValueHolder(); ValueHolderInterface newValueHolder = (ValueHolderInterface)super.backupCloneAttribute(valueHolder, clone, backup, unitOfWork); return buildContainer(newValueHolder); }
/** * INTERNAL: * Return a backup clone of the attribute. */ public Object backupCloneAttribute(Object attributeValue, Object clone, Object backup, UnitOfWorkImpl unitOfWork) { if (!(attributeValue instanceof Proxy)) { return this.getMapping().buildBackupCloneForPartObject(attributeValue, clone, backup, unitOfWork); } ProxyIndirectionHandler handler = (ProxyIndirectionHandler)Proxy.getInvocationHandler(attributeValue); ValueHolderInterface unitOfWorkValueHolder = handler.getValueHolder(); ValueHolderInterface backupValueHolder = null; if ((!(unitOfWorkValueHolder instanceof UnitOfWorkValueHolder)) || unitOfWorkValueHolder.isInstantiated()) { backupValueHolder = (ValueHolderInterface) super.backupCloneAttribute(unitOfWorkValueHolder, clone, backup, unitOfWork); } else { // CR#2852176 Use a BackupValueHolder to handle replacing of the original. backupValueHolder = new BackupValueHolder(unitOfWorkValueHolder); ((UnitOfWorkValueHolder)unitOfWorkValueHolder).setBackupValueHolder((BackupValueHolder) backupValueHolder); } return ProxyIndirectionHandler.newProxyInstance(attributeValue.getClass(), targetInterfaces, backupValueHolder); }
/** * INTERNAL: * Return a backup clone of the attribute. */ public Object backupCloneAttribute(Object attributeValue, Object clone, Object backup, UnitOfWorkImpl unitOfWork) { if (!(attributeValue instanceof Proxy)) { return this.getMapping().buildBackupCloneForPartObject(attributeValue, clone, backup, unitOfWork); } ProxyIndirectionHandler handler = (ProxyIndirectionHandler)Proxy.getInvocationHandler(attributeValue); ValueHolderInterface unitOfWorkValueHolder = handler.getValueHolder(); ValueHolderInterface backupValueHolder = null; if ((!(unitOfWorkValueHolder instanceof UnitOfWorkValueHolder)) || unitOfWorkValueHolder.isInstantiated()) { backupValueHolder = (ValueHolderInterface) super.backupCloneAttribute(unitOfWorkValueHolder, clone, backup, unitOfWork); } else { // CR#2852176 Use a BackupValueHolder to handle replacing of the original. backupValueHolder = new BackupValueHolder(unitOfWorkValueHolder); ((UnitOfWorkValueHolder)unitOfWorkValueHolder).setBackupValueHolder((BackupValueHolder) backupValueHolder); } return ProxyIndirectionHandler.newProxyInstance(attributeValue.getClass(), targetInterfaces, backupValueHolder); }
/** * INTERNAL: * Return a backup clone of the attribute. */ public Object backupCloneAttribute(Object attributeValue, Object clone, Object backup, UnitOfWorkImpl unitOfWork) { if (!(attributeValue instanceof Proxy)) { return this.getMapping().buildBackupCloneForPartObject(attributeValue, clone, backup, unitOfWork); } ProxyIndirectionHandler handler = (ProxyIndirectionHandler)Proxy.getInvocationHandler(attributeValue); ValueHolderInterface unitOfWorkValueHolder = handler.getValueHolder(); ValueHolderInterface backupValueHolder = null; if ((!(unitOfWorkValueHolder instanceof UnitOfWorkValueHolder)) || unitOfWorkValueHolder.isInstantiated()) { backupValueHolder = (ValueHolderInterface) super.backupCloneAttribute(unitOfWorkValueHolder, clone, backup, unitOfWork); } else { // CR#2852176 Use a BackupValueHolder to handle replacing of the original. backupValueHolder = new BackupValueHolder(unitOfWorkValueHolder); ((UnitOfWorkValueHolder)unitOfWorkValueHolder).setBackupValueHolder((BackupValueHolder) backupValueHolder); } return ProxyIndirectionHandler.newProxyInstance(attributeValue.getClass(), targetInterfaces, backupValueHolder); }