org.objectweb.jorm.metainfo.api
Interface Manager
- MetaObject, Serializable
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.
- X. Spengler
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, ...).
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.
packageName
- the name of the schema
- 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.
fqclassName
- is the fully qualifed name of the expected class
- 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.
mapperName
- the name of the mapper to obtain
- 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.
packageName
- the name of the package
- 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.
- 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.