Revision 47693 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureQuery.java
DefaultFeatureQuery.java | ||
---|---|---|
30 | 30 |
import java.util.Iterator; |
31 | 31 |
import java.util.List; |
32 | 32 |
import java.util.Map; |
33 |
import java.util.logging.Level; |
|
34 | 33 |
import javax.json.JsonObject; |
35 | 34 |
import org.apache.commons.lang3.ArrayUtils; |
36 | 35 |
import org.apache.commons.lang3.StringUtils; |
... | ... | |
38 | 37 |
import org.apache.commons.lang3.mutable.MutableBoolean; |
39 | 38 |
import org.gvsig.expressionevaluator.Code; |
40 | 39 |
import org.gvsig.expressionevaluator.CodeBuilder; |
41 |
import org.gvsig.expressionevaluator.Codes; |
|
42 | 40 |
import org.gvsig.expressionevaluator.Expression; |
43 | 41 |
import org.gvsig.expressionevaluator.ExpressionEvaluator; |
44 | 42 |
import org.gvsig.expressionevaluator.ExpressionUtils; |
... | ... | |
281 | 279 |
if (this.hasExtraColumnDeclaredAsGroupByField()) { |
282 | 280 |
this.retrievesAllAttributes(); |
283 | 281 |
} |
282 |
if(this.extraColumns == null || this.extraColumns.isEmpty()){ |
|
283 |
return (String[])attributeNames.toArray(new String[attributeNames.size()]); |
|
284 |
} |
|
285 |
for (EditableFeatureAttributeDescriptor extraColumn : this.extraColumns) { |
|
286 |
for (String attributeName : attributeNames) { |
|
287 |
if(StringUtils.equalsIgnoreCase(attributeName, extraColumn.getName())){ |
|
288 |
attributeNames.remove(attributeName); |
|
289 |
break; |
|
290 |
} |
|
291 |
} |
|
292 |
} |
|
284 | 293 |
return (String[])attributeNames.toArray(new String[attributeNames.size()]); |
285 | 294 |
} |
286 | 295 |
|
... | ... | |
376 | 385 |
if (hasExtraColumnDeclaredAsGroupByField()) { |
377 | 386 |
return true; |
378 | 387 |
} |
388 |
if(this.extraColumns == null || this.extraColumns.isEmpty()){ |
|
389 |
return !this.attributeNames.isEmpty(); |
|
390 |
} |
|
391 |
for (EditableFeatureAttributeDescriptor extraColumn : this.extraColumns) { |
|
392 |
for (String attributeName : attributeNames) { |
|
393 |
if(StringUtils.equalsIgnoreCase(attributeName, extraColumn.getName())){ |
|
394 |
attributeNames.remove(attributeName); |
|
395 |
break; |
|
396 |
} |
|
397 |
} |
|
398 |
} |
|
379 | 399 |
return !this.attributeNames.isEmpty(); |
380 | 400 |
} |
381 | 401 |
|
... | ... | |
665 | 685 |
this.featureTypeId = state.getString("featureTypeId"); |
666 | 686 |
this.attributeNames = state.getList("attributeNames"); |
667 | 687 |
List<Expression> filterList = state.getList("filter"); |
668 |
String stateFilter = ""; |
|
669 | 688 |
DataManager dataManager = DALLocator.getDataManager(); |
670 | 689 |
if (filterList.isEmpty()) { |
671 | 690 |
this.filter = null; |
Also available in: Unified diff