org.objectweb.speedo.generation.jorm
Class JormMIBuilder

java.lang.Object
  |
  +--org.objectweb.speedo.generation.jorm.JormMIBuilder

public class JormMIBuilder
extends java.lang.Object

This class is a builder of jorm meta information. Its entries are the folowing:

Author:
S.Chassande-Barrioz

Field Summary
static java.lang.String DEFAULT_RDB_BUILDER
           
static java.lang.String GENCLASS_ELM_PREFIX
          is the prefix of the fields used for the element of a generic class
static java.lang.String GENCLASS_ID_PREFIX
          is the prefix of the fields used to identify a generic class
static java.lang.String SPEEDO_ID_CID
          is a name of field of the composite name used for the identifiers in case of container identifier management.
static java.lang.String SPEEDO_ID_NAME
          is the name of the composite name used for the identifiers in case of container identifier management.
static java.lang.String SPEEDO_ID_OID
          is a name of field of the composite name used for the identifiers in case of container identifier management.
 
Constructor Summary
JormMIBuilder()
          Builds a JormMIBuilder without a jorm meta information manager and a logger.
JormMIBuilder(org.objectweb.jorm.metainfo.api.Manager manager, org.objectweb.util.monolog.api.Logger logger)
          Builds a JormMIBuilder with a jorm meta information manager and a logger
 
Method Summary
 java.util.Collection createMI(java.util.List scs)
          Creates the jorm meta information for a set of persistent classes.
 java.util.Collection createMI(java.util.List scs, java.lang.String projectName, java.lang.String mapperName)
          Creates the jorm meta information for a set of persistent classes.
 java.util.Collection createMI(java.util.List scs, java.lang.String projectName, java.lang.String mapperName, JormMIMappingBuilder mb)
          Creates the jorm meta information for a set of persistent classes.
 org.objectweb.util.monolog.api.Logger getLogger()
           
 org.objectweb.jorm.metainfo.api.Manager getManager()
          retrieves the jorm meta information manager hosting the Class and CompositeName instances.
static org.objectweb.jorm.type.api.PType getPrimitivePType(java.lang.String cn)
           
 void setLogger(org.objectweb.util.monolog.api.Logger logger)
           
 void setManager(org.objectweb.jorm.metainfo.api.Manager manager)
          retrieves the jorm meta information manager hosting the Class and CompositeName instances.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GENCLASS_ID_PREFIX

public static final java.lang.String GENCLASS_ID_PREFIX
is the prefix of the fields used to identify a generic class

GENCLASS_ELM_PREFIX

public static final java.lang.String GENCLASS_ELM_PREFIX
is the prefix of the fields used for the element of a generic class

SPEEDO_ID_NAME

public static final java.lang.String SPEEDO_ID_NAME
is the name of the composite name used for the identifiers in case of container identifier management.

DEFAULT_RDB_BUILDER

public static final java.lang.String DEFAULT_RDB_BUILDER

SPEEDO_ID_OID

public static final java.lang.String SPEEDO_ID_OID
is a name of field of the composite name used for the identifiers in case of container identifier management.

SPEEDO_ID_CID

public static final java.lang.String SPEEDO_ID_CID
is a name of field of the composite name used for the identifiers in case of container identifier management.
Constructor Detail

JormMIBuilder

public JormMIBuilder()
Builds a JormMIBuilder without a jorm meta information manager and a logger.

JormMIBuilder

public JormMIBuilder(org.objectweb.jorm.metainfo.api.Manager manager,
                     org.objectweb.util.monolog.api.Logger logger)
Builds a JormMIBuilder with a jorm meta information manager and a logger
Parameters:
manager -  
Method Detail

getManager

public org.objectweb.jorm.metainfo.api.Manager getManager()
retrieves the jorm meta information manager hosting the Class and CompositeName instances.

setManager

public void setManager(org.objectweb.jorm.metainfo.api.Manager manager)
retrieves the jorm meta information manager hosting the Class and CompositeName instances.

getLogger

public org.objectweb.util.monolog.api.Logger getLogger()

setLogger

public void setLogger(org.objectweb.util.monolog.api.Logger logger)

createMI

public java.util.Collection createMI(java.util.List scs)
                              throws SpeedoException,
                                     org.objectweb.jorm.api.PException
Creates the jorm meta information for a set of persistent classes. Only the generic part will be created.
Parameters:
scs - is a list of SpeedoClass instances.
Returns:
a Collection of jorm meta object composed by Class instances and CompositeName instances.

createMI

public java.util.Collection createMI(java.util.List scs,
                                     java.lang.String projectName,
                                     java.lang.String mapperName)
                              throws SpeedoException,
                                     org.objectweb.jorm.api.PException
Creates the jorm meta information for a set of persistent classes.
Parameters:
scs - is a list of SpeedoClass instances.
projectName - is the project name for which the mapping must be defined. If the value is null no mapping will be generated.
mapperName - is the mapper name for which the mapping must be defined. If the value is null no mapping will be generated.
Returns:
a Collection of jorm meta object composed by Class instances and CompositeName instances.

createMI

public java.util.Collection createMI(java.util.List scs,
                                     java.lang.String projectName,
                                     java.lang.String mapperName,
                                     JormMIMappingBuilder mb)
                              throws SpeedoException,
                                     org.objectweb.jorm.api.PException
Creates the jorm meta information for a set of persistent classes.
Parameters:
scs - is a list of SpeedoClass instances.
projectName - is the project name for which the mapping must be defined
mapperName - is the mapper name for which the mapping must be defined
mb - is the build of the mapping part of the meta information
Returns:
a Collection of jorm meta object composed by Class instances and CompositeName instances.

getPrimitivePType

public static org.objectweb.jorm.type.api.PType getPrimitivePType(java.lang.String cn)