Skip to content
Snippets Groups Projects
Commit 237e8369 authored by Thomas Mewily's avatar Thomas Mewily
Browse files

help table

parent 404019df
No related branches found
No related tags found
No related merge requests found
...@@ -17,8 +17,8 @@ public class GommetteDAO extends _Generic<GommetteEntity> { ...@@ -17,8 +17,8 @@ public class GommetteDAO extends _Generic<GommetteEntity> {
GommetteEntity entity = new GommetteEntity(); GommetteEntity entity = new GommetteEntity();
entity.setId(resultSet.getInt("id")); entity.setId(resultSet.getInt("id"));
// entity.setCouleur TODO // entity.setCouleur TODO
entity.setNom(resultSet.getString("Nom")); entity.setNom(resultSet.getString("nom"));
entity.setDescription(resultSet.getString("Description")); entity.setDescription(resultSet.getString("description"));
entities.add(entity); entities.add(entity);
} }
...@@ -37,6 +37,13 @@ public class GommetteDAO extends _Generic<GommetteEntity> { ...@@ -37,6 +37,13 @@ public class GommetteDAO extends _Generic<GommetteEntity> {
@Override @Override
public void delete(GommetteEntity obj) { public void delete(GommetteEntity obj) {
// TODO ! try {
PreparedStatement stmt = this.connect.prepareStatement("DELETE FROM gommettes WHERE id = ?;");
stmt.setInt (1, obj.getId());
ResultSet rs = stmt.executeQuery() ;
} catch (SQLException e) {
e.printStackTrace();
}
return null;
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment