Codota Logo
WrapperPolicy.wrapObject
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Wrap the object if required.
 * This is used for the wrapper policy support and EJB.
 */
public Object wrapObject(Object implementation, AbstractSession session) {
  if (!this.hasWrapperPolicy) {
    return implementation;
  }
  if (implementation == null) {
    return null;
  }
  // PERF: Using direct variable access.
  // Check if already wrapped.
  if ((!this.descriptor.hasWrapperPolicy()) || this.descriptor.getWrapperPolicy().isWrapped(implementation)) {
    return implementation;
  }
  // Allow for inheritance, the concrete wrapper must always be used.
  if (this.descriptor.hasInheritance() && this.descriptor.getInheritancePolicy().hasChildren() && (implementation.getClass() != this.descriptor.getJavaClass())) {
    ClassDescriptor descriptor = session.getDescriptor(implementation);
    if (descriptor != this.descriptor) {
      return descriptor.getObjectBuilder().wrapObject(implementation, session);
    }
  }
  return this.descriptor.getWrapperPolicy().wrapObject(implementation, session);
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * Wrap the object if required.
 * This is used for the wrapper policy support and EJB.
 */
public Object wrapObject(Object implementation, AbstractSession session) {
  if (!this.hasWrapperPolicy) {
    return implementation;
  }
  if (implementation == null) {
    return null;
  }
  // PERF: Using direct variable access.
  
  // Check if already wrapped.
  if ((!this.descriptor.hasWrapperPolicy()) || this.descriptor.getWrapperPolicy().isWrapped(implementation)) {
    return implementation;
  }
  // Allow for inheritance, the concrete wrapper must always be used.
  if (this.descriptor.hasInheritance() && this.descriptor.getInheritancePolicy().hasChildren() && (implementation.getClass() != this.descriptor.getJavaClass())) {
    ClassDescriptor descriptor = session.getDescriptor(implementation);
    if (descriptor != this.descriptor) {
      return descriptor.getObjectBuilder().wrapObject(implementation, session);
    }
  }
  return this.descriptor.getWrapperPolicy().wrapObject(implementation, session);
}
 
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

  /**
   * Wrap the object if required.
   * This is used for the wrapper policy support and EJB.
   */
  public Object wrapObject(Object implementation, AbstractSession session) {
    if (!this.hasWrapperPolicy) {
      return implementation;
    }
    if (implementation == null) {
      return null;
    }
    // PERF: Using direct variable access.
    
    // Check if already wrapped.
    if ((!this.descriptor.hasWrapperPolicy()) || this.descriptor.getWrapperPolicy().isWrapped(implementation)) {
      return implementation;
    }

    // Allow for inheritance, the concrete wrapper must always be used.
    if (this.descriptor.hasInheritance() && this.descriptor.getInheritancePolicy().hasChildren() && (implementation.getClass() != this.descriptor.getJavaClass())) {
      ClassDescriptor descriptor = session.getDescriptor(implementation);
      if (descriptor != this.descriptor) {
        return descriptor.getObjectBuilder().wrapObject(implementation, session);
      }
    }
    return this.descriptor.getWrapperPolicy().wrapObject(implementation, session);
  }
}
org.eclipse.persistence.descriptorsWrapperPolicywrapObject

Javadoc

PUBLIC: Required: Wrap the object to return the implementation that the application requires. The object may already be wrapped 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.
  • unwrapObject
    PUBLIC: Required: Unwrap the object to return the implementation that is meant to be used by Eclipse

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSystemService (Context)
  • startActivity (Activity)
  • getApplicationContext (Context)
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • ImageIO (javax.imageio)
  • JFileChooser (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now