Need DatabaseConnector on SQLite
This commit is contained in:
@@ -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 "
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package de.rwu.easydrop.data.connector;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allows connecting to a SQLite Database.
|
||||||
|
*
|
||||||
|
* TODO implement
|
||||||
|
*/
|
||||||
|
public class DatabaseConnector {
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user