*/
protected void processTableAndInheritance() {
// If we are an inheritance subclass, ensure our parent is processed
// first since it has information its subclasses depend on.
if (isInheritanceSubclass()) {
MetadataDescriptor parentDescriptor = getInheritanceParentDescriptor();
// Process the parent class accesor if it hasn't already been done.
ClassAccessor parentAccessor = parentDescriptor.getClassAccessor();
if (parentAccessor == null) {
parentAccessor = processAccessor(parentDescriptor);
}
// A parent, who didn't know they were a parent (a root class of an
// inheritance hierarchy that does not have an @Inheritance
// annotation or XML tag) must process and default the inheritance
// parent metadata.
if (! parentDescriptor.hasInheritance()) {
parentAccessor.processInheritance();
}
// If this entity has inheritance metadata as well, then the
// inheritance stragety is mixed and we need to process the
// inheritance parent metadata for this entity's subclasses to
// process correctly.
// WIP - check that that strategies are indeed changing ....
if (hasInheritance()) {
// Process the table metadata if there is one, otherwise default.
processTable();
// Process the parent inheritance specifics.
processInheritance();
// Process the inheritance subclass metadata.
processInheritanceSubclass(parentDescriptor);
} else {
// Process the table information for this descriptor (for a
// joined strategy), if there is one specified. Must be called
// before processing the inheritance metadata.
if (parentDescriptor.usesJoinedInheritanceStrategy()) {
processTable();
}
// Process the inheritance subclass metadata.
processInheritanceSubclass(parentDescriptor);