Object object = cp.next(iterator, cloningSession); if (mapping.getReferenceDescriptor().hasWrapperPolicy()) { object = mapping.getReferenceDescriptor().getWrapperPolicy().unwrapObject(object, cloningSession); objectToLock = mapping.getReferenceDescriptor().getWrapperPolicy().unwrapObject(objectToLock, cloningSession);
Object object = cp.next(iterator, cloningSession); if (mapping.getReferenceDescriptor().hasWrapperPolicy()) { object = mapping.getReferenceDescriptor().getWrapperPolicy().unwrapObject(object, cloningSession); objectToLock = mapping.getReferenceDescriptor().getWrapperPolicy().unwrapObject(objectToLock, cloningSession);
Object object = cp.next(iterator, session); if (mapping.getReferenceDescriptor().hasWrapperPolicy()) { object = mapping.getReferenceDescriptor().getWrapperPolicy().unwrapObject(object, session); objectToLock = mapping.getReferenceDescriptor().getWrapperPolicy().unwrapObject(objectToLock, session);
/** * Unwrap the object if required. * This is used for the wrapper policy support and EJB. */ public Object unwrapObject(Object proxy, AbstractSession session) { if (!this.hasWrapperPolicy) { return proxy; } if (proxy == null) { return null; } // PERF: Using direct variable access. // Check if already unwrapped. if ((!this.descriptor.hasWrapperPolicy()) || (this.descriptor.getJavaClass() == proxy.getClass()) || (!this.descriptor.getWrapperPolicy().isWrapped(proxy))) { if (session.getProject().hasProxyIndirection()) { //Bug#3947714 Check and trigger the proxy here return ProxyIndirectionPolicy.getValueFromProxy(proxy); } return proxy; } // Allow for inheritance, the concrete wrapper must always be used. if (this.descriptor.hasInheritance() && (this.descriptor.getInheritancePolicy().hasChildren())) { ClassDescriptor descriptor = session.getDescriptor(proxy); if (descriptor != this.descriptor) { return descriptor.getObjectBuilder().unwrapObject(proxy, session); } } return this.descriptor.getWrapperPolicy().unwrapObject(proxy, session); }
/** * Unwrap the object if required. * This is used for the wrapper policy support and EJB. */ public Object unwrapObject(Object proxy, AbstractSession session) { if (!this.hasWrapperPolicy) { return proxy; } if (proxy == null) { return null; } // PERF: Using direct variable access. // Check if already unwrapped. if ((!this.descriptor.hasWrapperPolicy()) || (this.descriptor.getJavaClass() == proxy.getClass()) || (!this.descriptor.getWrapperPolicy().isWrapped(proxy))) { if (session.getProject().hasProxyIndirection()) { //Bug#3947714 Check and trigger the proxy here return ProxyIndirectionPolicy.getValueFromProxy(proxy); } return proxy; } // Allow for inheritance, the concrete wrapper must always be used. if (this.descriptor.hasInheritance() && (this.descriptor.getInheritancePolicy().hasChildren())) { ClassDescriptor descriptor = session.getDescriptor(proxy); if (descriptor != this.descriptor) { return descriptor.getObjectBuilder().unwrapObject(proxy, session); } } return this.descriptor.getWrapperPolicy().unwrapObject(proxy, session); }
/** * Unwrap the object if required. * This is used for the wrapper policy support and EJB. */ public Object unwrapObject(Object proxy, AbstractSession session) { if (!this.hasWrapperPolicy) { return proxy; } if (proxy == null) { return null; } // PERF: Using direct variable access. // Check if already unwrapped. if ((!this.descriptor.hasWrapperPolicy()) || (this.descriptor.getJavaClass() == proxy.getClass()) || (!this.descriptor.getWrapperPolicy().isWrapped(proxy))) { if (session.getProject().hasProxyIndirection()) { //Bug#3947714 Check and trigger the proxy here return ProxyIndirectionPolicy.getValueFromProxy(proxy); } return proxy; } // Allow for inheritance, the concrete wrapper must always be used. if (this.descriptor.hasInheritance() && (this.descriptor.getInheritancePolicy().hasChildren())) { ClassDescriptor descriptor = session.getDescriptor(proxy); if (descriptor != this.descriptor) { return descriptor.getObjectBuilder().unwrapObject(proxy, session); } } return this.descriptor.getWrapperPolicy().unwrapObject(proxy, session); }
m_parentDescriptor.getWrapperPolicy().unwrapObject(parentObj, uow);
m_parentDescriptor.getWrapperPolicy().unwrapObject(parentObj, uow);
m_parentDescriptor.getWrapperPolicy().unwrapObject(parentObj, uow);