Project

General

Profile

Revision e17bee9c

IDe17bee9cb73b09e6c846809126de9b53694a7a7e
Parent 90b7ce27
Child 1bb027a8, 8aef3716

Added by Patrick Plitzner almost 3 years ago

ref #7165 Add convenience constructors for taxon node filter

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/filter/TaxonNodeFilter.java
247 247
        return this;
248 248
    }
249 249

  
250
    public TaxonNodeFilter andTaxonNode(TaxonNode taxonNode){
251
        taxonNodes.add(new LogicFilter<>(taxonNode, Op.AND));
252
        return this;
253
    }
254

  
250 255
    public TaxonNodeFilter orTaxon(Taxon taxon){
251 256
        taxa.add( new LogicFilter<>(taxon, Op.OR));
252 257
        return this;
......
257 262
        return this;
258 263
    }
259 264

  
265
    public TaxonNodeFilter orArea(UUID uuid){
266
        areaFilter.add( new LogicFilter<>(NamedArea.class, uuid, Op.OR));
267
        return this;
268
    }
269

  
270
    public TaxonNodeFilter andArea(UUID uuid){
271
        areaFilter.add( new LogicFilter<>(NamedArea.class, uuid, Op.AND));
272
        return this;
273
    }
274

  
260 275
    public TaxonNodeFilter orRank(Rank rankMin, Rank rankMax){
261 276
        if(rankMin!=null){
262 277
            this.rankMin = new LogicFilter<Rank>(rankMin);
......
267 282
        return this;
268 283
    }
269 284

  
285
    public TaxonNodeFilter andRank(Rank rankMin, Rank rankMax){
286
        if(rankMin!=null){
287
            this.rankMin = new LogicFilter<Rank>(rankMin, Op.AND);
288
        }
289
        if(rankMax!=null){
290
            this.rankMax = new LogicFilter<>(rankMax, Op.AND);
291
        }
292
        return this;
293
    }
294

  
270 295
    public TaxonNodeFilter orClassification(Classification classification){
271 296
        classifications.add( new LogicFilter<>(classification, Op.OR));
272 297
        return this;

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)