| java.lang.Object org.objectweb.speedo.generation.jorm.JormMIBuilder
JormMIBuilder | public class JormMIBuilder implements MIBuilderHelper,Loggable(Code) | | This class is a builder of jorm meta information. Its entries are the
following:
- the jorm meta information manager,
- A collection of SpeedoClass object,
- the project name,
- the mapper name,
- a JormMIMappingBuilder instance able to build the mapping part for the
mapper which the name is specified.
author: S.Chassande-Barrioz |
Method Summary | |
public Collection | createMI(List scs) Creates the jorm meta information for a set of persistent classes. | public Collection | createMI(List scs, String projectName, String mapperName) Creates the jorm meta information for a set of persistent classes.
Parameters: scs - is a list of SpeedoClass instances. Parameters: projectName - is the project name for which the mapping mustbe defined. | public Collection | createMI(List scs, String projectName, String mapperName, JormMIMappingBuilder mb) Creates the jorm meta information for a set of persistent classes. | public ScalarField | createNameDefField(MetaObject mo, String fn, PType type, int size, int scale) It creates a field of a name def. | public ScalarField | createNameDefField(MetaObject mo, String fn, PType type) It creates a field of a name def. | public String | getErrorMessage(SpeedoClass sc, MetaObject mo, Reference ref) retrieves the start of a pretty error message. | public Logger | getLogger() | public LoggerFactory | getLoggerFactory() | public Manager | getManager() retrieves the jorm meta information manager hosting the Class and
CompositeName instances. | public Manager | getManager(MetaObject mo) | public String | getNameDefFieldPrefix(Reference ref, boolean isIdentifier, boolean isInGenClass, SpeedoField sf) Calculates the prefix of a field use in a name def.
Parameters: ref - is the meta object of the reference if the namedef isused for a reference. Parameters: isIdentifier - indicates if the namedef is used for an identifier(true) or if the namedef is used for a reference (false). Parameters: isInGenClass - indicates if the namedef is used in a Generic class(true) or if the namedef is used in a class (false). | public PrimitiveElement | getPrimitiveField(MetaObject mo, String name) | public PType | getPrimitivePType(Type t) Retrieves the jorm type matching to primitive type. | public void | setLogger(Logger logger) | public void | setLoggerFactory(LoggerFactory lf) | public void | setManager(Manager manager) retrieves the jorm meta information manager hosting the Class and
CompositeName instances. |
DEFAULT_RDB_BUILDER | final public static String DEFAULT_RDB_BUILDER(Code) | | |
GENCLASS_ELM_PREFIX | final public static String GENCLASS_ELM_PREFIX(Code) | | is the prefix of the fields used for the element of a generic class
|
GENCLASS_ID_PREFIX | final public static String GENCLASS_ID_PREFIX(Code) | | is the prefix of the fields used to identify a generic class
|
LIST_INDEX | final public static String LIST_INDEX(Code) | | is the name of the index field in the list (Genclass).
|
JormMIBuilder | public JormMIBuilder()(Code) | | Builds a JormMIBuilder without a jorm meta information manager
and a logger.
|
JormMIBuilder | public JormMIBuilder(Manager manager, Logger logger)(Code) | | Builds a JormMIBuilder with a jorm meta information manager and a logger
Parameters: manager - |
JormMIBuilder | public JormMIBuilder(Manager manager, NamingManagerFactory nmf, Logger logger)(Code) | | Builds a JormMIBuilder with a jorm meta information manager and a logger
Parameters: manager - |
createMI | public Collection createMI(List scs) throws SpeedoException, PException(Code) | | 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. a Collection of jorm meta object composed by Class instances andCompositeName instances. |
createMI | public Collection createMI(List scs, String projectName, String mapperName) throws SpeedoException, PException(Code) | | Creates the jorm meta information for a set of persistent classes.
Parameters: scs - is a list of SpeedoClass instances. Parameters: projectName - is the project name for which the mapping mustbe defined. If the value is null no mapping will be generated. Parameters: mapperName - is the mapper name for which the mapping mustbe defined. If the value is null no mapping will be generated. a Collection of jorm meta object composed by Class instances andCompositeName instances. |
createMI | public Collection createMI(List scs, String projectName, String mapperName, JormMIMappingBuilder mb) throws SpeedoException, PException(Code) | | Creates the jorm meta information for a set of persistent classes.
Parameters: scs - is a list of SpeedoClass instances. Parameters: projectName - is the project name for which the mapping mustbe defined Parameters: mapperName - is the mapper name for which the mapping mustbe defined Parameters: mb - is the build of the mapping part of the meta information a Collection of jorm meta object composed by Class instances andCompositeName instances. |
createNameDefField | public ScalarField createNameDefField(MetaObject mo, String fn, PType type, int size, int scale) throws SpeedoException(Code) | | It creates a field of a name def. This field will be hidden
Parameters: mo - is the jorm meta object hosting the field to create Parameters: fn - is the name of the field to create Parameters: type - is the type of the field to create Parameters: size - is the size of the field to create the jorm meta object representing the namedef field |
createNameDefField | public ScalarField createNameDefField(MetaObject mo, String fn, PType type) throws SpeedoException(Code) | | It creates a field of a name def. This field will be hidden
Parameters: mo - is the jorm meta object hosting the field to create Parameters: fn - is the name of the field to create Parameters: type - is the type of the field to create the jorm meta object representing the namedef field |
getErrorMessage | public String getErrorMessage(SpeedoClass sc, MetaObject mo, Reference ref)(Code) | | retrieves the start of a pretty error message.
|
getLogger | public Logger getLogger()(Code) | | |
getLoggerFactory | public LoggerFactory getLoggerFactory()(Code) | | |
getManager | public Manager getManager()(Code) | | retrieves the jorm meta information manager hosting the Class and
CompositeName instances.
|
getManager | public Manager getManager(MetaObject mo)(Code) | | |
getNameDefFieldPrefix | public String getNameDefFieldPrefix(Reference ref, boolean isIdentifier, boolean isInGenClass, SpeedoField sf) throws SpeedoException(Code) | | Calculates the prefix of a field use in a name def.
Parameters: ref - is the meta object of the reference if the namedef isused for a reference. Parameters: isIdentifier - indicates if the namedef is used for an identifier(true) or if the namedef is used for a reference (false). Parameters: isInGenClass - indicates if the namedef is used in a Generic class(true) or if the namedef is used in a class (false). a string value (never null) representing the prefix of a namedef field. |
getPrimitiveField | public PrimitiveElement getPrimitiveField(MetaObject mo, String name)(Code) | | |
getPrimitivePType | public PType getPrimitivePType(Type t)(Code) | | Retrieves the jorm type matching to primitive type. It converts a Type
defined in ASM into a PType defined in Jorm. If the type is not a jorm
primitive type then a null value is returned.
|
setLogger | public void setLogger(Logger logger)(Code) | | |
setLoggerFactory | public void setLoggerFactory(LoggerFactory lf)(Code) | | |
setManager | public void setManager(Manager manager)(Code) | | retrieves the jorm meta information manager hosting the Class and
CompositeName instances.
|
|
|