org.spicefactory.pimento.metamodel.impl
Class TypeHierarchy

java.lang.Object
  extended by org.spicefactory.pimento.metamodel.impl.MetamodelImpl
      extended by org.spicefactory.pimento.metamodel.impl.TypeHierarchy
All Implemented Interfaces:
Externalizable, Metamodel

public class TypeHierarchy
extends MetamodelImpl

A type hierarchy represents the metamodel for a polymorphic association. In contrast to a regular metamodel instance it contains only the entity metamodel for entities that belong to a single type hierarchy.

Author:
Jens Halm

Constructor Summary
TypeHierarchy(Entity rootEntity)
          Creates a new instance.
 
Method Summary
 Entity rootEntity()
          Returns the root entity of the type hierarchy.
 void writeExternal(DataOutput out)
          Saves the content of this object to the DataOutput instance.
 
Methods inherited from class org.spicefactory.pimento.metamodel.impl.MetamodelImpl
add, forClass, forHandle, getEntities, readExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeHierarchy

public TypeHierarchy(Entity rootEntity)
Creates a new instance.

Parameters:
rootEntity - the root entity of the type hierarchy
Method Detail

rootEntity

public Entity rootEntity()
Returns the root entity of the type hierarchy.

Returns:
the root entity of the type hierarchy

writeExternal

public void writeExternal(DataOutput out)
Description copied from interface: Externalizable
Saves the content of this object to the DataOutput instance.

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class MetamodelImpl
Parameters:
out - the output to write to