Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle TopLink API Reference 10g Release 3 (10.1.3) B13698-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.toplink.descriptors
Class MethodClassExtractor

`java.lang.Object
oracle.toplink.descriptors.ClassExtractor
oracle.toplink.descriptors.MethodClassExtractor`

public class MethodClassExtractor
extends ClassExtractor

Purpose: Used to allow complex inheritance support. Typically class indicators are used to define inheritance in the database, however in complex cases the class type may be determined through another mechanism. The method calls a static method on the descriptor class to determine the class to use for the database row.

See Also:
  `oracle.toplink.descriptors.InheritancePolicy#setClassExtractor(ClassExtrator)`

Constructor Summary
`MethodClassExtractor()`

Method Summary
`java.lang.String` | `getClassExtractionMethodName()` PUBLIC: A class extraction method can be registered with the descriptor to override the default inheritance mechanism.
`void` | `setClassExtractionMethodName(java.lang.String staticClassClassExtractionMethod)` PUBLIC: A class extraction method can be registered with the descriptor to override the default inheritance mechanism.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MethodClassExtractor

    public MethodClassExtractor()

Method Detail

### getClassExtractionMethodName

    public java.lang.String getClassExtractionMethodName()

  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 responsiblity 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.

### setClassExtractionMethodName

    public void setClassExtractionMethodName(java.lang.String staticClassClassExtractionMethod)

  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 responsiblity 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.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 1998, 2006, Oracle. All Rights Reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD