Class MappingGenerator
- java.lang.Object
-
- com.sun.jdo.api.persistence.mapping.ejb.MappingGenerator
-
- com.sun.jdo.spi.persistence.support.ejb.ejbc.MappingGenerator
-
public class MappingGenerator extends MappingGenerator
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.sun.jdo.api.persistence.mapping.ejb.MappingGenerator
MappingGenerator.SQLTypeUtil
-
-
Field Summary
Fields Modifier and Type Field Description static StringJAVA_TO_DB_FLAG
-
Constructor Summary
Constructors Constructor Description MappingGenerator(EjbBundleDescriptorImpl bundle, Model model, NameMapper nameMapper, ClassLoader loader)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.netbeans.modules.dbschema.SchemaElementgenerateMapping(DeploymentContext ctx, String inputFilesPath, String generatedXmlsPath, File classout, boolean ignoreSunDeploymentDescriptors)This method will load mapping classes if there is sun-cmp-mappings.xml, otherwise it will call the database generation backend to create mapping classes and schema.StringgetDatabaseVendorName()booleanisJavaToDatabase()Returns javatodb flag in cmpResource.-
Methods inherited from class com.sun.jdo.api.persistence.mapping.ejb.MappingGenerator
cleanup, generateMappingClasses, getClassLoader, getConversionHelper, getInfoHelper, getNameMapper, isPropertyDefined, loadMappingClasses, updateColumn, updateProperties
-
-
-
-
Field Detail
-
JAVA_TO_DB_FLAG
public static final String JAVA_TO_DB_FLAG
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MappingGenerator
public MappingGenerator(EjbBundleDescriptorImpl bundle, Model model, NameMapper nameMapper, ClassLoader loader)
Constructor- Parameters:
bundle- an ejb bundlemodel- a model containing mapping class and persistence class informationnameMapper- a nameMapper for name lookuploader- a class loader
-
-
Method Detail
-
generateMapping
public org.netbeans.modules.dbschema.SchemaElement generateMapping(DeploymentContext ctx, String inputFilesPath, String generatedXmlsPath, File classout, boolean ignoreSunDeploymentDescriptors) throws IOException, org.netbeans.modules.dbschema.DBException, ModelException, org.netbeans.modules.schema2beans.Schema2BeansException, SQLException, GeneratorException, ConversionException
This method will load mapping classes if there is sun-cmp-mappings.xml, otherwise it will call the database generation backend to create mapping classes and schema. It also generates *.dbschema and sun-cmp-mappings.xml in application dir if it is in creating mapping classes mode.- Parameters:
ctx- an object containing CLI options for the database generation backendinputFilesPath- the directory where sun-cmp-mappings.xml is locatedgeneratedXmlsPath- the directory where the generated files are locatedclassout- the directory where the classes are locatedignoreSunDeploymentDescriptors- use java2db generation if set totrue.- Returns:
- a SchemaElement for mapping classes mapped to
- Throws:
IOExceptionorg.netbeans.modules.dbschema.DBExceptionModelExceptionorg.netbeans.modules.schema2beans.Schema2BeansExceptionSQLExceptionGeneratorExceptionConversionException
-
getDatabaseVendorName
public String getDatabaseVendorName()
-
isJavaToDatabase
public boolean isJavaToDatabase()
Returns javatodb flag in cmpResource.- Returns:
- true if there is name as "javatodb" and value as "true"
-
-