org.objectweb.jorm.api
Interface PMappingStructuresManager

All Known Subinterfaces:
PMapper, PMappingCallback

public interface PMappingStructuresManager

Defines the way to access the map clusters used to define and instanciate the mapping structures.

Author:
P. Dechamboux

Method Summary
 void addDependency(java.lang.String jcname1, java.lang.String jcname2)
          Adds a dependency between a defined class and another class.
 void classDefined(java.lang.String jcname)
          Indicates that a jorm class is defined.
 void clear()
          Clean the mapping structure manager: forget all classes.
 void declareClass(java.lang.String jcname)
          Declares a persistent class.
 PMapCluster getPMapCluster(java.lang.String jcname)
          Asks for the map cluster associated with a JORM class.
 java.util.Collection getPMapClusters()
          Asks for all the map clusters defined within this mapper.
 void setLogger(Logger l)
          Assigns a logger to this schema manager.
 void setPMapper(PMapper pm)
          Assigns a mapper to this schema manager.
 

Method Detail

declareClass

public void declareClass(java.lang.String jcname)
Declares a persistent class. This call crerates the PMapCluster.

Parameters:
jcname -

getPMapCluster

public PMapCluster getPMapCluster(java.lang.String jcname)
                           throws PException
Asks for the map cluster associated with a JORM class.

Parameters:
jcname - The JORM class name.
Returns:
The relevant map cluster.
Throws:
PException - This class has not been mapped.

getPMapClusters

public java.util.Collection getPMapClusters()
Asks for all the map clusters defined within this mapper.

Returns:
The Iterator over the collection of map clusters.

addDependency

public void addDependency(java.lang.String jcname1,
                          java.lang.String jcname2)
                   throws PException
Adds a dependency between a defined class and another class.

Parameters:
jcname1 - is the class name of a defined class
jcname2 - is the name of the class which the first depends on it.
Throws:
PException - if the first jorm class name is not defined (no cluster found)

classDefined

public void classDefined(java.lang.String jcname)
                  throws PException
Indicates that a jorm class is defined.

Parameters:
jcname - which is defined.
Throws:
PException

setPMapper

public void setPMapper(PMapper pm)
Assigns a mapper to this schema manager.

Parameters:
pm - The concerned mapper.

setLogger

public void setLogger(Logger l)
Assigns a logger to this schema manager.

Parameters:
l - The concerned logger.

clear

public void clear()
           throws PException
Clean the mapping structure manager: forget all classes.

Throws:
PException