1
2
3
4 package sk.stuba.fiit.foo07.genex.dao;
5
6 import java.sql.SQLException;
7 import java.util.ArrayList;
8
9 import sk.stuba.fiit.foo07.genex.beans.Picture;
10 import sk.stuba.fiit.foo07.genex.exceptions.PictureInPictureQuestionException;
11
12
13
14
15
16 public interface PictureDao {
17
18 public Picture getPictureByID(Integer pictureID) throws SQLException;
19
20 public boolean existsPictureByName(String name) throws SQLException;
21
22 public ArrayList<Picture> getPicturesByTestID(Integer testID)
23 throws SQLException;
24
25 public ArrayList<Picture> getAllPictures() throws SQLException;
26
27 public ArrayList<Picture> getPicturesByQuestionID(Integer QuestionID)
28 throws SQLException;
29
30 public void addPicture(Picture toAdd) throws SQLException;
31
32 public void addPictures(ArrayList<Picture> toAdd) throws SQLException;
33
34 public void addPictureToQuestion(Integer pictureId, Integer questionId)
35 throws SQLException;
36
37 public void deletePictureFromQuestion(Integer pictureId, Integer questionId)
38 throws SQLException;
39
40 public void deletePicture(Picture toDelete)
41 throws PictureInPictureQuestionException, SQLException;
42
43 public void deletePictures(ArrayList<Picture> toDelete)
44 throws PictureInPictureQuestionException, SQLException;
45
46 public void updatePicture(Picture toUpdate) throws SQLException;
47 }