1
2
3
4
5
6
7
8 package com.buckosoft.BuckoVidLib.db;
9
10 import java.util.List;
11
12 import com.buckosoft.BuckoVidLib.domain.Actor;
13 import com.buckosoft.BuckoVidLib.domain.Director;
14 import com.buckosoft.BuckoVidLib.domain.FailedToRip;
15 import com.buckosoft.BuckoVidLib.domain.Genre;
16 import com.buckosoft.BuckoVidLib.domain.LibrarySection;
17 import com.buckosoft.BuckoVidLib.domain.TVSeason;
18 import com.buckosoft.BuckoVidLib.domain.UserAttribute;
19 import com.buckosoft.BuckoVidLib.domain.Video;
20 import com.buckosoft.BuckoVidLib.domain.VideoBase;
21 import com.buckosoft.BuckoVidLib.domain.VideoTexts;
22 import com.buckosoft.BuckoVidLib.domain.WishList;
23 import com.buckosoft.BuckoVidLib.domain.Writer;
24
25 public interface Database {
26 List<FailedToRip> getFailedToRip();
27 List<WishList> getWishList();
28 void addWishList(WishList wishList);
29
30 void addLibrarySection(LibrarySection librarySection);
31 LibrarySection getLibrarySection(int key);
32 List<LibrarySection> getLibrarySections();
33
34
35
36
37 int getVideoCount();
38 List<Integer> getVideoIdsByActor(int key);
39 List<Integer> getVideoIdsByDirector(int key);
40 List<Integer> getVideoIdsByWriter(int key);
41 List<Integer> getVideoIdsByGenre(int key);
42
43
44
45
46
47
48 VideoTexts getVideoTexts(int id);
49 int getMaxVideoTextsSummaryLength();
50 int getMaxVideoTextsTaglineLength();
51
52
53 void truncateLibrary();
54
55 void addActor(Actor actor);
56 Actor getActor(int actorId);
57 Actor getActor(String actorName);
58 List<Actor> getActors();
59 List<Actor> findActors(String key, int limit);
60
61 void addWriter(Writer writer);
62 Writer getWriter(int writerId);
63 Writer getWriter(String writerName);
64 List<Writer> getWriters();
65 List<Writer> findWriters(String key, int limit);
66
67 void addDirector(Director director);
68 Director getDirector(int directorId);
69 Director getDirector(String directorName);
70 List<Director> getDirectors();
71 List<Director> findDirectors(String key, int limit);
72
73 void addGenre(Genre genre);
74 Genre getGenre(int genreId);
75 Genre getGenre(String genreTag);
76 List<Genre> getGenres();
77 List<Genre> findGenres(String key, int limit);
78
79 void saveVideo(Video video);
80 Video getVideo(int videoId);
81 List<Video> getVideos();
82
83
84
85
86 void deleteVideo(VideoBase vb);
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101 VideoBase getVideoBase(int videoId);
102 List<VideoBase> getVideoBases();
103
104 void saveTVSeason(TVSeason season);
105 TVSeason getTVSeason(int seasonId);
106 List<TVSeason> getTVSeasons();
107
108
109
110
111
112 List<TVSeason> getTVSeasons(int videoId);
113
114
115
116
117
118 TVSeason getTVSeasonFromHashKey(int key);
119
120
121
122
123
124
125 List<UserAttribute> getUserAttributes(int userId);
126 void saveUserAttributes(List<UserAttribute> list);
127 }