code: public History getHistoryForID(int id) {
          History history = null;
          PreparedStatement query = null;
          ResultSet results = null;
  
          try (Connection sqlConnection = sqlService.getConnection()) {
              query = sqlConnection.prepareStatement("SELECT * FROM " + Constants.DB_TABLE_HISTORY +
                                                         " WHERE " + Constants.GENERIC_ID + "=?");
              query.setInt(1, id);
  
              logger.info("Query: {}", query.toString());
              results = query.executeQuery();
              if (results.next()) {
                  history = historyFromSQLResult(results, true, ScriptService.getInstance().getScripts(Constants.SCRIPT_TYPE_HISTORY));
              }
              query.close();
          } catch (Exception e) {
          } finally {
              try {
                  if (results != null) {
                      results.close();
                  }
              } catch (Exception e) {
              }
              try {
                  if (query != null) {
                      query.close();
                  }
              } catch (Exception e) {
              }
          }
          return history;
      }
docs: Get history for a specific database ID
  
  @param id ID of history entry
  @return History entry