Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataValueFilter.java @ 8239:b207eeb66edd
(issue1448) Objectify sq_time_interval id.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Mon, 08 Sep 2014 19:47:01 +0200 |
parents | be3c11bef6e8 |
children | 5e38e2924c07 |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataValueFilter.java Mon Sep 08 19:01:26 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataValueFilter.java Mon Sep 08 19:47:01 2014 +0200 @@ -112,25 +112,25 @@ public static final class SQTimeInterval implements Filter { - private int sqTiId; + private Integer sqTiId; - public SQTimeInterval(int sqTiId) { + public SQTimeInterval(Integer sqTiId) { this.sqTiId = sqTiId; } @Override public boolean accept(Value value) { - if (sqTiId == 0) { + if (sqTiId == null) { /* Nothing set, nothing filtered */ return true; } - if (value.getLoad().getSQRelationTimeIntervalId() == 0) { + if (value.getLoad().getSQRelationTimeIntervalId() == null) { /* Loads without sqRelationTimeInterval are "Schwebstoffe" and should * be included. */ return true; } /* All other values should be filtered accordingly. */ - return value.getLoad().getSQRelationTimeIntervalId() == sqTiId; + return value.getLoad().getSQRelationTimeIntervalId().equals(sqTiId); } } // class SQTimeInterval