Revision 47174 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/expressionevaluator/impl/grammars/DataAccessGrammarFactory.java
DataAccessGrammarFactory.java | ||
---|---|---|
43 | 43 |
import static org.gvsig.fmap.dal.DataManager.FUNCTION_SELECT; |
44 | 44 |
import static org.gvsig.fmap.dal.DataManager.FUNCTION_SELECT_COUNT; |
45 | 45 |
import org.gvsig.expressionevaluator.Code.Callable; |
46 |
import org.gvsig.expressionevaluator.MutableCodes; |
|
46 | 47 |
import static org.gvsig.expressionevaluator.impl.function.dataaccess.SelectAggregateFunction.FUNCTION_SELECT_AGGREGATE; |
47 | 48 |
import static org.gvsig.expressionevaluator.impl.function.dataaccess.SelectFunction.MODE_FROM_SELECTION; |
48 | 49 |
import static org.gvsig.expressionevaluator.impl.function.dataaccess.SelectFunction.MODE_FROM_SELECTION_IF_NOT_EMPTY; |
... | ... | |
111 | 112 |
context.trace(this.toString() + ".build"); |
112 | 113 |
|
113 | 114 |
CodeBuilder codeBuilder = context.getCodeBuilder(); |
114 |
BaseCodes args = (BaseCodes) codeBuilder.args();
|
|
115 |
MutableCodes args = codeBuilder.args();
|
|
115 | 116 |
return build(context, args); |
116 | 117 |
} |
117 | 118 |
|
118 |
public Codes build(StatementContext context, BaseCodes args) {
|
|
119 |
public Codes build(StatementContext context, MutableCodes args) {
|
|
119 | 120 |
int n; |
120 |
BaseCodes argsX;
|
|
121 |
MutableCodes argsX;
|
|
121 | 122 |
|
122 | 123 |
CodeBuilder codeBuilder = context.getCodeBuilder(); |
123 | 124 |
|
... | ... | |
135 | 136 |
} |
136 | 137 |
|
137 | 138 |
n = 1; |
138 |
argsX = (BaseCodes) codeBuilder.args();
|
|
139 |
argsX = codeBuilder.args(); |
|
139 | 140 |
while (true) { |
140 | 141 |
String argNameX = "ORDER" + String.valueOf(n); |
141 | 142 |
Code code = context.getCode(argNameX); |
... | ... | |
148 | 149 |
args.add(codeBuilder.tuple(argsX)); |
149 | 150 |
|
150 | 151 |
n = 1; |
151 |
argsX = (BaseCodes) codeBuilder.args();
|
|
152 |
argsX = codeBuilder.args(); |
|
152 | 153 |
while (true) { |
153 | 154 |
String argNameX = "ORDER_MODE" + String.valueOf(n); |
154 | 155 |
Code code = context.getCode(argNameX); |
... | ... | |
213 | 214 |
context.trace(this.toString() + ".build"); |
214 | 215 |
|
215 | 216 |
CodeBuilder codeBuilder = context.getCodeBuilder(); |
216 |
BaseCodes args = (BaseCodes) codeBuilder.args();
|
|
217 |
MutableCodes args = codeBuilder.args();
|
|
217 | 218 |
|
218 | 219 |
Code table = context.getCode("TARGETTABLE"); |
219 | 220 |
args.add(codeBuilder.identifier((String) ((Code.Constant) table).value())); |
... | ... | |
237 | 238 |
public Codes build(StatementContext context) { |
238 | 239 |
context.trace(this.toString() + ".build"); |
239 | 240 |
CodeBuilder codeBuilder = context.getCodeBuilder(); |
240 |
BaseCodes args = (BaseCodes) codeBuilder.args();
|
|
241 |
MutableCodes args = codeBuilder.args();
|
|
241 | 242 |
|
242 | 243 |
Code table = context.getCode("table"); |
243 | 244 |
Code where = context.getCode("where"); |
... | ... | |
267 | 268 |
public Codes build(StatementContext context) { |
268 | 269 |
context.trace(this.toString() + ".build"); |
269 | 270 |
CodeBuilder codeBuilder = context.getCodeBuilder(); |
270 |
BaseCodes args = (BaseCodes) codeBuilder.args();
|
|
271 |
MutableCodes args = codeBuilder.args();
|
|
271 | 272 |
|
272 | 273 |
Code table = context.getCode("table"); |
273 | 274 |
Code where = context.getCode("where"); |
Also available in: Unified diff