Examples of EnumRestriction


Examples of org.drools.verifier.components.EnumRestriction

                objectType.getFields().add( enumField );

                data.add( enumField );
            }

            EnumRestriction restriction = new EnumRestriction( pattern );

            restriction.setPatternIsNot( pattern.isPatternNot() );
            restriction.setConstraintPath( constraint.getPath() );
            restriction.setFieldPath( constraint.getFieldPath() );
            restriction.setOperator( Operator.determineOperator( descr.getEvaluator(),
                                                                 descr.isNegated() ) );
            restriction.setEnumBasePath( enumField.getPath() );
            restriction.setEnumBase( base );
            restriction.setEnumName( fieldName );
            restriction.setOrderNumber( orderNumber );
            restriction.setParentPath( pattern.getPath() );
            restriction.setParentType( pattern.getVerifierComponentType() );

            // Set field value, if it is not set.
            field.setFieldType( Field.ENUM );

            data.add( restriction );
View Full Code Here

Examples of org.drools.verifier.components.EnumRestriction

    public void testSaveVerifierComponentAndGetForAllRestrictions() {
        Pattern pattern = VerifierComponentMockFactory.createPattern1();

        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

Examples of org.drools.verifier.components.EnumRestriction

    public void testSaveVerifierComponentAndGetForAllRestrictions() {
        Pattern pattern = VerifierComponentMockFactory.createPattern1();

        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

Examples of org.drools.verifier.components.EnumRestriction

                objectType.getFields().add( enumField );

                data.add( enumField );
            }

            EnumRestriction restriction = new EnumRestriction( pattern );

            restriction.setPatternIsNot( pattern.isPatternNot() );
            restriction.setConstraintPath( constraint.getPath() );
            restriction.setFieldPath( constraint.getFieldPath() );
            restriction.setOperator( Operator.determineOperator( descr.getEvaluator(),
                                                                 descr.isNegated() ) );
            restriction.setEnumBasePath( enumField.getPath() );
            restriction.setEnumBase( base );
            restriction.setEnumName( fieldName );
            restriction.setOrderNumber( orderNumber );
            restriction.setParentPath( pattern.getPath() );
            restriction.setParentType( pattern.getVerifierComponentType() );

            // Set field value, if it is not set.
            field.setFieldType( Field.ENUM );

            data.add( restriction );
View Full Code Here

Examples of org.drools.verifier.components.EnumRestriction

    public void testSaveVerifierComponentAndGetForAllRestrictions() {
        Pattern pattern = VerifierComponentMockFactory.createPattern1();

        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

Examples of org.drools.verifier.components.EnumRestriction

        objectType.getFields().add(enumField);

        data.add(enumField);
      }

      EnumRestriction restriction = new EnumRestriction();

      restriction.setRuleId(currentRule.getId());
      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.setEnumBaseId(enumField.getId());
      restriction.setEnumBase(base);
      restriction.setEnumName(fieldName);
      restriction.setOrderNumber(orderNumber);
      restriction.setParent(parent);

      // Set field value, if it is not set.
      currentField.setFieldType(Field.FieldType.ENUM);

      data.add(restriction);
View Full Code Here

Examples of org.drools.verifier.components.EnumRestriction

                objectType.getFields().add(enumField);

                data.add(enumField);
            }

            EnumRestriction restriction = new EnumRestriction(pattern);

            restriction.setPatternIsNot(pattern.isPatternNot());
            restriction.setFieldPath(field.getPath());
            restriction.setOperator(Operator.determineOperator(descr.getEvaluator(),
                    descr.isNegated()));
            restriction.setEnumBasePath(enumField.getPath());
            restriction.setEnumBase(base);
            restriction.setEnumName(fieldName);
            restriction.setOrderNumber(orderNumber);
            restriction.setParentPath(pattern.getPath());
            restriction.setParentType(pattern.getVerifierComponentType());

            // Set field value, if it is not set.
            field.setFieldType(Field.ENUM);

            data.add(restriction);
View Full Code Here

Examples of org.drools.verifier.components.EnumRestriction

    public void testSaveVerifierComponentAndGetForAllRestrictions() {
        Pattern pattern = VerifierComponentMockFactory.createPattern1();

        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
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.