Revision 44376 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 | ||
---|---|---|
9 | 9 |
import org.gvsig.expressionevaluator.ExpressionBuilder; |
10 | 10 |
import org.gvsig.expressionevaluator.ExpressionBuilder.Variable; |
11 | 11 |
import org.gvsig.fmap.dal.exception.DataException; |
12 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
12 | 13 |
import org.gvsig.fmap.dal.store.jdbc.exception.JDBCSQLException; |
13 | 14 |
import org.gvsig.fmap.dal.store.jdbc2.JDBCHelper; |
14 | 15 |
import org.gvsig.fmap.dal.store.jdbc2.JDBCUtils; |
... | ... | |
25 | 26 |
private final String baseFilter; |
26 | 27 |
private final Envelope limit; |
27 | 28 |
private final IProjection crs; |
29 |
private final FeatureType featureType; |
|
28 | 30 |
|
29 | 31 |
public CalculateEnvelopeOfColumnOperation( |
30 | 32 |
JDBCHelper helper, |
33 |
FeatureType featureType, |
|
31 | 34 |
TableReference table, |
32 | 35 |
String columnName, |
33 | 36 |
String baseFilter, |
... | ... | |
35 | 38 |
IProjection crs |
36 | 39 |
) { |
37 | 40 |
super(helper); |
41 |
this.featureType = featureType; |
|
38 | 42 |
this.table = table; |
39 | 43 |
this.columnName = columnName; |
40 | 44 |
this.baseFilter = baseFilter; |
... | ... | |
46 | 50 |
public final Object perform(Connection conn) throws DataException { |
47 | 51 |
Envelope env = calculateEnvelopeOfColumn( |
48 | 52 |
conn, |
53 |
featureType, |
|
49 | 54 |
table, |
50 | 55 |
columnName, |
51 | 56 |
baseFilter, |
... | ... | |
57 | 62 |
|
58 | 63 |
public Envelope calculateEnvelopeOfColumn( |
59 | 64 |
Connection conn, |
65 |
FeatureType featureType, |
|
60 | 66 |
TableReference table, |
61 | 67 |
String columnName, |
62 | 68 |
String baseFilter, |
... | ... | |
124 | 130 |
sqlbuilder.select().where().and( |
125 | 131 |
expbuilder.not_is_null(expbuilder.column(columnName)) |
126 | 132 |
); |
127 |
|
|
133 |
this.helper.replaceForeingValueFunction(sqlbuilder, featureType); |
|
128 | 134 |
sqlbuilder.setProperties( |
129 | 135 |
Variable.class, |
130 | 136 |
PROP_TABLE, table |
Also available in: Unified diff