Examples of SingleFieldConstraint


Examples of org.drools.workbench.models.datamodel.rule.SingleFieldConstraint

        private SingleFieldConstraint createParentFor( FactPattern factPattern,
                                                       String fieldName ) {
            int dotPos = fieldName.lastIndexOf( '.' );
            if ( dotPos > 0 ) {
                SingleFieldConstraint constraint = createNullCheckFieldConstraint( factPattern, fieldName.substring( 0, dotPos ) );
                factPattern.addConstraint( constraint );
                return constraint;
            }
            return null;
        }
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.SingleFieldConstraint

        private EvalExpr( String expr ) {
            this.expr = expr;
        }

        public FieldConstraint asFieldConstraint( FactPattern factPattern ) {
            SingleFieldConstraint con = new SingleFieldConstraint();
            con.setConstraintValueType( SingleFieldConstraint.TYPE_PREDICATE );
            con.setValue( expr );
            return con;
        }
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.SingleFieldConstraint

                }

                assertConstraintValue( constr );

                if ( isConstraintComplete( constr ) ) {
                    SingleFieldConstraint parent = (SingleFieldConstraint) constr.getParent();
                    StringBuilder parentBuf = new StringBuilder();
                    while ( parent != null ) {
                        String fieldName = parent.getFieldName();
                        parentBuf.insert( 0,
                                          fieldName + "." );
                        parent = (SingleFieldConstraint) parent.getParent();
                    }
                    buf.append( parentBuf );
                    if ( constr instanceof SingleFieldConstraintEBLeftSide ) {
                        buf.append( ( (SingleFieldConstraintEBLeftSide) constr ).getExpressionLeftSide().getText() );
                    } else {
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.