Package org.drools.core.util.AbstractHashTable

Examples of org.drools.core.util.AbstractHashTable.FieldIndex


    }

    public FieldIndex getFieldIndex() {
        // declaration's offset can be modified by the reteoo's PatternBuilder so modify the indexingDeclaration accordingly
        indexingDeclaration.getPattern().setOffset(declarations[0].getPattern().getOffset());
        return new FieldIndex(extractor, indexingDeclaration, INDEX_EVALUATOR);
    }
View Full Code Here


    public BetaMemory createBetaMemory(final RuleBaseConfiguration config) {
        BetaMemory memory;
        if ( this.indexed ) {
            final VariableConstraint variableConstraint = (VariableConstraint) this.constraint;
            final FieldIndex index = new FieldIndex( variableConstraint.getFieldExtractor(),
                                                     variableConstraint.getRequiredDeclarations()[0],
                                                     variableConstraint.getEvaluator() );
            LeftTupleMemory tupleMemory;
            if ( this.conf.isIndexLeftBetaMemory() ) {
                tupleMemory = new LeftTupleIndexHashTable( new FieldIndex[]{index} );
View Full Code Here

        BetaMemory memory;

        final List list = new ArrayList( 2 );
        if ( this.indexed0 ) {
            final VariableConstraint variableConstraint = (VariableConstraint) this.constraint0;
            final FieldIndex index = new FieldIndex( variableConstraint.getFieldExtractor(),
                                                     variableConstraint.getRequiredDeclarations()[0],
                                                     variableConstraint.getEvaluator() );
            list.add( index );

        }

        if ( this.indexed1 ) {
            final VariableConstraint variableConstraint = (VariableConstraint) this.constraint1;
            final FieldIndex index = new FieldIndex( variableConstraint.getFieldExtractor(),
                                                     variableConstraint.getRequiredDeclarations()[0],
                                                     variableConstraint.getEvaluator() );
            list.add( index );
        }

        if ( this.indexed2 ) {
            final VariableConstraint variableConstraint = (VariableConstraint) this.constraint2;
            final FieldIndex index = new FieldIndex( variableConstraint.getFieldExtractor(),
                                                     variableConstraint.getRequiredDeclarations()[0],
                                                     variableConstraint.getEvaluator() );
            list.add( index );
        }
View Full Code Here

        BetaMemory memory;

        final List list = new ArrayList( 2 );
        if ( this.indexed0 ) {
            final VariableConstraint variableConstraint = (VariableConstraint) this.constraint0;
            final FieldIndex index = new FieldIndex( variableConstraint.getFieldExtractor(),
                                                     variableConstraint.getRequiredDeclarations()[0],
                                                     variableConstraint.getEvaluator() );
            list.add( index );

        }

        if ( this.indexed1 ) {
            final VariableConstraint variableConstraint = (VariableConstraint) this.constraint1;
            final FieldIndex index = new FieldIndex( variableConstraint.getFieldExtractor(),
                                                     variableConstraint.getRequiredDeclarations()[0],
                                                     variableConstraint.getEvaluator() );
            list.add( index );
        }
View Full Code Here

            final List list = new ArrayList();

            for ( int pos = 0; pos <= this.indexed; pos++ ) {
                final Constraint constraint = (Constraint) entry.getObject();
                final VariableConstraint variableConstraint = (VariableConstraint) constraint;
                final FieldIndex index = new FieldIndex( variableConstraint.getFieldExtractor(),
                                                         variableConstraint.getRequiredDeclarations()[0],
                                                         variableConstraint.getEvaluator() );
                list.add( index );
                entry = (LinkedListEntry) entry.getNext();
            }
View Full Code Here

    public BetaMemory createBetaMemory(final RuleBaseConfiguration config) {
        BetaMemory memory;
        if ( this.indexed ) {
            final IndexableConstraint indexableConstraint = (IndexableConstraint) this.constraint;
            final FieldIndex index = indexableConstraint.getFieldIndex();
            LeftTupleMemory tupleMemory;
            if ( this.conf.isIndexLeftBetaMemory() ) {
                tupleMemory = new LeftTupleIndexHashTable( new FieldIndex[]{index} );
            } else {
                tupleMemory = new LeftTupleList();
View Full Code Here

        BetaMemory memory;

        final List list = new ArrayList( 2 );
        if ( this.indexed0 ) {
            final IndexableConstraint indexableConstraint = (IndexableConstraint) this.constraint0;
            final FieldIndex index = indexableConstraint.getFieldIndex();
            list.add( index );

        }

        if ( this.indexed1 ) {
            final IndexableConstraint indexableConstraint = (IndexableConstraint) this.constraint1;
            final FieldIndex index = indexableConstraint.getFieldIndex();
            list.add( index );
        }

        if ( this.indexed2 ) {
            final IndexableConstraint indexableConstraint = (IndexableConstraint) this.constraint2;
            final FieldIndex index = indexableConstraint.getFieldIndex();
            list.add( index );
        }

        if ( !list.isEmpty() ) {
            final FieldIndex[] indexes = (FieldIndex[]) list.toArray( new FieldIndex[list.size()] );
View Full Code Here

        BetaMemory memory;

        final List list = new ArrayList( 2 );
        if ( this.indexed0 ) {
            final IndexableConstraint indexableConstraint = (IndexableConstraint) this.constraint0;
            final FieldIndex index = indexableConstraint.getFieldIndex();
            list.add( index );

        }

        if ( this.indexed1 ) {
            final IndexableConstraint indexableConstraint = (IndexableConstraint) this.constraint1;
            final FieldIndex index = indexableConstraint.getFieldIndex();
            list.add( index );
        }

        if ( this.indexed2 ) {
            final IndexableConstraint indexableConstraint = (IndexableConstraint) this.constraint2;
            final FieldIndex index = indexableConstraint.getFieldIndex();
            list.add( index );
        }

        if ( this.indexed3 ) {
            final IndexableConstraint indexableConstraint = (IndexableConstraint) this.constraint3;
            final FieldIndex index = indexableConstraint.getFieldIndex();
            list.add( index );
        }

        if ( !list.isEmpty() ) {
            final FieldIndex[] indexes = (FieldIndex[]) list.toArray( new FieldIndex[list.size()] );
View Full Code Here

            final List list = new ArrayList();

            for ( int pos = 0; pos <= this.indexed; pos++ ) {
                final Constraint constraint = (Constraint) entry.getObject();
                final IndexableConstraint indexableConstraint = (IndexableConstraint) constraint;
                final FieldIndex index = indexableConstraint.getFieldIndex();
                list.add( index );
                entry = (LinkedListEntry) entry.getNext();
            }

            final FieldIndex[] indexes = (FieldIndex[]) list.toArray( new FieldIndex[list.size()] );
View Full Code Here

        final Declaration declaration = new Declaration( "typeOfCheese",
                                                         extractor,
                                                         pattern );

        final FieldIndex fieldIndex = new FieldIndex( extractor,
                                                      declaration,
                                                      equals.getEvaluator( ValueType.STRING_TYPE,
                                                                           Operator.EQUAL ) );

        final ConcurrentHashTable map = new ConcurrentHashTable( new FieldIndex[]{fieldIndex} );
View Full Code Here

TOP

Related Classes of org.drools.core.util.AbstractHashTable.FieldIndex

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.