Package org.drools.builder.conf

Examples of org.drools.builder.conf.AccumulateFunctionOption


        Set<String> keySet = new HashSet<String>();
        // in this use case, the application already has the instance of the accumulate function
        AccumulateFunction function = new AverageAccumulateFunction();
       
        // creating the option and storing in a local var just to make test easier
        AccumulateFunctionOption option = AccumulateFunctionOption.get( "avg", function );
       
        // wiring the accumulate function using the type safe method
        config.setOption( option );

        // checking the type safe getOption() method
View Full Code Here


    public void testAccumulateFunctionConfiguration() {
        // in this use case, the application already has the instance of the accumulate function
        AccumulateFunction function = new AverageAccumulateFunction();
       
        // creating the option and storing in a local var just to make test easier
        AccumulateFunctionOption option = AccumulateFunctionOption.get( "avg", function );
       
        // wiring the accumulate function using the type safe method
        config.setOption( option );

        // checking the type safe getOption() method
View Full Code Here

    public void testAccumulateFunctionConfiguration() {
        // in this use case, the application already has the instance of the accumulate function
        AccumulateFunction function = new AverageAccumulateFunction();
       
        // creating the option and storing in a local var just to make test easier
        AccumulateFunctionOption option = AccumulateFunctionOption.get( "avg", function );
       
        // wiring the accumulate function using the type safe method
        config.setOption( option );

        // checking the type safe getOption() method
View Full Code Here

        }
    }

    public static org.kie.internal.builder.conf.KnowledgeBuilderOption adaptOption(KnowledgeBuilderOption option) {
        if (option instanceof AccumulateFunctionOption) {
            AccumulateFunctionOption legacyOption = (AccumulateFunctionOption)option;
            return org.kie.internal.builder.conf.AccumulateFunctionOption.get(legacyOption.getName(),
                                                                              new AccumulateFunctionAdapter(legacyOption.getFunction()));
        }
        if (option instanceof ClassLoaderCacheOption) {
            ClassLoaderCacheOption legacyOption = (ClassLoaderCacheOption)option;
            switch (legacyOption) {
                case DISABLED:
                    return org.kie.internal.builder.conf.ClassLoaderCacheOption.DISABLED;
                case ENABLED:
                    return org.kie.internal.builder.conf.ClassLoaderCacheOption.ENABLED;
            }
        }
        if (option instanceof DefaultDialectOption) {
            DefaultDialectOption legacyOption = (DefaultDialectOption)option;
            return org.kie.internal.builder.conf.DefaultDialectOption.get(legacyOption.getName());
        }
        if (option instanceof DefaultPackageNameOption) {
            DefaultPackageNameOption legacyOption = (DefaultPackageNameOption)option;
            return org.kie.internal.builder.conf.DefaultPackageNameOption.get(legacyOption.getPackageName());
        }
        if (option instanceof DumpDirOption) {
            DumpDirOption legacyOption = (DumpDirOption)option;
            return org.kie.internal.builder.conf.DumpDirOption.get(legacyOption.getDirectory());
        }
        if (option instanceof EvaluatorOption) {
            EvaluatorOption legacyOption = (EvaluatorOption)option;
            return org.kie.internal.builder.conf.EvaluatorOption.get(legacyOption.getName(),
                                                                     (EvaluatorDefinition)legacyOption.getEvaluatorDefinition());
        }
        if (option instanceof KBuilderSeverityOption) {
            KBuilderSeverityOption legacyOption = (KBuilderSeverityOption)option;
            return org.kie.internal.builder.conf.KBuilderSeverityOption.get(legacyOption.getName(),
                                                                            legacyOption.getSeverity().toString());
        }
        if (option instanceof LanguageLevelOption) {
            LanguageLevelOption legacyOption = (LanguageLevelOption)option;
            switch (legacyOption) {
                case DRL5:
View Full Code Here

    public void testAccumulateFunctionConfiguration() {
        // in this use case, the application already has the instance of the accumulate function
        AccumulateFunction function = new AverageAccumulateFunction();
       
        // creating the option and storing in a local var just to make test easier
        AccumulateFunctionOption option = AccumulateFunctionOption.get( "avg", function );
       
        // wiring the accumulate function using the type safe method
        config.setOption( option );

        // checking the type safe getOption() method
View Full Code Here

TOP

Related Classes of org.drools.builder.conf.AccumulateFunctionOption

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.