redid kotlin to java and removed coroutines again

This commit is contained in:
christian
2021-12-03 21:06:10 +01:00
parent 8eacf7da71
commit d7ed45922e
5 changed files with 1314 additions and 13 deletions
@@ -20,7 +20,7 @@ import java.util.logging.Logger;
*/
public class DataMapper {
public static ArrayList<String> getAllStrings() throws SQLException {
public static ArrayList<String> getAllStrings() {
Connection l_cCon = null;
PreparedStatement l_pStatement = null;
ResultSet l_rsSearch = null;
@@ -33,13 +33,15 @@ public class DataMapper {
while (l_rsSearch.next()) {
arrayListStr.add(l_rsSearch.getString(1));
}
} catch (SQLException throwables) {
throwables.printStackTrace();
} finally {
CloseConnections(l_pStatement, l_rsSearch, l_cCon);
}
return arrayListStr;
}
public static void InsertMYSQLStrings(String str) throws SQLException {
public static void InsertMYSQLStrings(String str) {
Connection l_cCon = null;
PreparedStatement l_pStatement = null;
ResultSet l_rsSearch = null;
@@ -49,6 +51,8 @@ public class DataMapper {
l_pStatement = l_cCon.prepareStatement(l_sSQL);
l_pStatement.setString(1, str);
l_pStatement.execute();
} catch (SQLException throwables) {
throwables.printStackTrace();
} finally {
CloseConnections(l_pStatement, l_rsSearch, l_cCon);
}