Need DatabaseConnector on SQLite

This commit is contained in:
Leonie Eitze
2023-06-25 10:47:29 +02:00
parent 4e2d400d05
commit c18f6a7fdc
2 changed files with 22 additions and 2 deletions

View File

@@ -72,13 +72,23 @@ public abstract class AbstractDataSource implements DataSource {
+ responseCode); + responseCode);
} }
String line; String line;
while ((line = reader.readLine()) != null) { while ((line = reader.readLine()) != null) {
response.append(line); response.append(line);
} }
reader.close(); reader.close();
buildProductDTO(product, response.toString()); // FIXME: Mock not complete. Data is missing
// FIXME response can be empty
String data;
if (response.toString().isEmpty()){
data = "{}";
}
else {
data = response.toString();
}
buildProductDTO(product, data);
} catch (IOException e) { } catch (IOException e) {
throw new DataSourceException( throw new DataSourceException(
"Couldn't fulfill " "Couldn't fulfill "

View File

@@ -0,0 +1,10 @@
package de.rwu.easydrop.data.connector;
/**
* Allows connecting to a SQLite Database.
*
* TODO implement
*/
public class DatabaseConnector {
}