Tabnine Logo
WrapperPolicy.unwrapObject
Code IndexAdd Tabnine to your IDE (free)

How to use
unwrapObject
method
in
org.eclipse.persistence.descriptors.WrapperPolicy

Best Java code snippets using org.eclipse.persistence.descriptors.WrapperPolicy.unwrapObject (Showing top 9 results out of 315)

origin: org.eclipse.persistence/org.eclipse.persistence.core

  Object object = cp.next(iterator, cloningSession);
  if (mapping.getReferenceDescriptor().hasWrapperPolicy()) {
    object = mapping.getReferenceDescriptor().getWrapperPolicy().unwrapObject(object, cloningSession);
objectToLock = mapping.getReferenceDescriptor().getWrapperPolicy().unwrapObject(objectToLock, cloningSession);
origin: com.haulmont.thirdparty/eclipselink

  Object object = cp.next(iterator, cloningSession);
  if (mapping.getReferenceDescriptor().hasWrapperPolicy()) {
    object = mapping.getReferenceDescriptor().getWrapperPolicy().unwrapObject(object, cloningSession);
objectToLock = mapping.getReferenceDescriptor().getWrapperPolicy().unwrapObject(objectToLock, cloningSession);
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

  Object object = cp.next(iterator, session);
  if (mapping.getReferenceDescriptor().hasWrapperPolicy()) {
    object = mapping.getReferenceDescriptor().getWrapperPolicy().unwrapObject(object, session);
objectToLock = mapping.getReferenceDescriptor().getWrapperPolicy().unwrapObject(objectToLock, session);
origin: com.haulmont.thirdparty/eclipselink

/**
 * 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);        
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * 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);
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * 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);        
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

m_parentDescriptor.getWrapperPolicy().unwrapObject(parentObj, uow);   
origin: org.eclipse.persistence/org.eclipse.persistence.core

m_parentDescriptor.getWrapperPolicy().unwrapObject(parentObj, uow);
origin: com.haulmont.thirdparty/eclipselink

m_parentDescriptor.getWrapperPolicy().unwrapObject(parentObj, uow);   
org.eclipse.persistence.descriptorsWrapperPolicyunwrapObject

Javadoc

PUBLIC: Required: Unwrap the object to return the implementation that is meant to be used by EclipseLink. The object may already be unwrapped in which case the object should be returned.

Popular methods of WrapperPolicy

  • initialize
    PUBLIC: Required: Lets the policy perform initialization.
  • isWrapped
    PUBLIC: Required: Return true if the object is already wrapped.
  • setDescriptor
    PUBLIC: Required: Set the descriptor.
  • wrapObject
    PUBLIC: Required: Wrap the object to return the implementation that the application requires. The ob

Popular in Java

  • Reactive rest calls using spring rest template
  • findViewById (Activity)
  • putExtra (Intent)
  • onRequestPermissionsResult (Fragment)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now