Tabnine Logo
MethodClassExtractor.setClassExtractionMethodName
Code IndexAdd Tabnine to your IDE (free)

How to use
setClassExtractionMethodName
method
in
org.eclipse.persistence.descriptors.MethodClassExtractor

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

origin: com.haulmont.thirdparty/eclipselink

/**
 * ADVANCED:
 * A class extraction method can be registered with the descriptor to override the default inheritance mechanism.
 * This allows for a user defined class indicator in place of providing an explicit class indicator field.
 * The method registered must be a static method on the class which has that descriptor. The method must take Record 
 * as an argument (for example, a DatabaseRecord), and must return the class to use for that record.
 * This method will be used to decide which class to instantiate when reading from the database.
 * It is the application's responsibility to populate any typing information in the database required
 * to determine the class from the record.
 * If this method is used then the class indicator field and mapping cannot be used, and in addition, 
 * the descriptor's withAllSubclasses and onlyInstances expressions must also be set up correctly.
 *
 * @see #setWithAllSubclassesExpression(Expression)
 * @see #setOnlyInstancesExpression(Expression)
 */
public void setClassExtractionMethodName(String staticClassClassExtractionMethod) {
  if ((staticClassClassExtractionMethod == null) || (staticClassClassExtractionMethod.length() == 0)) {
    return;
  }
  if (!(getClassExtractor() instanceof MethodClassExtractor)) {
    setClassExtractor(new MethodClassExtractor());
  }
  ((MethodClassExtractor)getClassExtractor()).setClassExtractionMethodName(staticClassClassExtractionMethod);
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * ADVANCED:
 * A class extraction method can be registered with the descriptor to override the default inheritance mechanism.
 * This allows for a user defined class indicator in place of providing an explicit class indicator field.
 * The method registered must be a static method on the class which has that descriptor. The method must take Record 
 * as an argument (for example, a DatabaseRecord), and must return the class to use for that record.
 * This method will be used to decide which class to instantiate when reading from the database.
 * It is the application's responsibility to populate any typing information in the database required
 * to determine the class from the record.
 * If this method is used then the class indicator field and mapping cannot be used, and in addition, 
 * the descriptor's withAllSubclasses and onlyInstances expressions must also be set up correctly.
 *
 * @see #setWithAllSubclassesExpression(Expression)
 * @see #setOnlyInstancesExpression(Expression)
 */
public void setClassExtractionMethodName(String staticClassClassExtractionMethod) {
  if ((staticClassClassExtractionMethod == null) || (staticClassClassExtractionMethod.length() == 0)) {
    return;
  }
  if (!(getClassExtractor() instanceof MethodClassExtractor)) {
    setClassExtractor(new MethodClassExtractor());
  }
  ((MethodClassExtractor)getClassExtractor()).setClassExtractionMethodName(staticClassClassExtractionMethod);
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * ADVANCED:
 * A class extraction method can be registered with the descriptor to override the default inheritance mechanism.
 * This allows for a user defined class indicator in place of providing an explicit class indicator field.
 * The method registered must be a static method on the class which has that descriptor. The method must take Record
 * as an argument (for example, a DatabaseRecord), and must return the class to use for that record.
 * This method will be used to decide which class to instantiate when reading from the database.
 * It is the application's responsibility to populate any typing information in the database required
 * to determine the class from the record.
 * If this method is used then the class indicator field and mapping cannot be used, and in addition,
 * the descriptor's withAllSubclasses and onlyInstances expressions must also be set up correctly.
 *
 * @see #setWithAllSubclassesExpression(Expression)
 * @see #setOnlyInstancesExpression(Expression)
 */
public void setClassExtractionMethodName(String staticClassClassExtractionMethod) {
  if ((staticClassClassExtractionMethod == null) || (staticClassClassExtractionMethod.length() == 0)) {
    return;
  }
  if (!(getClassExtractor() instanceof MethodClassExtractor)) {
    setClassExtractor(new MethodClassExtractor());
  }
  ((MethodClassExtractor)getClassExtractor()).setClassExtractionMethodName(staticClassClassExtractionMethod);
}
org.eclipse.persistence.descriptorsMethodClassExtractorsetClassExtractionMethodName

Javadoc

PUBLIC: A class extraction method can be registered with the descriptor to override the default inheritance mechanism. This allows for the class indicator field to not be used, and a user defined one instead. The method registered must be a static method on the class that the descriptor is for, the method must take DatabaseRow as argument, and must return the class to use for that row. This method will be used to decide which class to instantiate when reading from the database. It is the application's responsibility to populate any typing information in the database required to determine the class from the row. If this method is used then the class indicator field and mapping cannot be used, also the descriptor's withAllSubclasses and onlyInstances expressions must also be setup correctly.

Popular methods of MethodClassExtractor

  • <init>
  • getClassExtractionMethod
    INTERNAL: Return all the classExtractionMethod
  • getClassExtractionMethodName
    PUBLIC: A class extraction method can be registered with the descriptor to override the default inhe
  • getDescriptor
    INTERNAL: Return the descriptor.
  • setClassExtractionMethod
    INTERNAL:
  • setDescriptor
    INTERNAL: Set the descriptor.

Popular in Java

  • Making http post requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • requestLocationUpdates (LocationManager)
  • addToBackStack (FragmentTransaction)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top PhpStorm plugins
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