Examples of AndConstraint


Examples of org.araneaframework.uilib.form.constraint.AndConstraint

    //
    //Complex constraint
    //
   
    //First searching scenario
    AndConstraint clientNameConstraint = new AndConstraint();
    clientNameConstraint.addConstraint(new NotEmptyConstraint(searchForm.getElementByFullName("clientFirstName")));
    clientNameConstraint.addConstraint(new NotEmptyConstraint(searchForm.getElementByFullName("clientLastName")));
   
    //Second searching scenario
    NotEmptyConstraint clientPersonalIdConstraint = new NotEmptyConstraint(searchForm.getElementByFullName("clientPersonalId"));
   
    //Third searching scenario
    AndConstraint clientAddressConstraint = new AndConstraint();
    clientAddressConstraint.addConstraint(new NotEmptyConstraint(searchForm.getElementByFullName("clientAddressTown")));
    clientAddressConstraint.addConstraint(new NotEmptyConstraint(searchForm.getElementByFullName("clientAddressStreet")));
    clientAddressConstraint.addConstraint(new NotEmptyConstraint(searchForm.getElementByFullName("clientAddressHouse")));
   
    //Combining scenarios
    OrConstraint searchConstraint = new OrConstraint();   
    searchConstraint.addConstraint(clientNameConstraint);
    searchConstraint.addConstraint(clientPersonalIdConstraint);
View Full Code Here

Examples of org.drools.rule.AndConstraint

            build( context,
                   pattern,
                   (PredicateDescr) constraint,
                   container );
        } else if ( constraint instanceof AndDescr ) {
            AndConstraint and = new AndConstraint();
            for ( Iterator it = ((AndDescr) constraint).getDescrs().iterator(); it.hasNext(); ) {
                this.buildConstraint( context,
                                      pattern,
                                      it.next(),
                                      and );
            }

            if ( container == null ) {
                pattern.addConstraint( and );
            } else {
                if ( and.getType().equals( Constraint.ConstraintType.UNKNOWN ) ) {
                    this.setConstraintType( pattern,
                                            (MutableTypeConstraint) and );
                }
                container.addConstraint( and );
            }
View Full Code Here

Examples of org.drools.rule.AndConstraint

            build( context,
                   pattern,
                   (PredicateDescr) constraint,
                   container );
        } else if ( constraint instanceof AndDescr ) {
            AndConstraint and = new AndConstraint();
            for ( Iterator it = ((AndDescr) constraint).getDescrs().iterator(); it.hasNext(); ) {
                this.buildConstraint( context,
                                      pattern,
                                      it.next(),
                                      and );
            }

            if ( container == null ) {
                pattern.addConstraint( and );
            } else {
                if ( and.getType().equals( Constraint.ConstraintType.UNKNOWN ) ) {
                    this.setConstraintType( pattern,
                                            (MutableTypeConstraint) and );
                }
                container.addConstraint( and );
            }
View Full Code Here

Examples of org.drools.rule.AndConstraint

            build( context,
                   pattern,
                   (PredicateDescr) constraint,
                   container );
        } else if ( constraint instanceof AndDescr ) {
            AndConstraint and = new AndConstraint();
            for ( Iterator it = ((AndDescr) constraint).getDescrs().iterator(); it.hasNext(); ) {
                this.buildConstraint( context,
                                      pattern,
                                      it.next(),
                                      and );
View Full Code Here

Examples of org.drools.rule.AndConstraint

            build( context,
                   pattern,
                   (PredicateDescr) constraint,
                   container );
        } else if ( constraint instanceof AndDescr ) {
            AndConstraint and = new AndConstraint();
            for ( Iterator it = ((AndDescr) constraint).getDescrs().iterator(); it.hasNext(); ) {
                this.buildConstraint( context,
                                      pattern,
                                      it.next(),
                                      and );
View Full Code Here

Examples of org.drools.rule.AndConstraint

            build( context,
                   pattern,
                   (PredicateDescr) constraint,
                   container );
        } else if ( constraint instanceof AndDescr ) {
            AndConstraint and = new AndConstraint();
            for ( Iterator it = ((AndDescr) constraint).getDescrs().iterator(); it.hasNext(); ) {
                this.buildConstraint( context,
                                      pattern,
                                      it.next(),
                                      and );
            }

            if ( container == null ) {
                pattern.addConstraint( and );
            } else {
                if( and.getType().equals( Constraint.ConstraintType.UNKNOWN ) ) {
                    this.setConstraintType( pattern, (MutableTypeConstraint) and );
                }
                container.addConstraint( and );
            }
        } else if ( constraint instanceof OrDescr ) {
View Full Code Here

Examples of org.drools.rule.AndConstraint

            build( context,
                   pattern,
                   (PredicateDescr) constraint,
                   container );
        } else if ( constraint instanceof AndDescr ) {
            AndConstraint and = new AndConstraint();
            for ( Iterator it = ((AndDescr) constraint).getDescrs().iterator(); it.hasNext(); ) {
                this.buildConstraint( context,
                                      pattern,
                                      it.next(),
                                      and );
            }

            if ( container == null ) {
                pattern.addConstraint( and );
            } else {
                if ( and.getType().equals( Constraint.ConstraintType.UNKNOWN ) ) {
                    this.setConstraintType( pattern,
                                            (MutableTypeConstraint) and );
                }
                container.addConstraint( and );
            }
View Full Code Here

Examples of org.drools.rule.AndConstraint

            build( context,
                   pattern,
                   (PredicateDescr) constraint,
                   container );
        } else if ( constraint instanceof AndDescr ) {
            AndConstraint and = new AndConstraint();
            for ( Iterator it = ((AndDescr) constraint).getDescrs().iterator(); it.hasNext(); ) {
                this.buildConstraint( context,
                                      pattern,
                                      it.next(),
                                      and );
            }

            if ( container == null ) {
                pattern.addConstraint( and );
            } else {
                if ( and.getType().equals( Constraint.ConstraintType.UNKNOWN ) ) {
                    this.setConstraintType( pattern,
                                            (MutableTypeConstraint) and );
                }
                container.addConstraint( and );
            }
View Full Code Here

Examples of org.drools.rule.AndConstraint

            build( context,
                   pattern,
                   (PredicateDescr) constraint,
                   container );
        } else if ( constraint instanceof AndDescr ) {
            AndConstraint and = new AndConstraint();
            for ( Iterator it = ((AndDescr) constraint).getDescrs().iterator(); it.hasNext(); ) {
                this.buildConstraint( context,
                                      pattern,
                                      it.next(),
                                      and );
            }

            if ( container == null ) {
                pattern.addConstraint( and );
            } else {
                if ( and.getType().equals( Constraint.ConstraintType.UNKNOWN ) ) {
                    this.setConstraintType( pattern,
                                            (MutableTypeConstraint) and );
                }
                container.addConstraint( and );
            }
View Full Code Here

Examples of org.drools.rule.AndConstraint

            build( context,
                   pattern,
                   (PredicateDescr) constraint,
                   container );
        } else if ( constraint instanceof AndDescr ) {
            AndConstraint and = new AndConstraint();
            for ( Iterator it = ((AndDescr) constraint).getDescrs().iterator(); it.hasNext(); ) {
                this.buildConstraint( context,
                                      pattern,
                                      it.next(),
                                      and );
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.