public boolean hasNext() throws IOException { if (inserter != null) { return inserter.hasNext(); } // check parent boolean hasNext = super.hasNext(); if (!hasNext) { // update phase is up, switch to insert mode inserter = new JDBCInsertFeatureWriter(this); return inserter.hasNext(); } return hasNext; }
public void close() throws IOException { if (inserter != null) { // JD: do not call close because the inserter borrowed all of its state // from this reader... super will deal with it. // AA: yet, make it throw away all references so that we won't get // false positive information about connection leaks inserter.cleanup(); inserter = null; } super.close(); } }
public SimpleFeature next() throws IOException, IllegalArgumentException, NoSuchElementException { if (inserter != null) { return inserter.next(); } return super.next(); }
public void write() throws IOException { if (inserter != null) { inserter.write(); return; } super.write(); }
public void remove() throws IOException { if (inserter != null) { inserter.remove(); return; } super.remove(); }
if (getDataStore().getSQLDialect() instanceof PreparedStatementSQLDialect) { PreparedStatement ps = getDataStore().selectSQLPS(getSchema(), queryNone, cx); return new JDBCInsertFeatureWriter(ps, cx, delegate, query); } else { getDataStore().getLogger().fine(sql); return new JDBCInsertFeatureWriter(sql, cx, delegate, query);
public void write() throws IOException { if (++curBufferPos >= buffer.length) { // buffer full => do the inserts flush(); } }
public SimpleFeature next() throws IOException { // init, setting id to null explicity since the feature is yet to be // inserted ResultSetFeature rsf = getOrCreateRSF(); rsf.init(null); return rsf; }
public void write() throws IOException { if ( inserter != null ) { inserter.write(); return; } super.write(); }
public void remove() throws IOException { if ( inserter != null ) { inserter.remove(); return; } super.remove(); }
if ( getDataStore().getSQLDialect() instanceof PreparedStatementSQLDialect ) { PreparedStatement ps = getDataStore().selectSQLPS(getSchema(), queryNone, cx); return new JDBCInsertFeatureWriter( ps, cx, delegate, query.getHints() ); getDataStore().getLogger().fine(sql); return new JDBCInsertFeatureWriter( sql, cx, delegate, query.getHints() );
public void close() throws IOException { try { flush(); } finally { super.close(); } } }
public boolean hasNext() throws IOException { if ( inserter != null ) { return inserter.hasNext(); } //check parent boolean hasNext = super.hasNext(); if ( !hasNext ) { //update phase is up, switch to insert mode inserter = new JDBCInsertFeatureWriter( this ); return inserter.hasNext(); } return hasNext; }
public void close() throws IOException { if ( inserter != null ) { //JD: do not call close because the inserter borrowed all of its state // from this reader... super will deal with it. // AA: yet, make it throw away all references so that we won't get // false positive information about connection leaks inserter.cleanup(); inserter = null; } super.close(); }
public void write() throws IOException { if ( inserter != null ) { inserter.write(); return; } super.write(); }
public SimpleFeature next() throws IOException, IllegalArgumentException, NoSuchElementException { if ( inserter != null ) { return inserter.next(); } return super.next(); }
public void remove() throws IOException { if ( inserter != null ) { inserter.remove(); return; } super.remove(); }
if ( getDataStore().getSQLDialect() instanceof PreparedStatementSQLDialect ) { PreparedStatement ps = getDataStore().selectSQLPS(getSchema(), queryNone, cx); return new JDBCInsertFeatureWriter( ps, cx, delegate, query.getHints() ); getDataStore().getLogger().fine(sql); return new JDBCInsertFeatureWriter( sql, cx, delegate, query.getHints() );
@Override protected void cleanup() throws IOException { try { flush(); } finally { for (int i = 0; i < buffer.length; i++) { if (buffer[i] == null) { break; } buffer[i].close(); buffer[i] = null; } super.cleanup(); } }
public boolean hasNext() throws IOException { if ( inserter != null ) { return inserter.hasNext(); } //check parent boolean hasNext = super.hasNext(); if ( !hasNext ) { //update phase is up, switch to insert mode inserter = new JDBCInsertFeatureWriter( this ); return inserter.hasNext(); } return hasNext; }