Revision 46163 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 | ||
---|---|---|
115 | 115 |
private FeatureExtraColumns extraColumn = new DefaultFeatureExtraColumns(); |
116 | 116 |
|
117 | 117 |
private MutableSymbolTable symbolTable; |
118 |
private String storeName; |
|
119 | 118 |
|
119 |
private String storeName; |
|
120 |
|
|
121 |
private boolean useSubquery; |
|
122 |
|
|
120 | 123 |
/** |
121 | 124 |
* Creates a FeatureQuery which will load all available Features of a type. |
122 | 125 |
* |
123 | 126 |
*/ |
124 | 127 |
public DefaultFeatureQuery() { |
125 |
super(); |
|
126 |
} |
|
128 |
super(); |
|
129 |
this.useSubquery = true; // true for backwards compatibility. |
|
130 |
} |
|
127 | 131 |
|
128 | 132 |
public DefaultFeatureQuery(String storeName) { |
129 | 133 |
this(); |
130 |
this.storeName = storeName;
|
|
134 |
this.storeName = storeName; |
|
131 | 135 |
|
132 | 136 |
} |
133 | 137 |
|
... | ... | |
138 | 142 |
* the type of Features of the query |
139 | 143 |
*/ |
140 | 144 |
public DefaultFeatureQuery(FeatureType featureType) { |
141 |
super();
|
|
145 |
this();
|
|
142 | 146 |
this.setFeatureType(featureType); |
143 | 147 |
} |
144 | 148 |
|
... | ... | |
152 | 156 |
* based on the properties of the Features |
153 | 157 |
*/ |
154 | 158 |
public DefaultFeatureQuery(FeatureType featureType, Evaluator filter) { |
155 |
super();
|
|
159 |
this();
|
|
156 | 160 |
this.setFeatureType(featureType); |
157 | 161 |
this.filter = filter; |
158 | 162 |
} |
... | ... | |
170 | 174 |
*/ |
171 | 175 |
public DefaultFeatureQuery(FeatureType featureType, Evaluator filter, |
172 | 176 |
double scale) { |
177 |
this(); |
|
173 | 178 |
this.setFeatureType(featureType); |
174 | 179 |
this.filter = filter; |
175 | 180 |
this.setScale(scale); |
... | ... | |
183 | 188 |
* the list of attribute names to load |
184 | 189 |
*/ |
185 | 190 |
public DefaultFeatureQuery(String[] attributeNames) { |
186 |
super();
|
|
191 |
this();
|
|
187 | 192 |
setAttributeNames(attributeNames); |
188 | 193 |
} |
189 | 194 |
|
... | ... | |
197 | 202 |
* based on the properties of the Features |
198 | 203 |
*/ |
199 | 204 |
public DefaultFeatureQuery(String[] attributeNames, Evaluator filter) { |
200 |
super();
|
|
205 |
this();
|
|
201 | 206 |
setAttributeNames(attributeNames); |
202 | 207 |
this.filter = filter; |
203 | 208 |
} |
... | ... | |
215 | 220 |
*/ |
216 | 221 |
public DefaultFeatureQuery(String[] attributeNames, Evaluator filter, |
217 | 222 |
double scale) { |
223 |
this(); |
|
218 | 224 |
setAttributeNames(attributeNames); |
219 | 225 |
this.filter = filter; |
220 | 226 |
this.setScale(scale); |
... | ... | |
608 | 614 |
state.set("filter", filterList); |
609 | 615 |
state.set("limit", this.limit); |
610 | 616 |
state.set("pageSize", this.pageSize); |
617 |
state.set("useSubquery", this.useSubquery); |
|
611 | 618 |
|
612 | 619 |
state.set("order", this.order); |
613 | 620 |
state.set("groupByColumns", this.groupByColumns); |
... | ... | |
662 | 669 |
} |
663 | 670 |
this.limit = state.getLong("limit"); |
664 | 671 |
this.pageSize = state.getLong("pageSize"); |
665 |
this.storeName = state.getString("storeName"); |
|
672 |
this.useSubquery = state.getBoolean("useSubquery",true); |
|
673 |
this.storeName = state.getString("storeName"); |
|
666 | 674 |
|
667 | 675 |
|
668 | 676 |
this.order = (FeatureQueryOrder) state.get("order"); |
... | ... | |
718 | 726 |
|
719 | 727 |
definition.addDynFieldLong("pageSize").setMandatory(false); |
720 | 728 |
|
729 |
definition.addDynFieldBoolean("useSubquery").setMandatory(false); |
|
721 | 730 |
|
722 | 731 |
definition.addDynFieldList("groupByColumns") |
723 | 732 |
.setClassOfItems(String.class); |
... | ... | |
873 | 882 |
this.limit = other.limit; |
874 | 883 |
|
875 | 884 |
this.pageSize = other.pageSize; |
885 |
this.useSubquery = other.useSubquery; |
|
876 | 886 |
|
877 | 887 |
if( this.groupByColumns!=null && other.groupByColumns!=null ) { |
878 | 888 |
this.groupByColumns.clear(); |
... | ... | |
926 | 936 |
this.symbolTable.setVar(name, value); |
927 | 937 |
} |
928 | 938 |
|
939 |
@Override |
|
940 |
public boolean isUseSubquery() { |
|
941 |
return useSubquery; |
|
942 |
} |
|
943 |
|
|
944 |
@Override |
|
945 |
public void setUseSubquery(boolean useSubquery) { |
|
946 |
this.useSubquery = useSubquery; |
|
947 |
} |
|
929 | 948 |
|
930 | 949 |
} |
Also available in: Unified diff