org.objectweb.jorm.metainfo.api
Interface Manager

All Superinterfaces:
MetaObject, java.io.Serializable

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, MappingFactory mappingFactory)
          Adds a mapping factory to the current metainformation manager.
 Class createClass(java.lang.String fqclassName)
           
 CompositeName createCompositeName(java.lang.String fqcompositeNameName)
           
 Package createPackage(java.lang.String packageName)
          Returns a new schema.
 Class getClass(java.lang.String fqclassName)
          Searches a class into all the declared schemas and returns it.
 java.util.Collection getClasses()
          Build an iterator to iterate all classes in the meta information (composite names are excluded)
 CompositeName getCompositeName(java.lang.String fqcompositeNameName)
           
 java.util.Collection getCompositeNames()
           
 java.util.Collection getJormObjects()
           
 java.util.Collection getMappingFactories()
           
 MappingFactory getMappingFactory(java.lang.String mapperName)
          Returns a mapping factory corresponding to a mapper name.
 Package getPackage(java.lang.String packageName)
          Returns an existing schema.
 java.util.Collection getPackages()
          Allows to know all the declared schemas into the current metainformation manager.
 PTypeSpace getPTypeSpace()
          Returns the PTypeSpace structure.
 void init()
          Initializes the current Manager.
 
Methods inherited from interface org.objectweb.jorm.metainfo.api.MetaObject
getParent, setParent
 

Method Detail

init

public void init()
Initializes the current Manager. This method replaces the constructor method, with a single parameter, which is a class loader.


getPackage

public Package getPackage(java.lang.String packageName)
Returns an existing schema. If no Package corresponds to the given name, null is returned.

Parameters:
packageName - the name of the package
Returns:
a Package object. If the schema does not exist, null is returned.

createPackage

public Package createPackage(java.lang.String packageName)
Returns a new schema. This method is the factory method to create schema object. If the schemaName schema already exists, it is returned.

Parameters:
packageName - the name of the schema
Returns:
a new schema object, or the existing one if already defined

getPackages

public java.util.Collection getPackages()
Allows to know all the declared schemas into the current metainformation manager. This iterator contains Package object.

Returns:
an iterator on registered Package object. If there is no schema, an empty iterator is returned.

addMappingFactory

public void addMappingFactory(java.lang.String mapperName,
                              MappingFactory 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.

getMappingFactories

public java.util.Collection getMappingFactories()

getClass

public Class getClass(java.lang.String fqclassName)
Searches a class into all the declared schemas and returns it. If no class corresponds to this name, null is returned.

Parameters:
fqclassName - is the fully qualifed name of the expected class
Returns:
the Class object found, null if not found

createClass

public Class createClass(java.lang.String fqclassName)

getCompositeName

public CompositeName getCompositeName(java.lang.String fqcompositeNameName)

createCompositeName

public CompositeName createCompositeName(java.lang.String fqcompositeNameName)

getClasses

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


getCompositeNames

public java.util.Collection getCompositeNames()

getJormObjects

public java.util.Collection getJormObjects()

getPTypeSpace

public PTypeSpace getPTypeSpace()
Returns the PTypeSpace structure.