org.objectweb.jorm.mapper.fos.lib
Class FosPMappingStructuresManager

java.lang.Object
  extended byorg.objectweb.jorm.mapper.fos.lib.FosPMappingStructuresManager
All Implemented Interfaces:
PMappingStructuresManager

public class FosPMappingStructuresManager
extends java.lang.Object
implements PMappingStructuresManager

Defines the way to manage relational schema for the FOS mappers.

Author:
P. Dechamboux

Field Summary
protected  Logger logger
           
 
Constructor Summary
FosPMappingStructuresManager()
           
 
Method Summary
 void addDependency(java.lang.String jcname1, java.lang.String jcname2)
          Adds a dependency between a defined class and another class.
 void addDirName(java.lang.String jcname, java.lang.String dirname)
          Adds a table column into these RDB mapping structures.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected Logger logger
Constructor Detail

FosPMappingStructuresManager

public FosPMappingStructuresManager()
Method Detail

declareClass

public void declareClass(java.lang.String jcname)
Description copied from interface: PMappingStructuresManager
Declares a persistent class. This call crerates the PMapCluster.

Specified by:
declareClass in interface PMappingStructuresManager
Parameters:
jcname -

addDependency

public void addDependency(java.lang.String jcname1,
                          java.lang.String jcname2)
                   throws PException
Description copied from interface: PMappingStructuresManager
Adds a dependency between a defined class and another class.

Specified by:
addDependency in interface PMappingStructuresManager
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

classDefined

public void classDefined(java.lang.String jcname)
                  throws PException
Description copied from interface: PMappingStructuresManager
Indicates that a jorm class is defined.

Specified by:
classDefined in interface PMappingStructuresManager
Parameters:
jcname - which is defined.
Throws:
PException

addDirName

public void addDirName(java.lang.String jcname,
                       java.lang.String dirname)
                throws PException
Adds a table column into these RDB mapping structures.

Parameters:
jcname - The JORM class name.
dirname - The table name.
Throws:
PException

getPMapCluster

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

Specified by:
getPMapCluster in interface PMappingStructuresManager
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.

Specified by:
getPMapClusters in interface PMappingStructuresManager
Returns:
The Iterator over the collection of map clusters.

setPMapper

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

Specified by:
setPMapper in interface PMappingStructuresManager
Parameters:
pm - The concerned mapper.

setLogger

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

Specified by:
setLogger in interface PMappingStructuresManager
Parameters:
l - The concerned logger.

clear

public void clear()
           throws PException
Description copied from interface: PMappingStructuresManager
Clean the mapping structure manager: forget all classes.

Specified by:
clear in interface PMappingStructuresManager
Throws:
PException