comparison 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
comparison
equal deleted inserted replaced
8238:be3c11bef6e8 8239:b207eeb66edd
110 } 110 }
111 } // class Year 111 } // class Year
112 112
113 public static final class SQTimeInterval implements Filter { 113 public static final class SQTimeInterval implements Filter {
114 114
115 private int sqTiId; 115 private Integer sqTiId;
116 116
117 public SQTimeInterval(int sqTiId) { 117 public SQTimeInterval(Integer sqTiId) {
118 this.sqTiId = sqTiId; 118 this.sqTiId = sqTiId;
119 } 119 }
120 120
121 @Override 121 @Override
122 public boolean accept(Value value) { 122 public boolean accept(Value value) {
123 if (sqTiId == 0) { 123 if (sqTiId == null) {
124 /* Nothing set, nothing filtered */ 124 /* Nothing set, nothing filtered */
125 return true; 125 return true;
126 } 126 }
127 if (value.getLoad().getSQRelationTimeIntervalId() == 0) { 127 if (value.getLoad().getSQRelationTimeIntervalId() == null) {
128 /* Loads without sqRelationTimeInterval are "Schwebstoffe" and should 128 /* Loads without sqRelationTimeInterval are "Schwebstoffe" and should
129 * be included. */ 129 * be included. */
130 return true; 130 return true;
131 } 131 }
132 /* All other values should be filtered accordingly. */ 132 /* All other values should be filtered accordingly. */
133 return value.getLoad().getSQRelationTimeIntervalId() == sqTiId; 133 return value.getLoad().getSQRelationTimeIntervalId().equals(sqTiId);
134 } 134 }
135 } // class SQTimeInterval 135 } // class SQTimeInterval
136 136
137 public static final class IsEpoch implements Filter { 137 public static final class IsEpoch implements Filter {
138 138

http://dive4elements.wald.intevation.org