org.objectweb.jorm.metainfo.api

Interface Manager

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

Methods inherited from interface org.objectweb.jorm.metainfo.api.MetaObject

getParent, setParent

Method Details

addMappingFactory

public void addMappingFactory(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


createClass

public Class createClass(String fqclassName)


createCompositeName

public CompositeName createCompositeName(String fqcompositeNameName)


createPackage

public Package createPackage(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


getClass

public Class getClass(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


getClasses

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


getCompositeName

public CompositeName getCompositeName(String fqcompositeNameName)


getCompositeNames

public Collection getCompositeNames()


getJormObjects

public Collection getJormObjects()


getMappingFactories

public Collection getMappingFactories()


getMappingFactory

public MappingFactory getMappingFactory(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.


getPTypeSpace

public PTypeSpace getPTypeSpace()
Returns the PTypeSpace structure.


getPackage

public Package getPackage(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.


getPackages

public 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.


init

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