Package org.apache.torque.generator.option

Examples of org.apache.torque.generator.option.Option


        Options inheritedOptions = inheritedConfiguration.getOptions();
        for (Map.Entry<QualifiedName, Option> entry
            : inheritedOptions.getGlobalScope().entrySet())
        {
            QualifiedName optionName = entry.getKey();
            Option option = entry.getValue();
            if (!options.getGlobalScope().containsKey(optionName))
            {
                options.setGlobalOption(option);
            }
        }
View Full Code Here


     */
    public Object getOption(String name)
    {
        Options options = unitConfiguration.getOptions();
        QualifiedName qualifiedName = getQualifiedName(name);
        Option option = options.getInHierarchy(qualifiedName);
        Object result = null;
        if (option != null)
        {
            result = option.getValue();
        }
        return result;
    }
View Full Code Here

    @Before
    public void setUp()
    {
        Options options = new Options();
        {
            Option optionWithoutNamespace = new OptionImpl(
                    "optionWithoutNamespace",
                    "ValueWithoutNamespace");
            options.setGlobalOption(optionWithoutNamespace);
        }
        {
            Option optionWithNamespace = new OptionImpl(
                    "org.apache.torque.generator.optionWithNamespace",
                    "ValueWithNamespace");
            options.setGlobalOption(optionWithNamespace);
        }
        {
            Option optionWithSpecialChars = new OptionImpl(
                    "opt${}i\\on",
                    "ValueWith${}Special\\Chars");
            options.setGlobalOption(optionWithSpecialChars);
        }
View Full Code Here

                        configurationHandlers);

        // check that we have read the correct configuration
        {
            Options options = unitConfiguration.getOptions();
            Option option  = options.getInHierarchy(
                    new QualifiedName("configuration"));
            assertNotNull("option configuration should be set", option);
            assertEquals("fromClasspath", option.getValue());
        }

        // check that the outlets are read
        {
            OutletConfiguration outletConfiguration
View Full Code Here

                = configurationReader.read(
                        unitDescriptor,
                        configurationHandlers);
        Options options = unitConfiguration.getOptions();
        {
            Option option = options.getInHierarchy(
                    new QualifiedName("optionWithoutNamespace"));
            assertEquals("overriddenValue", option.getValue());
        }
        {
            Option option = options.getInHierarchy(
                    new QualifiedName("newOption"));
            assertEquals("newValue", option.getValue());
        }
    }
View Full Code Here

    {
        Set<Option> options = new HashSet<Option>();
        for (Entry<? extends Object, ? extends Object> entry
                : optionsMap.entrySet())
        {
            Option option = new OptionImpl(
                    entry.getKey().toString(),
                    entry.getValue());
            options.add(option);
            if (log.isTraceEnabled())
            {
View Full Code Here

TOP

Related Classes of org.apache.torque.generator.option.Option

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.