Package org.drools.rule

Examples of org.drools.rule.MVELDialectRuntimeData$MapFunctionResolverFactory


                                                      String qualifiedName,
                                                      MVELDialect dialect) {

        //Lookup ParserConfiguration to retrieve imports and package imports
        PackageRegistry packageRegistry = dialect.getPackageRegistry();
        MVELDialectRuntimeData data = (MVELDialectRuntimeData) packageRegistry.getDialectRuntimeRegistry().getDialectData( dialect.getId() );
        ParserConfiguration pconf = data.getParserConfiguration();

        final ParserContext context = new ParserContext( pconf.getImports(),
                                                         null,
                                                         qualifiedName );
View Full Code Here


        extractor = ( MVELObjectClassFieldReader ) store.getMVELReaderPerson.class.getPackage().getName(),
                                                                         Person.class.getName(),
                                                                         "addresses['home'].street",
                                                                         true,
                                                                         String.class );
        MVELDialectRuntimeData data = new MVELDialectRuntimeData();
        data.addImport( Person.class.getSimpleName(), Person.class );
        data.onAdd( null, ClassLoaderUtil.getClassLoader( null, getClass(), false ) );
       
        extractor.compile( data );
       
       
        person[0] = new Person( "bob",
View Full Code Here

            MVELObjectClassFieldReader nullExtractor =  ( MVELObjectClassFieldReader ) store.getMVELReaderPerson.class.getPackage().getName(),
                                                                                                             Person.class.getName(),
                                                                                                             "addresses['business'].phone",
                                                                                                             true,
                                                                                                             String.class );
            MVELDialectRuntimeData data = new MVELDialectRuntimeData();
            data.addImport( Person.class.getSimpleName(), Person.class );
            data.onAdd( null, ClassLoaderUtil.getClassLoader( null, getClass(), false ) );
           
            nullExtractor.compile( data );           
//
//            InternalReadAccessor nullExtractor = store.getReader( Person.class,
//                                                                  "addresses['business'].phone",
View Full Code Here

        extractor = ( MVELClassFieldReader ) store.getMVELReaderPerson.class.getPackage().getName(),
                                                                   Person.class.getName(),
                                                                   "addresses['home'].street",
                                                                   true );
        MVELDialectRuntimeData data = new MVELDialectRuntimeData();
        data.addImport( Person.class.getSimpleName(), Person.class );
        data.onAdd( null, ClassLoaderUtil.getClassLoader( null, getClass(), false ) );
       
        extractor.compile( data );
       
       
        person[0] = new Person( "bob",
View Full Code Here

           
            MVELClassFieldReader nullExtractor =  ( MVELClassFieldReader ) store.getMVELReaderPerson.class.getPackage().getName(),
                                                                       Person.class.getName(),
                                                                       "addresses['business'].phone",
                                                                       true );
            MVELDialectRuntimeData data = new MVELDialectRuntimeData();
            data.addImport( Person.class.getSimpleName(), Person.class );
            data.onAdd( null, ClassLoaderUtil.getClassLoader( null, getClass(), false ) );
           
            nullExtractor.compile( data );           
//
//            InternalReadAccessor nullExtractor = store.getReader( Person.class,
//                                                                  "addresses['business'].phone",
View Full Code Here

                                 null );               

        // do we have any functions for this namespace?
        Package pkg = workingMemory.getRuleBase().getPackage( "MAIN" );
        if ( pkg != null ) {
            MVELDialectRuntimeData data = ( MVELDialectRuntimeData ) pkg.getDialectRuntimeRegistry().getDialectData( this.id );
            factory.setNextFactory( data.getFunctionFactory() );
        }

        final Boolean result = (Boolean) MVEL.executeExpression( this.expr,
                                                                 object,
                                                                 factory );
View Full Code Here

                                 null );

        // do we have any functions for this namespace?
        Package pkg = workingMemory.getRuleBase().getPackage( "MAIN" );
        if ( pkg != null ) {
            MVELDialectRuntimeData data = ( MVELDialectRuntimeData ) pkg.getDialectRuntimeRegistry().getDialectData( this.id );
            factory.setNextFactory( data.getFunctionFactory() );
        }

        return org.drools.base.FieldFactory.getFieldValue( MVEL.executeExpression( this.expr,
                                                                                   null,
                                                                                   factory ) );
View Full Code Here

                            workingMemory,
                            null );
       
        Package pkg = workingMemory.getRuleBase().getPackage( "MAIN" );
        if ( pkg != null ) {
            MVELDialectRuntimeData data = ( MVELDialectRuntimeData ) pkg.getDialectRuntimeRegistry().getDialectData( id );
            factory.setNextFactory( data.getFunctionFactory() );
        }       
       
        CompiledExpression compexpr = (CompiledExpression) this.expr;

        //Receive breakpoints from debugger
View Full Code Here

        factory.createVariable( "rule", rule, rule.getClass() );

        // do we have any functions for this namespace?
        Package pkg = workingMemory.getRuleBase().getPackage( "MAIN" );
        if ( pkg != null ) {
            MVELDialectRuntimeData data = (MVELDialectRuntimeData) pkg.getDialectRuntimeRegistry().getDialectData( this.id );
            factory.setNextFactory( data.getFunctionFactory() );
        }

        return ((Boolean) MVEL.executeExpression( this.expr,
                                                  null,
                                                  factory )).booleanValue();
View Full Code Here

                            null );

        // do we have any functions for this namespace?
        Package pkg = workingMemory.getRuleBase().getPackage( "MAIN" );
        if ( pkg != null ) {
            MVELDialectRuntimeData data = (MVELDialectRuntimeData) pkg.getDialectRuntimeRegistry().getDialectData( this.id );
            factory.setNextFactory( data.getFunctionFactory() );
        }

        return ((Number) MVEL.executeExpression( this.expr,
                                                 factory )).intValue();
    }
View Full Code Here

TOP

Related Classes of org.drools.rule.MVELDialectRuntimeData$MapFunctionResolverFactory

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.