@Override @SuppressWarnings("ValueOfIncrementOrDecrementUsed") protected void fill(final PreparedStatement pstm, final Pou item, final boolean update) throws SQLException { final PreparedStatementEx pstmEx = new PreparedStatementEx(pstm); int index = 1; pstm.setString(index++, item.getNazev()); pstmEx.setBoolean(index++, item.getNespravny()); pstm.setInt(index++, item.getOrpKod()); pstm.setInt(index++, item.getSpravniObecKod()); pstm.setLong(index++, item.getIdTransRuian()); pstmEx.setDate(index++, item.getPlatiOd()); pstm.setLong(index++, item.getNzIdGlobalni()); pstmEx.setBoolean(index++, item.getZmenaGrafiky()); if (!Config.isNoGis()) { pstm.setString(index++, item.getDefinicniBod()); pstm.setString(index++, item.getHranice()); } pstm.setInt(index++, item.getKod()); if (update) { pstmEx.setLong(index++, item.getIdTransRuian()); } }
@Override protected void fillExists(final PreparedStatement pstm, final Pou item) throws SQLException { pstm.setInt(1, item.getKod()); }