Package org.drools.verifier.components

Examples of org.drools.verifier.components.ReturnValueRestriction


     *
     * @param descr
     */
    private void visit(ReturnValueRestrictionDescr descr) {

        ReturnValueRestriction restriction = new ReturnValueRestriction( pattern );

        restriction.setPatternIsNot( pattern.isPatternNot() );
        restriction.setConstraintPath( constraint.getPath() );
        restriction.setFieldPath( constraint.getFieldPath() );
        restriction.setOperator( Operator.determineOperator( descr.getEvaluator(),
                                                             descr.isNegated() ) );
        restriction.setClassMethodName( descr.getClassMethodName() );
        restriction.setContent( descr.getContent() );
        restriction.setDeclarations( descr.getDeclarations() );
        restriction.setOrderNumber( orderNumber );
        restriction.setParentPath( pattern.getPath() );
        restriction.setParentType( pattern.getVerifierComponentType() );

        data.add( restriction );
        solvers.addPatternComponent( restriction );

    }
View Full Code Here


        saveVerifierComponentAndGet( LiteralRestriction.createRestriction( pattern,
                                                                           "" ) );
        saveVerifierComponentAndGet( new EnumRestriction( pattern ) );
        saveVerifierComponentAndGet( new QualifiedIdentifierRestriction( pattern ) );
        saveVerifierComponentAndGet( new ReturnValueRestriction( pattern ) );
        saveVerifierComponentAndGet( new ReturnValueRestriction( pattern ) );
        saveVerifierComponentAndGet( new VariableRestriction( pattern ) );
    }
View Full Code Here

        saveVerifierComponentAndGet( LiteralRestriction.createRestriction( pattern,
                                                                           "" ) );
        saveVerifierComponentAndGet( new EnumRestriction( pattern ) );
        saveVerifierComponentAndGet( new QualifiedIdentifierRestriction( pattern ) );
        saveVerifierComponentAndGet( new ReturnValueRestriction( pattern ) );
        saveVerifierComponentAndGet( new ReturnValueRestriction( pattern ) );
        saveVerifierComponentAndGet( new VariableRestriction( pattern ) );
    }
View Full Code Here

     *
     * @param descr
     */
    private void visit(ReturnValueRestrictionDescr descr) {

        ReturnValueRestriction restriction = new ReturnValueRestriction( pattern );

        restriction.setPatternIsNot( pattern.isPatternNot() );
        restriction.setConstraintPath( constraint.getPath() );
        restriction.setFieldPath( constraint.getFieldPath() );
        restriction.setOperator( Operator.determineOperator( descr.getEvaluator(),
                                                             descr.isNegated() ) );
        restriction.setClassMethodName( descr.getClassMethodName() );
        restriction.setContent( descr.getContent() );
        restriction.setDeclarations( descr.getDeclarations() );
        restriction.setOrderNumber( orderNumber );
        restriction.setParentPath( pattern.getPath() );
        restriction.setParentType( pattern.getVerifierComponentType() );

        data.add( restriction );
        solvers.addPatternComponent( restriction );

    }
View Full Code Here

        saveVerifierComponentAndGet( LiteralRestriction.createRestriction( pattern,
                                                                           "" ) );
        saveVerifierComponentAndGet( new EnumRestriction( pattern ) );
        saveVerifierComponentAndGet( new QualifiedIdentifierRestriction( pattern ) );
        saveVerifierComponentAndGet( new ReturnValueRestriction( pattern ) );
        saveVerifierComponentAndGet( new ReturnValueRestriction( pattern ) );
        saveVerifierComponentAndGet( new VariableRestriction( pattern ) );
    }
View Full Code Here

   * @param descr
   */
  private void flatten(ReturnValueRestrictionDescr descr,
      VerifierComponent parent, int orderNumber) {

    ReturnValueRestriction restriction = new ReturnValueRestriction();

    restriction.setRuleId(currentRule.getId());
    restriction.setRuleName(currentRule.getRuleName());
    restriction.setPatternId(currentPattern.getId());
    restriction.setPatternIsNot(currentPattern.isPatternNot());
    restriction.setConstraintId(currentConstraint.getId());
    restriction.setFieldId(currentConstraint.getFieldId());
    restriction.setOperator(Operator.determineOperator(
        descr.getEvaluator(), descr.isNegated()));
    restriction.setClassMethodName(descr.getClassMethodName());
    restriction.setContent(descr.getContent());
    restriction.setDeclarations(descr.getDeclarations());
    restriction.setOrderNumber(orderNumber);
    restriction.setParent(parent);

    data.add(restriction);
    solvers.addRestriction(restriction);

  }
View Full Code Here

     *
     * @param descr
     */
    private void visit(ReturnValueRestrictionDescr descr) {

        ReturnValueRestriction restriction = new ReturnValueRestriction(pattern);

        restriction.setPatternIsNot(pattern.isPatternNot());
        restriction.setFieldPath(field.getPath());
        restriction.setOperator(Operator.determineOperator(descr.getEvaluator(),
                descr.isNegated()));
        restriction.setClassMethodName(descr.getClassMethodName());
        restriction.setContent(descr.getContent());
        restriction.setDeclarations(descr.getDeclarations());
        restriction.setOrderNumber(orderNumber);
        restriction.setParentPath(pattern.getPath());
        restriction.setParentType(pattern.getVerifierComponentType());

        data.add(restriction);
        solvers.addPatternComponent(restriction);

    }
View Full Code Here

        saveVerifierComponentAndGet( LiteralRestriction.createRestriction( pattern,
                                                                           "" ) );
        saveVerifierComponentAndGet( new EnumRestriction( pattern ) );
        saveVerifierComponentAndGet( new QualifiedIdentifierRestriction( pattern ) );
        saveVerifierComponentAndGet( new ReturnValueRestriction( pattern ) );
        saveVerifierComponentAndGet( new ReturnValueRestriction( pattern ) );
        saveVerifierComponentAndGet( new VariableRestriction( pattern ) );
    }
View Full Code Here

TOP

Related Classes of org.drools.verifier.components.ReturnValueRestriction

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.