Package org.apache.torque.generator.configuration.option

Examples of org.apache.torque.generator.configuration.option.MapOptionsConfiguration


            Map<String, String> optionsMap = new HashMap<String, String>();
            for (Option option : options)
            {
                optionsMap.put(option.getKey(), option.getValue());
            }
            optionConfiguration = new MapOptionsConfiguration(optionsMap);
        }
        Loglevel convertedLoglevel = null;
        if (this.loglevel != null)
        {
            convertedLoglevel = Loglevel.getByKey(loglevel);
View Full Code Here


                                (String) propertiesEntry.getValue());
                    }
                }
            }
            getLog().debug("options = " + options);
            optionConfiguration = new MapOptionsConfiguration(options);
        }
        Loglevel convertedLoglevel = null;
        if (this.loglevel != null)
        {
            convertedLoglevel = Loglevel.getByKey(loglevel);
View Full Code Here

                new File("src/test/configuration"));
        Map<String, String> overrideOptions = new HashMap<String, String>();
        overrideOptions.put("optionWithoutNamespace", "overriddenValue");
        overrideOptions.put("newOption", "newValue");
        OptionsConfiguration optionConfiguration
                = new MapOptionsConfiguration(overrideOptions);

        UnitDescriptor unitDescriptor = new UnitDescriptor(
                UnitDescriptor.Packaging.DIRECTORY,
                projectPaths,
                new DefaultTorqueGeneratorPaths());
View Full Code Here

         UnitDescriptor unitDescriptor = new UnitDescriptor(
                 UnitDescriptor.Packaging.CLASSPATH,
                 projectPaths,
                 new DefaultTorqueGeneratorPaths());
         unitDescriptor.setOverrideOptions(
                 new MapOptionsConfiguration(overrideOptions));
         unitDescriptors.add(unitDescriptor);

         controller.run(unitDescriptors);
         assertTrue(
                 new File("target/generateOmClassesFromJava/default/org/apache/torque/templates/test/BaseAPeer.java")
View Full Code Here

                UnitDescriptor.Packaging.DIRECTORY,
                projectPaths,
                new DefaultTorqueGeneratorPaths());
        unitDescriptor.setOverrideSourceProvider(sourceProvider);
        unitDescriptor.setOverrideOptions(
                new MapOptionsConfiguration(overrideOptions));
        unitDescriptors.add(unitDescriptor);

        // sql ddl templates
        projectPaths
                = new CustomProjectPaths(
                    new Maven2DirectoryProjectPaths(new File(".")));
        projectPaths.setConfigurationDir(
                new File("src/main/resources/org/apache/torque/templates/sql"));
        projectPaths.setSourceDir(
                new File(SCHEMA_DIR));
        projectPaths.setOutputDirectory(
                null,
                new File("target/generated-sql"));
        projectPaths.setOutputDirectory(
                Maven2ProjectPaths.MODIFIABLE_OUTPUT_DIR_KEY,
                new File("target/generated-sql-2"));
        unitDescriptor = new UnitDescriptor(
                UnitDescriptor.Packaging.DIRECTORY,
                projectPaths,
                new DefaultTorqueGeneratorPaths());
        unitDescriptor.setOverrideOptions(
                new MapOptionsConfiguration(overrideOptions));
        unitDescriptors.add(unitDescriptor);

        // sql createdb templates
        projectPaths
                = new CustomProjectPaths(
                    new Maven2DirectoryProjectPaths(new File(".")));
        projectPaths.setConfigurationDir(
                new File("src/main/resources/org/apache/torque/templates/sql/createdb"));
        projectPaths.setSourceDir(
                new File(SCHEMA_DIR));
        projectPaths.setOutputDirectory(
                null,
                new File("target/generated-sql"));
        projectPaths.setOutputDirectory(
                Maven2ProjectPaths.MODIFIABLE_OUTPUT_DIR_KEY,
                new File("target/generated-sql-2"));
        unitDescriptor = new UnitDescriptor(
                UnitDescriptor.Packaging.DIRECTORY,
                projectPaths,
                new DefaultTorqueGeneratorPaths());
        unitDescriptor.setOverrideOptions(
                new MapOptionsConfiguration(overrideOptions));
        unitDescriptors.add(unitDescriptor);

        // idbroker-init-sql templates
        projectPaths
                = new CustomProjectPaths(
                    new Maven2DirectoryProjectPaths(new File(".")));
        projectPaths.setConfigurationDir(
                new File("src/main/resources/org/apache/torque/templates/idtable"));
        projectPaths.setSourceDir(
                new File(SCHEMA_DIR));
        projectPaths.setOutputDirectory(
                null,
                new File("target/generated-sql"));
        projectPaths.setOutputDirectory(
                Maven2ProjectPaths.MODIFIABLE_OUTPUT_DIR_KEY,
                new File("target/generated-sql-2"));
        unitDescriptor = new UnitDescriptor(
                UnitDescriptor.Packaging.DIRECTORY,
                projectPaths,
                new DefaultTorqueGeneratorPaths());
        unitDescriptor.setOverrideOptions(
                new MapOptionsConfiguration(overrideOptions));
        unitDescriptors.add(unitDescriptor);

        // html doc templates
        projectPaths = new CustomProjectPaths(
                    new Maven2DirectoryProjectPaths(new File(".")));
        projectPaths.setConfigurationDir(
                new File("src/main/resources/org/apache/torque/templates/doc/html"));
        projectPaths.setSourceDir(
                new File(SCHEMA_DIR));
        projectPaths.setOutputDirectory(
                null,
                new File("target/generated-docs"));
        projectPaths.setOutputDirectory(
                Maven2ProjectPaths.MODIFIABLE_OUTPUT_DIR_KEY,
                new File("target/generated-docs-2"));
        unitDescriptor = new UnitDescriptor(
                UnitDescriptor.Packaging.DIRECTORY,
                projectPaths,
                new DefaultTorqueGeneratorPaths());
        unitDescriptor.setOverrideOptions(
                new MapOptionsConfiguration(overrideOptions));
        unitDescriptors.add(unitDescriptor);

        // xdoc doc templates
        projectPaths = new CustomProjectPaths(
                new Maven2DirectoryProjectPaths(new File(".")));
        projectPaths.setConfigurationDir(
                new File("src/main/resources/org/apache/torque/templates/doc/xdoc"));
        projectPaths.setSourceDir(
                new File(SCHEMA_DIR));
        projectPaths.setOutputDirectory(
                null,
                new File("target/generated-xdocs"));
        projectPaths.setOutputDirectory(
                Maven2ProjectPaths.MODIFIABLE_OUTPUT_DIR_KEY,
                new File("target/generated-xdocs-2"));
        unitDescriptor = new UnitDescriptor(
                UnitDescriptor.Packaging.DIRECTORY,
                projectPaths,
                new DefaultTorqueGeneratorPaths());
        unitDescriptor.setOverrideOptions(
                new MapOptionsConfiguration(overrideOptions));
        unitDescriptors.add(unitDescriptor);

        // generate
        controller.run(unitDescriptors);
    }
View Full Code Here

        UnitDescriptor unitDescriptor = new UnitDescriptor(
                UnitDescriptor.Packaging.DIRECTORY,
                projectPaths,
                new DefaultTorqueGeneratorPaths());
        unitDescriptor.setOverrideOptions(
                new MapOptionsConfiguration(overrideOptions));
        unitDescriptors.add(unitDescriptor);

        controller.run(unitDescriptors);

        File generatedFile = new File("target/generated-schema/schema.xml");
View Full Code Here

TOP

Related Classes of org.apache.torque.generator.configuration.option.MapOptionsConfiguration

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.