All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.xmlmiddleware.xmldbms.maps.RelatedClassMap

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

public class RelatedClassMap
extends RelatedMapBase
Maps a reference to an element type-as-class to a property in another class; not for general use.

RelatedClassMaps are similar to PropertyMaps and InlineClassMaps in that all map references to child element types. A RelatedClassMap contains a pointer to the ClassMap of the child element type, as well as the information needed to join the tables of each class and order the child class in the parent.

RelatedClassMap inherits from RelatedMapBase. See RelatedMapBase for methods to get and set the element type and the link and order information.

The element type name in a RelatedClassMap can be different from the element type name in the ClassMap it points to. This allows references to a given element type to be mapped differently, depending on their parent element type.

RelatedClassMaps are stored in ClassMaps and InlineClassMaps.

Version:
2.0
Author:
Ronald Bourret, 1998-1999, 2001
See Also:
RelatedMapBase

Method Index

 o create(String, String)
Create a RelatedClassMap.
 o create(XMLName)
Create a RelatedClassMap.
 o getClassMap()
Get the ClassMap used by the related element type.
 o setClassMap(ClassMap)
Set the class map to use for the related element type.

Methods

 o create
 public static RelatedClassMap create(String uri,
                                      String localName)
Create a RelatedClassMap.

Parameters:
uri - Namespace URI of the related element type. May be null.
localName - Local name of the related element type.
Returns:
The RelatedClassMap.
 o create
 public static RelatedClassMap create(XMLName elementTypeName)
Create a RelatedClassMap.

Parameters:
elementTypeName - Name of the related element type.
Returns:
The RelatedClassMap.
 o getClassMap
 public final ClassMap getClassMap()
Get the ClassMap used by the related element type.

If the ClassMap for the element type uses another ClassMap (which might use yet another ClassMap, and so on), this method returns the last ClassMap in the chain. This is the ClassMap actually used to transfer data.

Returns:
The ClassMap. Null if the ClassMap has not yet been set.
 o setClassMap
 public void setClassMap(ClassMap classMap)
Set the class map to use for the related element type.

Generally, this will be the ClassMap of the element type used to create the RelatedClassMap. However, it can be the ClassMap of a different element type. This effectively "casts" the reference to the first element type as a reference to the second element type. For more information, see the description of the <UseClassMap> element type in the XML-DBMS mapping language.

Parameters:
classMap - The ClassMap.

All Packages  Class Hierarchy  This Package  Previous  Next  Index