PreparedStatementstatement=connection.prepareStatement("SELECT * from `object` where `type` = 'item' AND `parent` IS NULL",ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
ResultSetrs=statement.executeQuery()){
while(rs.next()){
rs.deleteRow();
recordsDeleted.increment();
}
}catch(Exceptione){
Logger.error(e.toString());
}
Logger.info("Thread is exiting with "+recordsDeleted.toString()+" items deleted");