@Override public Envelope calcEnvelope( QName ftName ) throws FeatureStoreException { Envelope env = null; Connection conn = null; try { conn = getConnection(); env = calcEnvelope( ftName, conn ); } catch ( SQLException e ) { throw new FeatureStoreException( e.getMessage() ); } finally { release( null, null, conn ); } return env; }
private Envelope calcEnvelope( QName ftName, BlobMapping blobMapping, Connection conn ) throws FeatureStoreException { LOG.debug( "Determining BBOX for feature type '{}' (BLOB mode)", ftName ); int ftId = getFtId( ftName ); String column = blobMapping.getBBoxColumn(); Envelope env = null; StringBuilder sql = new StringBuilder( "SELECT " ); sql.append( dialect.getBBoxAggregateSnippet( column ) ); sql.append( " FROM " ); sql.append( blobMapping.getTable() ); sql.append( " WHERE " ); sql.append( blobMapping.getTypeColumn() ); sql.append( "=" ); sql.append( ftId ); Statement stmt = null; ResultSet rs = null; try { stmt = conn.createStatement(); rs = stmt.executeQuery( sql.toString() ); rs.next(); ICRS crs = blobMapping.getCRS(); env = dialect.getBBoxAggregateValue( rs, 1, crs ); } catch ( SQLException e ) { LOG.debug( e.getMessage(), e ); throw new FeatureStoreException( e.getMessage(), e ); } finally { release( rs, stmt, null ); } return env; }
throw new FeatureStoreException( e.getMessage(), e ); } finally { release( rs, stmt, null );
result = new IteratorFeatureInputStream( new FeatureResultSetIterator( builder, rs, conn, stmt ) ); } catch ( Exception e ) { release( rs, stmt, conn ); String msg = "Error performing id query: " + e.getMessage(); LOG.debug( msg, e );
throw new FeatureStoreException( msg, e ); } finally { release( rs, stmt, conn );
throw new FeatureStoreException( msg, e ); } finally { release( rs, stmt, conn );
result = new IteratorFeatureInputStream( new FeatureResultSetIterator( builder, rs, conn, stmt ) ); } catch ( Exception e ) { release( rs, stmt, conn ); String msg = "Error performing query: " + e.getMessage(); LOG.debug( msg );
result = new IteratorFeatureInputStream( new FeatureResultSetIterator( builder, rs, conn, stmt ) ); } catch ( Exception e ) { release( rs, stmt, conn ); String msg = "Error performing query by id filter (relational mode): " + e.getMessage(); LOG.error( msg, e );
throw new FeatureStoreException( msg, e ); } finally { release( rs, stmt, conn );
release( rs, stmt, conn ); String msg = "Error performing query by operator filter: " + e.getMessage(); LOG.error( msg, e );