Revision 46315 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/CalculateEnvelopeOfColumnOperation.java
CalculateEnvelopeOfColumnOperation.java | ||
---|---|---|
23 | 23 |
*/ |
24 | 24 |
package org.gvsig.fmap.dal.store.jdbc2.spi.operations; |
25 | 25 |
|
26 |
import java.sql.Connection; |
|
27 | 26 |
import java.sql.ResultSet; |
28 | 27 |
import java.sql.SQLException; |
29 | 28 |
import java.sql.Statement; |
... | ... | |
34 | 33 |
import org.gvsig.fmap.dal.exception.DataException; |
35 | 34 |
import org.gvsig.fmap.dal.feature.FeatureType; |
36 | 35 |
import org.gvsig.fmap.dal.store.jdbc.exception.JDBCSQLException; |
36 |
import org.gvsig.fmap.dal.store.jdbc2.JDBCConnection; |
|
37 | 37 |
import org.gvsig.fmap.dal.store.jdbc2.JDBCHelper; |
38 | 38 |
import org.gvsig.fmap.dal.store.jdbc2.JDBCUtils; |
39 | 39 |
import org.gvsig.fmap.dal.store.jdbc2.OperationsFactory.TableReference; |
... | ... | |
71 | 71 |
} |
72 | 72 |
|
73 | 73 |
@Override |
74 |
public final Object perform(Connection conn) throws DataException { |
|
74 |
public final Object perform(JDBCConnection conn) throws DataException {
|
|
75 | 75 |
Envelope env = calculateEnvelopeOfColumn(conn); |
76 | 76 |
return env; |
77 | 77 |
} |
... | ... | |
175 | 175 |
return sql; |
176 | 176 |
} |
177 | 177 |
|
178 |
public Envelope calculateEnvelopeOfColumn(Connection conn) throws DataException { |
|
178 |
public Envelope calculateEnvelopeOfColumn(JDBCConnection conn) throws DataException {
|
|
179 | 179 |
if (this.helper.hasSpatialFunctions()) { |
180 | 180 |
return calculateEnvelopeOfColumnWithAggregate(conn); |
181 | 181 |
} else { |
... | ... | |
183 | 183 |
} |
184 | 184 |
} |
185 | 185 |
|
186 |
protected Envelope calculateEnvelopeOfColumnWithAggregate(Connection conn) throws DataException { |
|
186 |
protected Envelope calculateEnvelopeOfColumnWithAggregate(JDBCConnection conn) throws DataException {
|
|
187 | 187 |
String sql = this.getSQL(); |
188 | 188 |
|
189 | 189 |
Statement st = null; |
... | ... | |
227 | 227 |
} |
228 | 228 |
} |
229 | 229 |
|
230 |
protected Envelope calculateEnvelopeOfColumnWithoutAggregate(Connection conn) throws DataException { |
|
230 |
protected Envelope calculateEnvelopeOfColumnWithoutAggregate(JDBCConnection conn) throws DataException {
|
|
231 | 231 |
// crear una sql que devuelva un resultarSet |
232 | 232 |
//bucle |
233 | 233 |
// iif instacia de string: cast string |
Also available in: Unified diff