Set<QName> recalcFTs = bboxTracker.getRecalcFeatureTypes(); Map<QName, Envelope> ftNamesToIncreaseBBoxes = bboxTracker.getIncreaseBBoxes();
@Override public List<String> performUpdate( QName ftName, List<ParsedPropertyReplacement> replacementProps, Filter filter, Lock lock ) throws FeatureStoreException { LOG.debug( "Updating feature type '" + ftName + "', filter: " + filter + ", replacement properties: " + replacementProps.size() ); List<String> updatedFids = null; if ( blobMapping != null ) { updatedFids = performUpdateBlob( ftName, replacementProps, filter, lock ); } else { updatedFids = performUpdateRelational( ftName, replacementProps, filter ); } bboxTracker.update( ftName ); return updatedFids; }
@Override public int performDelete( IdFilter filter, Lock lock ) throws FeatureStoreException { int deleted = 0; if ( blobMapping != null ) { deleted = performDeleteBlob( filter, lock ); } else { deleted = performDeleteRelational( filter, lock ); } // TODO improve this for ( FeatureType ft : schema.getFeatureTypes( null, false, false ) ) { bboxTracker.delete( ft.getName() ); } return deleted; }
/** * Creates a new {@link SQLFeatureStoreTransaction} instance. * * @param store * corresponding feature store instance, must not be <code>null</code> * @param conn * JDBC connection associated with the transaction, must not be <code>null</code> and have * <code>autocommit</code> set to <code>false</code> * @param schema * application schema with mapping information, must not be <code>null</code> * @param inspectors * feature inspectors, must not be <code>null</code> */ SQLFeatureStoreTransaction( SQLFeatureStore store, Connection conn, MappedAppSchema schema, List<FeatureInspector> inspectors ) { this.fs = store; this.conn = conn; this.schema = schema; this.inspectors = inspectors; blobMapping = schema.getBlobMapping(); if ( blobMapping != null ) { DBField bboxColumn = new DBField( blobMapping.getBBoxColumn() ); GeometryStorageParams geometryParams = new GeometryStorageParams( blobMapping.getCRS(), null, DIM_2 ); GeometryMapping blobGeomMapping = new GeometryMapping( null, true, bboxColumn, GeometryType.GEOMETRY, geometryParams, null ); blobGeomConverter = fs.getGeometryConverter( blobGeomMapping ); } this.bboxTracker = new BBoxTracker(); }