Browse Source

Cookbook edit

master
Grzegorz 10 years ago
parent
commit
1ce3b3cde5
1 changed files with 0 additions and 8 deletions
  1. +0
    -8
      src/main/java/db/Cookbook.java

+ 0
- 8
src/main/java/db/Cookbook.java View File

@ -53,7 +53,6 @@ public class Cookbook {
return true; return true;
} }
/* funkcja przestarzała (deprecated) - do usunięcia w bliskiej przyszłości - PioDer */
public boolean insertRecipe(String name, String ingredients, String description, String tags, ImageIcon img) { public boolean insertRecipe(String name, String ingredients, String description, String tags, ImageIcon img) {
try { try {
BufferedImage bImg = new BufferedImage(img.getIconWidth(), img.getIconHeight(), BufferedImage.TYPE_INT_ARGB); BufferedImage bImg = new BufferedImage(img.getIconWidth(), img.getIconHeight(), BufferedImage.TYPE_INT_ARGB);
@ -62,7 +61,6 @@ public class Cookbook {
ImageIO.write( bImg, "png", bStream ); ImageIO.write( bImg, "png", bStream );
bStream.flush(); bStream.flush();
PreparedStatement prepStmt = conn.prepareStatement( PreparedStatement prepStmt = conn.prepareStatement(
"INSERT INTO recipes VALUES (NULL, ?, ?, ?, ?, ?);"); "INSERT INTO recipes VALUES (NULL, ?, ?, ?, ?, ?);");
prepStmt.setString(1, name); prepStmt.setString(1, name);
@ -78,12 +76,6 @@ public class Cookbook {
e.printStackTrace(); e.printStackTrace();
return false; return false;
} }
catch (IOException e) {
System.err.println("Blad przy wstawianiu przepisu");
e.printStackTrace();
return false;
}
return true; return true;
} }

Loading…
Cancel
Save