|
EclipseLink 2.2.0, build 'v20110202-r8913' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.descriptors.ClassExtractor org.eclipse.persistence.descriptors.MethodClassExtractor
public class MethodClassExtractor
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)
Field Summary | |
---|---|
protected java.lang.reflect.Method |
classExtractionMethod
|
protected java.lang.String |
classExtractionMethodName
|
protected ClassDescriptor |
descriptor
|
Constructor Summary | |
---|---|
MethodClassExtractor()
|
Method Summary | |
---|---|
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. |
protected ClassDescriptor |
getDescriptor()
INTERNAL: Return the descriptor. |
void |
initialize(ClassDescriptor descriptor,
Session session)
INTERNAL: Setup the default classExtractionMethod, or if one was specified by the user make sure it is valid. |
protected void |
setClassExtractionMethod(java.lang.reflect.Method classExtractionMethod)
INTERNAL: |
void |
setClassExtractionMethodName(java.lang.String staticClassClassExtractionMethod)
PUBLIC: A class extraction method can be registered with the descriptor to override the default inheritance mechanism. |
protected void |
setDescriptor(ClassDescriptor descriptor)
INTERNAL: Set the descriptor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient ClassDescriptor descriptor
protected java.lang.String classExtractionMethodName
protected transient java.lang.reflect.Method classExtractionMethod
Constructor Detail |
---|
public MethodClassExtractor()
Method Detail |
---|
public java.lang.reflect.Method getClassExtractionMethod()
public java.lang.String getClassExtractionMethodName()
protected void setClassExtractionMethod(java.lang.reflect.Method classExtractionMethod)
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
protected ClassDescriptor getDescriptor()
protected void setDescriptor(ClassDescriptor descriptor)
|
EclipseLink 2.2.0, build 'v20110202-r8913' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |