congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
CloneCopyPolicy.getWorkingCopyMethod
Code IndexAdd Tabnine to your IDE (free)

How to use
getWorkingCopyMethod
method
in
org.eclipse.persistence.descriptors.copying.CloneCopyPolicy

Best Java code snippets using org.eclipse.persistence.descriptors.copying.CloneCopyPolicy.getWorkingCopyMethod (Showing top 3 results out of 315)

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

/**
 * Clone through the workingCopyClone method, or if not specified the clone method.
 */
public Object buildWorkingCopyClone(Object domainObject, Session session) throws DescriptorException {
  if (this.getWorkingCopyMethodName() == null) {
    //not implemented to perform special operations.
    return this.buildClone(domainObject, session);
  }
  try {
    if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
      try {
        return AccessController.doPrivileged(new PrivilegedMethodInvoker(this.getWorkingCopyMethod(), domainObject, new Object[0]));
      } catch (PrivilegedActionException exception) {
        Exception throwableException = exception.getException();
        if (throwableException instanceof IllegalAccessException) {
          throw DescriptorException.illegalAccessWhileCloning(domainObject, this.getMethodName(), this.getDescriptor(), throwableException);
        } else {
          throw DescriptorException.targetInvocationWhileCloning(domainObject, this.getMethodName(), this.getDescriptor(), throwableException);
        }
      }
    } else {
      return PrivilegedAccessHelper.invokeMethod(this.getWorkingCopyMethod(), domainObject, new Object[0]);
    }
  } catch (IllegalAccessException exception) {
    throw DescriptorException.illegalAccessWhileCloning(domainObject, this.getMethodName(), this.getDescriptor(), exception);
  } catch (InvocationTargetException exception) {
    throw DescriptorException.targetInvocationWhileCloning(domainObject, this.getMethodName(), this.getDescriptor(), exception);
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * Clone through the workingCopyClone method, or if not specified the clone method.
 */
public Object buildWorkingCopyClone(Object domainObject, Session session) throws DescriptorException {
  if (this.getWorkingCopyMethodName() == null) {
    //not implemented to perform special operations.
    return this.buildClone(domainObject, session);
  }
  try {
    if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
      try {
        return AccessController.doPrivileged(new PrivilegedMethodInvoker(this.getWorkingCopyMethod(), domainObject, new Object[0]));
      } catch (PrivilegedActionException exception) {
        Exception throwableException = exception.getException();
        if (throwableException instanceof IllegalAccessException) {
          throw DescriptorException.illegalAccessWhileCloning(domainObject, this.getMethodName(), this.getDescriptor(), throwableException);
        } else {
          throw DescriptorException.targetInvocationWhileCloning(domainObject, this.getMethodName(), this.getDescriptor(), throwableException);
        }
      }
    } else {
      return PrivilegedAccessHelper.invokeMethod(this.getWorkingCopyMethod(), domainObject, new Object[0]);
    }
  
  } catch (IllegalAccessException exception) {
    throw DescriptorException.illegalAccessWhileCloning(domainObject, this.getMethodName(), this.getDescriptor(), exception);
  } catch (InvocationTargetException exception) {
    throw DescriptorException.targetInvocationWhileCloning(domainObject, this.getMethodName(), this.getDescriptor(), exception);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * Clone through the workingCopyClone method, or if not specified the clone method.
 */
public Object buildWorkingCopyClone(Object domainObject, Session session) throws DescriptorException {
  if (this.getWorkingCopyMethodName() == null) {
    //not implemented to perform special operations.
    return this.buildClone(domainObject, session);
  }
  try {
    if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
      try {
        return AccessController.doPrivileged(new PrivilegedMethodInvoker(this.getWorkingCopyMethod(), domainObject, new Object[0]));
      } catch (PrivilegedActionException exception) {
        Exception throwableException = exception.getException();
        if (throwableException instanceof IllegalAccessException) {
          throw DescriptorException.illegalAccessWhileCloning(domainObject, this.getMethodName(), this.getDescriptor(), throwableException);
        } else {
          throw DescriptorException.targetInvocationWhileCloning(domainObject, this.getMethodName(), this.getDescriptor(), throwableException);
        }
      }
    } else {
      return PrivilegedAccessHelper.invokeMethod(this.getWorkingCopyMethod(), domainObject, new Object[0]);
    }
  
  } catch (IllegalAccessException exception) {
    throw DescriptorException.illegalAccessWhileCloning(domainObject, this.getMethodName(), this.getDescriptor(), exception);
  } catch (InvocationTargetException exception) {
    throw DescriptorException.targetInvocationWhileCloning(domainObject, this.getMethodName(), this.getDescriptor(), exception);
  }
}
org.eclipse.persistence.descriptors.copyingCloneCopyPolicygetWorkingCopyMethod

Javadoc

Return the workingCopyClone method. This is used to clone within a unit of work.

Popular methods of CloneCopyPolicy

  • <init>
  • buildClone
    Clone through calling the clone method.
  • buildWorkingCopyClone
    Clone through the workingCopyClone method, or if not specified the clone method.
  • getDescriptor
  • getMethod
    Return the clone method.
  • getMethodName
    Return the clone method name.
  • getWorkingCopyMethodName
    Return the workingCopyClone method name. This is used to clone within a unit of work.
  • setMethod
    Set the clone method.
  • setMethodName
    Set the clone method name.
  • setWorkingCopyMethod
    Set the workingCopyClone method. This is used to clone within a unit of work.
  • setWorkingCopyMethodName
    Set the workingCopyClone method name. This is used to clone within a unit of work.
  • setWorkingCopyMethodName

Popular in Java

  • Creating JSON documents from java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • getExternalFilesDir (Context)
  • addToBackStack (FragmentTransaction)
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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