All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.xmlmiddleware.xmldbms.maps.LinkInfo

java.lang.Object
   |
   +----org.xmlmiddleware.xmldbms.maps.MapBase
           |
           +----org.xmlmiddleware.xmldbms.maps.LinkInfo

public class LinkInfo
extends MapBase
Provides information needed to link two tables; not for general use.

LinkInfo contains the keys needed to link one class table to another class table or a class table to a property table. LinkInfo classes are used in RelatedClassMaps, PropertyMaps, and RelatedTableMaps.

In PropertyMaps and RelatedClassMaps, "parent" and "child" refer to the relationship between the corresponding structures in the XML document. In a class / property relationship, such as an element type and an attribute, the parent is the class (mapped by a ClassMap) and child is the property (mapped by a PropertyMap). In a class / related class relationship, such as between an element type and a child element type mapped as a class, the parent is the class (mapped by a ClassMap) and the child is the related class (mapped by a RelatedClassMap).

In RelatedTableMaps, "parent" and "child" refer to the relationship between the corresponding structures in the database. That is, the parent is the table encountered first in the database hierarchy (mapped by a ClassTableMap) and the child is the table encountered second (mapped by a RelatedClassTableMap).

The parent / child relationship is independent of where the primary / unique key is located. That is, it could be in the table of the parent or the child. Which table contains the primary / unique key is determined by the types of the parent and child keys.

Version:
2.0
Author:
Ronald Bourret, 1998-1999, 2001

Method Index

 o create(Key, Key)
Create a new LinkInfo object.
 o getChildKey()
Get the child key.
 o getParentKey()
Get the parent key.
 o parentKeyIsUnique()
Whether the parent key is unique (or primary).

Methods

 o create
 public static LinkInfo create(Key parentKey,
                               Key childKey)
Create a new LinkInfo object.

If the parent key is a primary or unique key, the child key must be a foreign key and vice versa.

Parameters:
parentKey - The key in the parent table.
childKey - The key in the child table.
Returns:
The LinkInfo object.
 o getParentKey
 public final Key getParentKey()
Get the parent key.

Returns:
The parent key.
 o getChildKey
 public final Key getChildKey()
Get the child key.

Returns:
The child key.
 o parentKeyIsUnique
 public final boolean parentKeyIsUnique()
Whether the parent key is unique (or primary).

Returns:
Whether the parent key is unique (or primary).

All Packages  Class Hierarchy  This Package  Previous  Next  Index