Examples of addDeclaration()


Examples of org.drools.rule.Pattern.addDeclaration()

                    arguments.set( pos, o ); // for now we just work with literals                   
                }                
            } else {
                // this is creating a new output binding
                // we know it doesn't exist, as we already checked for left == var                   
                declr = pattern.addDeclaration( binding.getVariable() );
               
                pos = getPos( binding.getExpression(), params );
                if ( pos < 0 ) {
                    // error this must be a binding on a slot
                    throw new RuntimeException( "named argument does not exist" );
View Full Code Here

Examples of org.drools.rule.Pattern.addDeclaration()

                    arguments.set( arg.getPosition(), declr );
                    declrIndexes.add( arg.getPosition() );                   
                    requiredDeclarations.add( declr );                       
                } else {
                    // it doesn't exist, so it's an output                   
                    declr = pattern.addDeclaration( expr );

                    // this bit is different, notice its the ArrayElementReader that we wire up to, not the declaration.
                    ArrayElementReader reader = new ArrayElementReader( arrayReader,
                                                                        varIndexes.size(),
                                                                        params[arg.getPosition()].getExtractor().getExtractToClass() );
View Full Code Here

Examples of org.drools.rule.Pattern.addDeclaration()

       
        Declaration[] declarations = new Declaration[ params.length ];
       
        try {
            for ( i = 0; i < params.length; i++ ) {
                Declaration declr = pattern.addDeclaration( params[i] );
               
                // this bit is different, notice its the ArrayElementReader that we wire up to, not the declaration.
                ArrayElementReader reader = new ArrayElementReader( arrayExtractor,
                                                                    i,
                                                                    context.getDialect().getTypeResolver().resolveType( types[i] ) );
View Full Code Here

Examples of org.drools.rule.Pattern.addDeclaration()

        String[] params = queryDescr.getParameters();
        String[] types = queryDescr.getParameterTypes();
        int i = 0;
        try {
            for ( i = 0; i < params.length; i++ ) {
                Declaration declr = pattern.addDeclaration( params[i] );
               
                // this bit is different, notice its the ArrayElementReader that we wire up to, not the declaration.
                ArrayElementReader reader = new ArrayElementReader( arrayExtractor,
                                        i,
                                        context.getDialect().getTypeResolver().resolveType( types[i] ) );
View Full Code Here

Examples of org.drools.rule.Pattern.addDeclaration()

       
        Declaration[] declarations = new Declaration[ params.length ];
       
        try {
            for ( i = 0; i < params.length; i++ ) {
                Declaration declr = pattern.addDeclaration( params[i] );
               
                // this bit is different, notice its the ArrayElementReader that we wire up to, not the declaration.
                ArrayElementReader reader = new ArrayElementReader( arrayExtractor,
                                                                    i,
                                                                    context.getDialect().getTypeResolver().resolveType( types[i] ) );
View Full Code Here

Examples of org.drools.rule.Pattern.addDeclaration()

                    arguments.set( arg.getPosition(), declr );
                    declrIndexes.add( arg.getPosition() );                   
                    requiredDeclarations.add( declr );                       
                } else {
                    // it doesn't exist, so it's an output                   
                    declr = pattern.addDeclaration( expr );

                    // this bit is different, notice its the ArrayElementReader that we wire up to, not the declaration.
                    ArrayElementReader reader = new ArrayElementReader( arrayReader,
                                                                        varIndexes.size(),
                                                                        params[arg.getPosition()].getExtractor().getExtractToClass() );                   
View Full Code Here

Examples of org.drools.rule.Pattern.addDeclaration()

                    arguments.set( pos, o ); // for now we just work with literals                   
                }                
            } else {
                // this is creating a new output binding
                // we know it doesn't exist, as we already checked for left == var                   
                declr = pattern.addDeclaration( binding.getVariable() );
               
                pos = getPos( binding.getExpression(), params );
                if ( pos < 0 ) {
                    // error this must be a binding on a slot
                    throw new RuntimeException( "named argument does not exist" );
View Full Code Here

Examples of org.drools.rule.Pattern.addDeclaration()

                               new ClassObjectType( Person.class ),
                               "$persone" );
       
       
       
        Declaration declr = p.addDeclaration( "age" );

        final InternalReadAccessor extractor = PatternBuilder.getFieldReadAccessor( context,
                                                                                    new BindingDescr("age", "age"),
                                                                                    p.getObjectType(),
                                                                                    "age",
View Full Code Here

Examples of org.drools.rule.Pattern.addDeclaration()

       
        Declaration[] declarations = new Declaration[ params.length ];
       
        try {
            for ( i = 0; i < params.length; i++ ) {
                Declaration declr = pattern.addDeclaration( params[i] );
               
                // this bit is different, notice its the ArrayElementReader that we wire up to, not the declaration.
                ArrayElementReader reader = new ArrayElementReader( arrayExtractor,
                                        i,
                                        context.getDialect().getTypeResolver().resolveType( types[i] ) );
View Full Code Here

Examples of org.drools.rule.Pattern.addDeclaration()

       
        Declaration[] declarations = new Declaration[ params.length ];
       
        try {
            for ( i = 0; i < params.length; i++ ) {
                Declaration declr = pattern.addDeclaration( params[i] );
               
                // this bit is different, notice its the ArrayElementReader that we wire up to, not the declaration.
                ArrayElementReader reader = new ArrayElementReader( arrayExtractor,
                                                                    i,
                                                                    context.getDialect().getTypeResolver().resolveType( types[i] ) );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.