|
Oracle TopLink Java API Reference 10g Release 3 (10.1.3.1) B28219-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
oracle.toplink.publicinterface.InheritancePolicy
oracle.toplink.descriptors.InheritancePolicy
Purpose: Allows customization of an object's inheritance. The primary supported inheritance model uses a class type indicator column in the table that stores the object's class type. The class-to-type mapping is specified on this policy. The full class name can also be used for the indicator instead of the mapping.
Each subclass can either share their parents table, or in addition add their own table(s).
For legacy models a customized inheritance class-extractor can be provided. This allows Java code to be used to compute the class type to use for a row. When this customized inheritance model is used an only-instances and with-all-subclasses filter expression may be required for concrete and branch querying.
| Method Summary | |
void |
addClassIndicator(java.lang.Class childClass, java.lang.Object typeValue)PUBLIC: Add a class indicator for the root classes subclass. |
void |
dontReadSubclassesOnQueries()PUBLIC: Set the descriptor to only read instance of itself when queried. |
void |
dontUseClassNameAsIndicator()PUBLIC: Set the descriptor not to use the class' full name as the indicator. |
java.lang.String |
getClassExtractionMethodName()ADVANCED: A class extraction method can be registered with the descriptor to override the default inheritance mechanism. |
ClassExtractor |
getClassExtractor()ADVANCED: A class extractor can be registered with the descriptor to override the default inheritance mechanism. |
java.lang.String |
getClassIndicatorFieldName()PUBLIC: Return the class indicator field name. |
Expression |
getOnlyInstancesExpression()ADVANCED: Return the 'only instances expression'. |
java.lang.Class |
getParentClass()PUBLIC: Return the parent class. |
java.lang.String |
getReadAllSubclassesViewName()ADVANCED: The view can be used to optimize/customize the query for all subclasses where they have multiple tables. |
Expression |
getWithAllSubclassesExpression()ADVANCED: Return the Expression which gets all subclasses. |
void |
readSubclassesOnQueries()PUBLIC: Set the descriptor to read instance of itself and its subclasses when queried. |
void |
setClassExtractionMethodName(java.lang.String staticClassClassExtractionMethod)ADVANCED: A class extraction method can be registered with the descriptor to override the default inheritance mechanism. |
void |
setClassExtractor(ClassExtractor classExtractor)ADVANCED: A class extractor can be registered with the descriptor to override the default inheritance mechanism. |
void |
setClassIndicatorField(DatabaseField classIndicatorField)ADVANCED: To set the class indicator field. |
void |
setClassIndicatorFieldName(java.lang.String fieldName)PUBLIC: To set the class indicator field name. |
void |
setClassIndicatorMapping(java.util.Hashtable classIndicatorMapping)PUBLIC: Set the association of indicators and classes. |
void |
setOnlyInstancesExpression(Expression onlyInstancesExpression)ADVANCED: Sets the expression used to select instance of the class only. |
void |
setParentClass(java.lang.Class parentClass)PUBLIC: Set the parent class. |
void |
setReadAllSubclassesViewName(java.lang.String readAllSubclassesViewName)ADVANCED: The view can be used to optimize/customize the query for all subclasses where they have multiple tables. |
void |
setShouldReadSubclasses(boolean shouldReadSubclasses)PUBLIC: Set the descriptor to read instance of itself and its subclasses when queried. |
void |
setShouldUseClassNameAsIndicator(boolean shouldUseClassNameAsIndicator)PUBLIC: Set if the descriptor uses the classes fully qualified name as the indicator. |
void |
setWithAllSubclassesExpression(Expression withAllSubclassesExpression)ADVANCED: Sets the expression to be used for querying for a class and all its subclasses. |
boolean |
shouldReadSubclasses()PUBLIC: Return true if this descriptor should read instances of itself and subclasses on queries. |
boolean |
shouldUseClassNameAsIndicator()PUBLIC: Return true if the descriptor use the classes full name as the indicator. |
void |
useClassNameAsIndicator()PUBLIC: Set the descriptor to use the classes full name as the indicator. |
| Methods inherited from class oracle.toplink.publicinterface.InheritancePolicy |
setAlwaysUseOuterJoinForClassType, setClassIndicatorMapping, shouldAlwaysUseOuterJoin |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
public void addClassIndicator(java.lang.Class childClass,
java.lang.Object typeValue)
addClassIndicator in class InheritancePolicypublic void dontReadSubclassesOnQueries()
dontReadSubclassesOnQueries in class InheritancePolicypublic void dontUseClassNameAsIndicator()
dontUseClassNameAsIndicator in class InheritancePolicypublic java.lang.String getClassExtractionMethodName()
getClassExtractionMethodName in class InheritancePolicysetWithAllSubclassesExpression(Expression), setOnlyInstancesExpression(Expression)public ClassExtractor getClassExtractor()
getClassExtractor in class InheritancePolicysetWithAllSubclassesExpression(Expression), setOnlyInstancesExpression(Expression)public void setClassExtractor(ClassExtractor classExtractor)
setClassExtractor in class InheritancePolicysetWithAllSubclassesExpression(Expression), setOnlyInstancesExpression(Expression)public java.lang.String getClassIndicatorFieldName()
getClassIndicatorFieldName in class InheritancePolicypublic Expression getOnlyInstancesExpression()
getOnlyInstancesExpression in class InheritancePolicypublic java.lang.Class getParentClass()
getParentClass in class InheritancePolicypublic java.lang.String getReadAllSubclassesViewName()
getReadAllSubclassesViewName in class InheritancePolicypublic Expression getWithAllSubclassesExpression()
getWithAllSubclassesExpression in class InheritancePolicypublic void readSubclassesOnQueries()
readSubclassesOnQueries in class InheritancePolicypublic void setClassExtractionMethodName(java.lang.String staticClassClassExtractionMethod)
setClassExtractionMethodName in class InheritancePolicysetWithAllSubclassesExpression(Expression), setOnlyInstancesExpression(Expression)public void setClassIndicatorField(DatabaseField classIndicatorField)
setClassIndicatorField in class InheritancePolicypublic void setClassIndicatorFieldName(java.lang.String fieldName)
setClassIndicatorFieldName in class InheritancePolicypublic void setClassIndicatorMapping(java.util.Hashtable classIndicatorMapping)
public void setOnlyInstancesExpression(Expression onlyInstancesExpression)
setOnlyInstancesExpression in class InheritancePolicypublic void setParentClass(java.lang.Class parentClass)
setParentClass in class InheritancePolicypublic void setReadAllSubclassesViewName(java.lang.String readAllSubclassesViewName)
setReadAllSubclassesViewName in class InheritancePolicypublic void setShouldReadSubclasses(boolean shouldReadSubclasses)
setShouldReadSubclasses in class InheritancePolicypublic void setShouldUseClassNameAsIndicator(boolean shouldUseClassNameAsIndicator)
setShouldUseClassNameAsIndicator in class InheritancePolicypublic void setWithAllSubclassesExpression(Expression withAllSubclassesExpression)
setWithAllSubclassesExpression in class InheritancePolicypublic boolean shouldReadSubclasses()
shouldReadSubclasses in class InheritancePolicypublic boolean shouldUseClassNameAsIndicator()
shouldUseClassNameAsIndicator in class InheritancePolicypublic void useClassNameAsIndicator()
useClassNameAsIndicator in class InheritancePolicy
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||