*/
protected void processTableAndInheritance() {
// If we are an inheritance subclass, ensure our root is processed
// first since it has information its subclasses depend on.
if (getDescriptor().isInheritanceSubclass()) {
MetadataDescriptor parentDescriptor = getDescriptor().getInheritanceRootDescriptor();
EntityAccessor parentAccessor = (EntityAccessor) parentDescriptor.getClassAccessor();
// An entity who didn't know they were the root of an inheritance
// hierarchy (that is, does not define inheritance metadata) must
// process and default the inheritance metadata.
if (! parentAccessor.hasInheritance()) {
parentAccessor.processInheritance();
}
// If this entity has inheritance metadata as well, then the
// inheritance strategy is mixed and we need to process the
// inheritance metadata to ensure this entity's subclasses process
// correctly.
if (hasInheritance()) {
// Process the table metadata if there is some, otherwise default.
processTable();
// Process the inheritance metadata.
processInheritance();
} else {
// Process the table metadata for this descriptor (for a
// joined strategy), if there is some. Must be called
// before processing the inheritance subclass metadata.
if (parentDescriptor.usesJoinedInheritanceStrategy()) {
processTable();
}
}
// Process the inheritance subclass metadata.