com.arsdigita.persistence.metadata
Class MetadataRoot

java.lang.Object
  extended bycom.arsdigita.persistence.metadata.Element
      extended bycom.arsdigita.persistence.metadata.MetadataRoot

public class MetadataRoot
extends Element

The MetadataRoot is a singleton class that serves as an entry point for the metadata system.

Version:
$Revision: #24 $ $Date: 2004/04/07 $
Author:
rhs@mit.edu

Field Summary
static SimpleType BIGDECIMAL
           
static SimpleType BIGINTEGER
           
static SimpleType BLOB
           
static SimpleType BOOLEAN
           
static SimpleType BYTE
           
static SimpleType CHARACTER
           
static SimpleType CLOB
           
static SimpleType DATE
           
static SimpleType DOUBLE
           
static SimpleType FLOAT
           
static SimpleType INTEGER
           
static SimpleType LONG
           
static SimpleType OBJECT
           
static SimpleType SHORT
           
static SimpleType STRING
           
static String versionId
           
 
Constructor Summary
MetadataRoot()
           
 
Method Summary
static void clear()
           
 Set getAssociations()
           
static MetadataRoot getMetadataRoot()
          Returns the MetadataRoot instance for this JVM.
static MetadataRoot getMetadataRoot(Root root)
           
 Model getModel(String name)
          Returns the Model with the specified name, or null if no such model exists.
 Iterator getModels()
          Returns an Iterator of all the Models contained by this MetadataRoot.
 ObjectType getObjectType(String name)
          Returns an ObjectType given a fully qualified type name or null if no such type exists.
 Collection getObjectTypes()
          Returns a collection of the object types in this metadata root
 SimpleType getPrimitiveType(String name)
          Returns one of the primitive or predefined types.
 Root getRoot()
           
 boolean hasModel(String name)
          Returns true if a model with the given name exists as part of this MetadataRoot.
 boolean hasTable(String name)
           
static void loadPrimitives()
           
 
Methods inherited from class com.arsdigita.persistence.metadata.Element
equals, getColumnNumber, getFilename, getLineNumber, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values

BIGINTEGER

public static SimpleType BIGINTEGER

BIGDECIMAL

public static SimpleType BIGDECIMAL

BOOLEAN

public static SimpleType BOOLEAN

BYTE

public static SimpleType BYTE

CHARACTER

public static SimpleType CHARACTER

DATE

public static SimpleType DATE

DOUBLE

public static SimpleType DOUBLE

FLOAT

public static SimpleType FLOAT

INTEGER

public static SimpleType INTEGER

LONG

public static SimpleType LONG

SHORT

public static SimpleType SHORT

STRING

public static SimpleType STRING

BLOB

public static SimpleType BLOB

CLOB

public static SimpleType CLOB

OBJECT

public static SimpleType OBJECT
Constructor Detail

MetadataRoot

public MetadataRoot()
Method Detail

loadPrimitives

public static final void loadPrimitives()

clear

public static final void clear()

getMetadataRoot

public static final MetadataRoot getMetadataRoot(Root root)

getMetadataRoot

public static final MetadataRoot getMetadataRoot()
Returns the MetadataRoot instance for this JVM.

Returns:
The MetadataRoot instance for this JVM.

getRoot

public final Root getRoot()

getModel

public Model getModel(String name)
Returns the Model with the specified name, or null if no such model exists.

Parameters:
name - The name of the model to get.
Returns:
The specified Model, or null.

hasModel

public boolean hasModel(String name)
Returns true if a model with the given name exists as part of this MetadataRoot.

Returns:
True if a model with the given name exists as part of this MetadataRoot.

getModels

public Iterator getModels()
Returns an Iterator of all the Models contained by this MetadataRoot.

Returns:
An Iterator containing instances of Model.
See Also:
Model

getObjectType

public ObjectType getObjectType(String name)
Returns an ObjectType given a fully qualified type name or null if no such type exists. The fully qualified name consists of the model name, followed by a '.' followed by the type name.

Parameters:
name - The fully qualified name of the ObjectType.
Returns:
The ObjectType or null.

getObjectTypes

public Collection getObjectTypes()
Returns a collection of the object types in this metadata root

Returns:
a collection of the object types in this metadata root

getAssociations

public Set getAssociations()

getPrimitiveType

public SimpleType getPrimitiveType(String name)
Returns one of the primitive or predefined types.

Parameters:
name - The name of the primitive type.
Returns:
The type.

hasTable

public boolean hasTable(String name)


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC