Replaced CrestTable ResultSet deleteRow with removeCrest method.

This commit is contained in:
MobiusDevelopment
2021-11-08 17:21:06 +00:00
parent ac07bd6d8a
commit fcc9de1b6d
25 changed files with 50 additions and 75 deletions

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -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;
} }