Revision 44374 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/SearchFieldController.java
SearchFieldController.java | ||
---|---|---|
31 | 31 |
import org.gvsig.fmap.dal.exception.DataException; |
32 | 32 |
import org.gvsig.fmap.dal.feature.Feature; |
33 | 33 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
34 |
import org.gvsig.fmap.dal.feature.FeatureQuery; |
|
34 | 35 |
import org.gvsig.fmap.dal.feature.FeatureSet; |
35 | 36 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
36 | 37 |
import org.gvsig.fmap.dal.feature.FeatureType; |
... | ... | |
355 | 356 |
final long timeLimit = System.currentTimeMillis() + limit * 1000; |
356 | 357 |
final DefaultComboBoxModel model = new DefaultComboBoxModel(); |
357 | 358 |
this.setEnabled(false); |
359 |
final FeatureStore theStore = attribute.getFeatureStore(); |
|
360 |
final FeatureQuery query = theStore.createFeatureQuery(); |
|
361 |
query.addAttributeName(attribute.getDescriptor().getName()); |
|
362 |
query.setGroup(true); |
|
363 |
query.setLimit(1000); |
|
358 | 364 |
Thread th = new Thread(new Runnable() { |
359 | 365 |
@Override |
360 | 366 |
public void run() { |
361 | 367 |
try { |
362 |
FeatureSet set = attribute.getFeatureStore().getFeatureSet();
|
|
368 |
FeatureSet set = theStore.getFeatureSet(query);
|
|
363 | 369 |
set.accept(new Visitor() { |
364 | 370 |
@Override |
365 | 371 |
public void visit(Object o) throws VisitCanceledException, BaseException { |
Also available in: Unified diff