Changeset 1998


Ignore:
Timestamp:
06/21/09 23:13:55 (3 years ago)
Author:
mswertz
Message:

bugfix: equals() didn't include nested rules
feature: added new QueryRule?(List<QueryRule?>) constructor for nested rules

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molgenis3_3/src/org/molgenis/framework/data/QueryRule.java

    r1960 r1998  
    1212 
    1313import java.util.Arrays; 
     14import java.util.List; 
    1415 
    1516/** 
     
    220221        } 
    221222 
     223        public QueryRule(List<QueryRule> rules) 
     224        { 
     225                this(rules.toArray(new QueryRule[rules.size()])); 
     226        } 
     227 
    222228        /** 
    223229         * Returns the field-name set for this rule. 
     
    328334                                                        .getOperator()) 
    329335                                        // value 
    330                                         && (r.getValue() != null && r.getValue().equals(this.getValue()) || r.getValue() == this.getValue())) 
     336                                        && (r.getValue() != null && r.getValue().equals(this.getValue()) || r.getValue() == this.getValue()) 
     337                                        // nested rules 
     338                                        && (r.getNestedRules() != null && r.getNestedRules().equals(this.getNestedRules()) || r.getNestedRules() == this.getNestedRules())) 
    331339                        { 
    332340                                return true; 
Note: See TracChangeset for help on using the changeset viewer.