Replaced CrestTable ResultSet deleteRow with removeCrest method.
This commit is contained in:
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class CrestTable
|
|||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
final int id = rs.getInt("crest_id");
|
final int id = rs.getInt("crest_id");
|
||||||
|
|
||||||
if (_nextId.get() <= id)
|
if (_nextId.get() <= id)
|
||||||
{
|
{
|
||||||
_nextId.set(id + 1);
|
_nextId.set(id + 1);
|
||||||
@@ -88,7 +87,7 @@ public class CrestTable
|
|||||||
// a crest id because client will display wrong crest if its reused
|
// a crest id because client will display wrong crest if its reused
|
||||||
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
|
||||||
{
|
{
|
||||||
rs.deleteRow();
|
removeCrest(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +186,7 @@ public class CrestTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (Connection con = DatabaseFactory.getConnection();
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
|
PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id`=?"))
|
||||||
{
|
{
|
||||||
statement.setInt(1, crestId);
|
statement.setInt(1, crestId);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|||||||
Reference in New Issue
Block a user