|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.speedo.generation.jorm.JormMIBuilder
This class is a builder of jorm meta information. Its entries are the folowing:
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 |
LIST_INDEX
is the name of the index field in the list (Genclass). |
static java.lang.String |
MAP_INDEX
|
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 |
|
JormMIBuilder(org.objectweb.jorm.metainfo.api.Manager manager,
NamingManagerFactory nmf,
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.jorm.metainfo.api.ScalarField |
createNameDefField(org.objectweb.jorm.metainfo.api.MetaObject mo,
java.lang.String fn,
org.objectweb.jorm.type.api.PType type)
It creates a field of a name def. |
org.objectweb.jorm.metainfo.api.ScalarField |
createNameDefField(org.objectweb.jorm.metainfo.api.MetaObject mo,
java.lang.String fn,
org.objectweb.jorm.type.api.PType type,
int size,
int scale)
It creates a field of a name def. |
java.lang.String |
getErrorMessage(SpeedoClass sc,
org.objectweb.jorm.metainfo.api.MetaObject mo,
org.objectweb.jorm.metainfo.api.Reference ref)
retrieves the start of a pretty error message. |
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. |
java.lang.String |
getNameDefFieldPrefix(org.objectweb.jorm.metainfo.api.Reference ref,
boolean isIdentifier,
boolean isInGenClass)
Calculates the prefix of a field use in a name def. |
org.objectweb.jorm.metainfo.api.PrimitiveElement |
getPrimitiveField(org.objectweb.jorm.metainfo.api.MetaObject mo,
java.lang.String name)
|
org.objectweb.jorm.type.api.PType |
getPrimitivePType(org.objectweb.asm.Type t)
Retrieves the jorm type matching to primitive type. |
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 |
public static final java.lang.String GENCLASS_ID_PREFIX
public static final java.lang.String GENCLASS_ELM_PREFIX
public static final java.lang.String DEFAULT_RDB_BUILDER
public static final java.lang.String LIST_INDEX
public static final java.lang.String MAP_INDEX
Constructor Detail |
public JormMIBuilder()
public JormMIBuilder(org.objectweb.jorm.metainfo.api.Manager manager, org.objectweb.util.monolog.api.Logger logger)
manager
- public JormMIBuilder(org.objectweb.jorm.metainfo.api.Manager manager, NamingManagerFactory nmf, org.objectweb.util.monolog.api.Logger logger)
manager
- Method Detail |
public org.objectweb.jorm.metainfo.api.Manager getManager()
public void setManager(org.objectweb.jorm.metainfo.api.Manager manager)
public org.objectweb.util.monolog.api.Logger getLogger()
public void setLogger(org.objectweb.util.monolog.api.Logger logger)
public java.util.Collection createMI(java.util.List scs) throws SpeedoException, org.objectweb.jorm.api.PException
scs
- is a list of SpeedoClass instances.
SpeedoException
org.objectweb.jorm.api.PException
public java.util.Collection createMI(java.util.List scs, java.lang.String projectName, java.lang.String mapperName) throws SpeedoException, org.objectweb.jorm.api.PException
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.
SpeedoException
org.objectweb.jorm.api.PException
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
scs
- is a list of SpeedoClass instances.projectName
- is the project name for which the mapping must
be definedmapperName
- is the mapper name for which the mapping must
be definedmb
- is the build of the mapping part of the meta information
SpeedoException
org.objectweb.jorm.api.PException
public java.lang.String getNameDefFieldPrefix(org.objectweb.jorm.metainfo.api.Reference ref, boolean isIdentifier, boolean isInGenClass)
getNameDefFieldPrefix
in interface MIBuilderHelper
ref
- is the meta object of the reference if the namedef is
used for a reference.isIdentifier
- indicates if the namedef is used for an identifier
(true) or if the namedef is used for a reference (false).isInGenClass
- indicates if the namedef is used in a Generic class
(true) or if the namedef is used in a class (false).
public org.objectweb.jorm.metainfo.api.ScalarField createNameDefField(org.objectweb.jorm.metainfo.api.MetaObject mo, java.lang.String fn, org.objectweb.jorm.type.api.PType type, int size, int scale) throws SpeedoException
createNameDefField
in interface MIBuilderHelper
mo
- is the jorm meta object hosting the field to createfn
- is the name of the field to createtype
- is the type of the field to createsize
- is the size of the field to create
SpeedoException
public org.objectweb.jorm.metainfo.api.ScalarField createNameDefField(org.objectweb.jorm.metainfo.api.MetaObject mo, java.lang.String fn, org.objectweb.jorm.type.api.PType type) throws SpeedoException
createNameDefField
in interface MIBuilderHelper
mo
- is the jorm meta object hosting the field to createfn
- is the name of the field to createtype
- is the type of the field to create
SpeedoException
public org.objectweb.jorm.type.api.PType getPrimitivePType(org.objectweb.asm.Type t)
getPrimitivePType
in interface MIBuilderHelper
public java.lang.String getErrorMessage(SpeedoClass sc, org.objectweb.jorm.metainfo.api.MetaObject mo, org.objectweb.jorm.metainfo.api.Reference ref)
getErrorMessage
in interface MIBuilderHelper
public org.objectweb.jorm.metainfo.api.PrimitiveElement getPrimitiveField(org.objectweb.jorm.metainfo.api.MetaObject mo, java.lang.String name)
getPrimitiveField
in interface MIBuilderHelper
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |