8485868788899091929394
s.setInt(3, 0); }else{ s.setInt(3, 1); } alternate++; c.addBatch(); } } catch (SQLException e) { logger.log(Level.SEVERE, e.getMessage(), e); } }
5859606162636465666768
ThreadConnection c = ThreadConnection.getInstance(); try { PreparedStatement s = c.prepareStatement(STATEMENT); s.setString(1, tag); s.setInt(2, 0); // Initialize it to 0 first, count and add later. c.addBatch(); } catch (SQLException e) { logger.log(Level.SEVERE, e.getMessage(), e); Loader.increaseErrorCount(); } }
8081828384858687888990
s.setString(1, userNames[i]); s.setInt(2, eventId); s.setString(3, comments[i]); s.setInt(4, ratings[i]); s.setDate(5, created_at); c.addBatch(); } } catch (SQLException e) { logger.log(Level.SEVERE, e.getMessage(), e); } }
7475767778798081828384
try { for (int tagId : tagIds) { PreparedStatement s = c.prepareStatement(STATEMENT); s.setInt(1, tagId); s.setInt(2, eventId); c.addBatch(); } } catch (SQLException e) { logger.log(Level.SEVERE, e.getMessage(), e); } }
8990919293949596979899
for (int i = 0; i < fields.length; i++) if (fields[i] != null) s.setString(i + 1, fields[i]); else s.setNull(i + 1, Types.VARCHAR); c.addBatch(); } catch (SQLException e) { logger.log(Level.SEVERE, e.getMessage(), e); } } }
try { for (String userName : userNames) { PreparedStatement s = c.prepareStatement(STATEMENT); s.setString(1, userName); s.setInt(2, eventId); c.addBatch(); } } catch (SQLException e) { logger.log(Level.SEVERE, e.getMessage(), e); } }
7879808182838485868788
try { PreparedStatement s = c.prepareStatement(STATEMENT); for (int i = 0; i < fields.length; i++) s.setString(i + 1, fields[i]); s.setInt(11, addressId); c.addBatch(); } catch (SQLException e) { logger.log(Level.SEVERE, e.getMessage(), e); } } }
6162636465666768697071
s.setString(3, prefix + imageId + ".jpg"); s.setInt(4, 1280); s.setInt(5, 960); s.setString(6, prefix + imageId + "t.jpg"); s.setInt(7, this.imageId); c.addBatch(); } catch (SQLException e) { logger.log(Level.SEVERE, e.getMessage(), e); } }
104105106107108109110111112113114
else s.setNull(i + 1, Types.VARCHAR); s.setDate(7, createdTimestamp); for (int i = 0; i < ifields.length; i++) s.setInt(8 + i, ifields[i]); c.addBatch(); } catch (SQLException e) { logger.log(Level.SEVERE, e.getMessage(), e); } } }
try { for (int friend : friends) { PreparedStatement s = c.prepareStatement(STATEMENT); s.setInt(1, id); s.setInt(2, friend); c.addBatch(); } } catch (SQLException e) { logger.log(Level.SEVERE, e.getMessage(), e); } }