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 com.sun.jdo.api.persistence.mapping.ejb.MappingGenerator
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.sun.jdo.api.persistence.mapping.ejb.MappingGenerator

    com.sun.jdo.api.persistence.mapping.ejb.MappingGenerator.SQLTypeUtil
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    MappingGenerator(org.glassfish.ejb.deployment.descriptor.EjbBundleDescriptorImpl bundle, com.sun.jdo.api.persistence.model.Model model, NameMapper nameMapper, ClassLoader loader)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    org.netbeans.modules.dbschema.SchemaElement
    generateMapping(org.glassfish.api.deployment.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.
     
    boolean
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • MappingGenerator

      public MappingGenerator(org.glassfish.ejb.deployment.descriptor.EjbBundleDescriptorImpl bundle, com.sun.jdo.api.persistence.model.Model model, NameMapper nameMapper, ClassLoader loader)
      Constructor
      Parameters:
      bundle - an ejb bundle
      model - a model containing mapping class and persistence class information
      nameMapper - a nameMapper for name lookup
      loader - a class loader
  • Method Details

    • generateMapping

      public org.netbeans.modules.dbschema.SchemaElement generateMapping(org.glassfish.api.deployment.DeploymentContext ctx, String inputFilesPath, String generatedXmlsPath, File classout, boolean ignoreSunDeploymentDescriptors) throws IOException, org.netbeans.modules.dbschema.DBException, com.sun.jdo.api.persistence.model.ModelException, org.netbeans.modules.schema2beans.Schema2BeansException, SQLException, GeneratorException, com.sun.jdo.api.persistence.mapping.ejb.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 backend
      inputFilesPath - the directory where sun-cmp-mappings.xml is located
      generatedXmlsPath - the directory where the generated files are located
      classout - the directory where the classes are located
      ignoreSunDeploymentDescriptors - use java2db generation if set to true.
      Returns:
      a SchemaElement for mapping classes mapped to
      Throws:
      IOException
      org.netbeans.modules.dbschema.DBException
      com.sun.jdo.api.persistence.model.ModelException
      org.netbeans.modules.schema2beans.Schema2BeansException
      SQLException
      GeneratorException
      com.sun.jdo.api.persistence.mapping.ejb.ConversionException
    • 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"