Package org.castor.ddlgen

Examples of org.castor.ddlgen.Generator


     * @param filePath an individual Schema to generate code for.
     */
    private void processFile(final String filePath) {
        log("Processing " + filePath);
        try {
            Generator ddlgen = GeneratorFactory.createDDLGenerator(
                    _databaseEngine, _globalProperties, _databaseEngineProperties);
           
            Mapping mapping = new Mapping();
            mapping.loadMapping(filePath);
            new MappingUnmarshaller().loadMappingOnly(mapping);
            // TODO: Joachim 2007-09-07 the InternalContext should be set into the unmarshaller!
           
            ddlgen.setMapping(mapping);
            ddlgen.generateDDL(_outputStream);
        } catch (IOException e) {
            throw new BuildException ("Problem finding the Castor JDO mapping file "
                    + _mappingFile.getAbsolutePath(), e);
        } catch (MappingException e) {
            throw new BuildException ("Problem loading the Castor JDO mapping file "
View Full Code Here


     * @param filePath an individual Schema to generate code for.
     */
    private void processFile(final String filePath) {
        log("Processing " + filePath);
        try {
            Generator ddlgen = GeneratorFactory.createDDLGenerator(
                    _databaseEngine, _globalProperties, _databaseEngineProperties);
           
            Mapping mapping = new Mapping();
            mapping.loadMapping(filePath);
            new MappingUnmarshaller().loadMappingOnly(mapping);
           
            ddlgen.setMapping(mapping);
            ddlgen.setPrinter(_outputStream);
            ddlgen.generateDDL();
        } catch (IOException e) {
            throw new BuildException ("Problem finding the Castor JDO mapping file "
                    + _mappingFile.getAbsolutePath(), e);
        } catch (MappingException e) {
            throw new BuildException ("Problem loading the Castor JDO mapping file "
View Full Code Here

     * @param filePath an individual Schema to generate code for.
     */
    private void processFile(final String filePath) {
        log("Processing " + filePath);
        try {
            Generator ddlgen = GeneratorFactory.createDDLGenerator(
                    _databaseEngine, _globalProperties, _databaseEngineProperties);
           
            Mapping mapping = new Mapping();
            mapping.loadMapping(filePath);
            new MappingUnmarshaller().loadMappingOnly(mapping);
           
            ddlgen.setMapping(mapping);
            ddlgen.generateDDL(_outputStream);
        } catch (IOException e) {
            throw new BuildException ("Problem finding the Castor JDO mapping file "
                    + _mappingFile.getAbsolutePath(), e);
        } catch (MappingException e) {
            throw new BuildException ("Problem loading the Castor JDO mapping file "
View Full Code Here

TOP

Related Classes of org.castor.ddlgen.Generator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.