All Packages Class Hierarchy This Package Previous Next Index
Class de.tudarmstadt.ito.xmldbms.TableMap
java.lang.Object
|
+----de.tudarmstadt.ito.xmldbms.TableMap
- public class TableMap
- extends Object
Maps a table to a class or property;
not for general use.
TableMaps contain all the information necessary to map a table to
a class or property: table information, class (element type) name,
column maps, information about related tables, and so on. Note that
the arrays containing information about related tables (relatedTables,
parentKeyIsCandidate, parentKeys, childKeys, and orderColumns) are read
in parallel and must contain the same number of entries in the same
order.
TableMaps are stored in an array in the Map class and in the
relatedTableMaps hash table in TableMap, which is keyed by table name.
- Version:
- 1.01
- Author:
- Ronald Bourret, Technical University of Darmstadt
-
childKeys
- An array containing the Columns in each child key used to join the
parent table to the child table (see parentKeyIsCandidate).
-
columnMaps
- ColumnMaps for each column in the table.
-
elementType
- Unprefixed name of the element type to which a class table is
mapped.
-
orderColumns
- An array containing order Columns and/or nulls.
-
parentKeyIsCandidate
- An array stating whether the parent table or the child table contains
the candidate key.
-
parentKeys
- An array containing the Columns in each parent key used to join the
parent table to each child table (see parentKeyIsCandidate).
-
prefixedElementType
- Prefixed name of the element type to which a class table is
mapped.
-
relatedTables
- An array containing a TableMap for each related property table or
class table.
-
table
- Table object of the mapped table.
-
type
- What the table is mapped to: TYPE_CLASSTABLE or TYPE_PROPERTYTABLE.
-
TYPE_CLASSTABLE
- Map the table to a class.
-
TYPE_PROPERTYTABLE
- Map the table to a property.
-
TableMap()
- Construct a TableMap.
-
TableMap(Table, int, String, String, ColumnMap[], int)
- Construct and initialize a TableMap.
TYPE_CLASSTABLE
public static final int TYPE_CLASSTABLE
- Map the table to a class.
TYPE_PROPERTYTABLE
public static final int TYPE_PROPERTYTABLE
- Map the table to a property.
table
public Table table
- Table object of the mapped table.
type
public int type
- What the table is mapped to: TYPE_CLASSTABLE or TYPE_PROPERTYTABLE.
elementType
public String elementType
- Unprefixed name of the element type to which a class table is
mapped. Null if the table is mapped to a property. In the future,
this and prefixedElementType should probably be replaced by an NSName.
- See Also:
- usePrefixes
prefixedElementType
public String prefixedElementType
- Prefixed name of the element type to which a class table is
mapped. Null if the table is mapped to a property. In the future,
this and elementType should probably be replaced by an NSName.
- See Also:
- usePrefixes
columnMaps
public ColumnMap columnMaps[]
- ColumnMaps for each column in the table.
These must be ordered such that all columns mapped to element types
occur before any columns mapped to attributes of these elements or
PCDATA. This guarantees that, when retrieving data from the database,
the desired element will be available when the attribute column is
processed.
A table mapped to a property can contain only one ColumnMap -- that of
the column containing the property. In the future, if we allow attributes
of element types-as-properties to be stored, then one column map of the
property table would map to an element type and all other column maps
would map to attributes of that element type.
relatedTables
public TableMap relatedTables[]
- An array containing a TableMap for each related property table or
class table.
parentKeyIsCandidate
public boolean parentKeyIsCandidate[]
- An array stating whether the parent table or the child table contains
the candidate key. The parent table is the table described in this
TableMap; the child table is the table described in the TableMap in
relatedTables. The array must match relatedTables in size and order.
parentKeys
public Column parentKeys[][]
- An array containing the Columns in each parent key used to join the
parent table to each child table (see parentKeyIsCandidate). The
outer array must match relatedTables in size and order.
childKeys
public Column childKeys[][]
- An array containing the Columns in each child key used to join the
parent table to the child table (see parentKeyIsCandidate). The
outer array must match relatedTables in size and order.
orderColumns
public Column orderColumns[]
- An array containing order Columns and/or nulls. For related class
tables, an entry can be a Column that describes the order in which
the class elements are to be created in the parent element or null
if there is no such column. For related property tables, an entry
is always null, as property order information is stored in the
ColumnMap for the column corresponding to the property.
TableMap
public TableMap()
- Construct a TableMap.
TableMap
public TableMap(Table table,
int type,
String elementType,
String prefixedElementType,
ColumnMap columnMaps[],
int numRelatedTables)
- Construct and initialize a TableMap.
All Packages Class Hierarchy This Package Previous Next Index