All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----de.tudarmstadt.ito.xmldbms.RelatedClassMap | +----de.tudarmstadt.ito.xmldbms.RootClassMap
RootClassMap is identical to RelatedClassMap, but is used differently and has a separate name to eliminate confusion in the code. It contains information about any element types mapped as classes with a type of TYPE_IGNOREROOT or TYPE_TOROOTTABLE. RootClassMaps are stored in a hash table in the Map class, indexed by element type name.
For element types mapped as TYPE_TOROOTTABLE, RootClassMap provides the information needed to retrieve data from the table: the candidate key and order columns. In this case, linkInfo.parentKeyIsCandidate is always false and linkInfo.parentKey is always null. This is because a root table has no parent table. Note that for determining the location of the order column, linkInfo.parentKeyIsCandidate is ignored, as the order column, like the candidate key column, is always in the "child" (root) table.
For element types mapped as TYPE_IGNOREROOT, only the classMap variable is used and only its type and subElementTypeMaps variables are used. The purpose is simply to provide a list of legal child element types; the RelatedClassMaps stored in subElementTypeMaps serve the same purpose as the RootClassMap when element types are mapped as TYPE_TOROOTTABLE (see above): to provide the candidate key and order columns used to access the "root" class table. If you find this confusing, you are correct.
public RootClassMap()
public RootClassMap(RelatedClassMap relatedClassMap)
All Packages Class Hierarchy This Package Previous Next Index