org.objectweb.jorm.metainfo.api
Interface Manager

All Superinterfaces:
MetaObject, java.io.Serializable
All Known Implementing Classes:
BasicManager

public interface Manager
extends MetaObject

The Manager object is the main interface to create the meta information. This object is able to register mapping factories, and to create schema objects.

Author:
X. Spengler

Method Summary
 void addMappingFactory(java.lang.String mapperName, java.lang.String mappingFactory)
          Adds a mapping factory to the current metainformation manager.
 Schema createSchema(java.lang.String schemaName)
          Returns a new schema.
 java.util.Iterator getAllClassIterator()
          Build an iterator to iterate all classes in the meta information (composite names are excluded)
 Class getClass(java.lang.String className)
          Searches a class into all the declared schemas and returns it.
 MappingFactory getMappingFactory(java.lang.String mapperName)
          Returns a mapping factory corresponding to a mapper name.
 PTypeSpace getPTypeSpace()
          Returns the PTypeSpace structure.
 Schema getSchema(java.lang.String schemaName)
          Returns an existing schema.
 void init()
           
 void init(BasicClassLoader classloader)
          Deprecated. Basic ClassLoader is not a classloader. Need refactoring (Christophe Ney)
 java.util.Iterator iterateSchema()
          Allows to know all the declared schemas into the current metainformation manager.
 
Methods inherited from interface org.objectweb.jorm.metainfo.api.MetaObject
getParent, setParent
 

Method Detail

init

public void init(BasicClassLoader classloader)
Deprecated. Basic ClassLoader is not a classloader. Need refactoring (Christophe Ney)

Initializes the current Manager. This method replaces the constructor method, with a single parameter, which is a class loader.
Parameters:
classloader - a single class loader to load class into the meta information

init

public void init()

getSchema

public Schema getSchema(java.lang.String schemaName)
Returns an existing schema. If no Schema corresponds to the given name, null is returned.
Parameters:
schemaName - the name of the schema
Returns:
a Schema object. If the schema does not exist, null is returned.

createSchema

public Schema createSchema(java.lang.String schemaName)
Returns a new schema. This method is the factory method to create schema object. If the schemaName schema already exists, it is returned.
Parameters:
schemaName - the name of the schema
Returns:
a new schema object, or the existing one if already defined

iterateSchema

public java.util.Iterator iterateSchema()
Allows to know all the declared schemas into the current metainformation manager. This iterator contains Schema object.
Returns:
an iterator on registered Schema object. If there is no schema, an empty iterator is returned.

addMappingFactory

public void addMappingFactory(java.lang.String mapperName,
                              java.lang.String mappingFactory)
Adds a mapping factory to the current metainformation manager. A mapping factory is a factory to map object (class, field, ...).
Parameters:
mapperName - the name of the mapper (i.e: OR for rdb)
mappingFactory - the mapping factory to add to the list of existing mapping factories

getMappingFactory

public MappingFactory getMappingFactory(java.lang.String mapperName)
Returns a mapping factory corresponding to a mapper name. If no MappingFactory corresponds to the mapper name, null is returned.
Parameters:
mapperName - the name of the mapper to obtain
Returns:
a mapping factory. If the mapping factory does not exist for the mapper, null is returned.

getClass

public Class getClass(java.lang.String className)
Searches a class into all the declared schemas and returns it. If no class corresponds to this name, null is returned.
Parameters:
className - the name of the class to search
Returns:
the Class object found, null if not found

getAllClassIterator

public java.util.Iterator getAllClassIterator()
Build an iterator to iterate all classes in the meta information (composite names are excluded)

getPTypeSpace

public PTypeSpace getPTypeSpace()
Returns the PTypeSpace structure.