Revision 44678 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.h2/src/main/java/org/gvsig/fmap/dal/store/h2/operations/H2SpatialFetchFeatureTypeOperation.java

View differences:

H2SpatialFetchFeatureTypeOperation.java
26 26
import org.gvsig.fmap.geom.GeometryLocator;
27 27
import org.gvsig.fmap.geom.GeometryManager;
28 28
import org.gvsig.fmap.geom.type.GeometryType;
29
import org.gvsig.tools.dataTypes.DataType;
29 30

  
30 31
@SuppressWarnings("UseSpecificCatch")
31 32
public class H2SpatialFetchFeatureTypeOperation extends FetchFeatureTypeOperation {
......
141 142
    }
142 143
    
143 144
    @Override
144
    public void fetch(EditableFeatureType featureType, Connection conn, TableReference table, List<String> pks, String defaultGeometryColumn, IProjection crs) throws DataException {
145
        super.fetch(featureType, conn, table, pks, defaultGeometryColumn, crs);
145
    public void fetch(Connection conn) throws DataException {
146
        super.fetch(conn);
146 147
    }
147 148
        
148 149
    @Override
......
212 213
    }
213 214

  
214 215
    @Override
215
    protected String getSQLToRetrievePrimaryKeysFromInformationSchema(
216
            String catalog,
217
            String schema,
218
            String table
219
        ) throws SQLException {
216
    public String getSQLToRetrievePrimaryKeysFromInformationSchema() throws SQLException {
220 217
        JDBCSQLBuilderBase sqlbuilder = this.createSQLBuilder();
221 218
        ExpressionBuilder expbuilder = sqlbuilder.expression();
222 219

  
......
226 223
        sqlbuilder.select().where().set(
227 224
                expbuilder.like(
228 225
                        expbuilder.column("TABLE_NAME"), 
229
                        expbuilder.constant(table)
226
                        expbuilder.constant(table.getTable())
230 227
                )
231 228
        );
232
        if (schema != null) {
229
        if( table.hasSchema() ) {
233 230
            sqlbuilder.select().where().and(
234 231
                    expbuilder.like(
235 232
                            expbuilder.column("TABLE_SCHEMA"),
236
                            expbuilder.constant(schema)
233
                            expbuilder.constant(table.getSchema())
237 234
                    )
238 235
            );
239 236
        }
240
        if (catalog != null) {
241
            sqlbuilder.select().where().and(
242
                    expbuilder.like(
243
                            expbuilder.column("CONSTRAINT_CATALOG"),
244
                            expbuilder.constant(catalog)
245
                    )
246
            );
247
        }
237
//        if (catalog != null) {
238
//            sqlbuilder.select().where().and(
239
//                    expbuilder.like(
240
//                            expbuilder.column("CONSTRAINT_CATALOG"),
241
//                            expbuilder.constant(catalog)
242
//                    )
243
//            );
244
//        }
248 245
        sqlbuilder.select().where().and(
249 246
                expbuilder.eq(
250 247
                        expbuilder.column("CONSTRAINT_TYPE"),

Also available in: Unified diff