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.
org.eclipse.persistence.descriptors.InheritancePolicy#setClassExtractor(ClassExtrator)
Constructor and Description |
---|
MethodClassExtractor() |
Modifier and Type | Method and Description |
---|---|
java.lang.Class |
extractClassFromRow(Record row, Session session)
INTERNAL Extract/compute the class from the database row and return the class.
|
java.lang.reflect.Method |
getClassExtractionMethod()
INTERNAL: Return all the classExtractionMethod
|
java.lang.String |
getClassExtractionMethodName()
PUBLIC: A class extraction method can be registered with the descriptor to override the default inheritance mechanism.
|
void |
initialize(ClassDescriptor descriptor, Session session)
INTERNAL: Setup the default classExtractionMethod, or if one was specified by the user make sure it is valid.
|
void |
setClassExtractionMethodName(java.lang.String staticClassClassExtractionMethod)
PUBLIC: A class extraction method can be registered with the descriptor to override the default inheritance mechanism.
|
public java.lang.reflect.Method getClassExtractionMethod()
public java.lang.String getClassExtractionMethodName()
public void setClassExtractionMethodName(java.lang.String staticClassClassExtractionMethod)
public void initialize(ClassDescriptor descriptor, Session session) throws DescriptorException
initialize
in class ClassExtractor
DescriptorException
public java.lang.Class extractClassFromRow(Record row, Session session)
extractClassFromRow
in class ClassExtractor