Modifier and Type | Field and Description |
---|---|
protected boolean |
refreshed |
Constructor and Description |
---|
DatabaseImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addActor(Actor actor) |
void |
addDirector(Director director) |
void |
addGenre(Genre genre) |
void |
addLibrarySection(LibrarySection librarySection) |
void |
addWishList(WishList wishList) |
void |
addWriter(Writer writer) |
void |
deleteVideo(VideoBase vb)
Delete this Video and all of its related records
|
java.util.List<Actor> |
findActors(java.lang.String key,
int limit) |
java.util.List<Director> |
findDirectors(java.lang.String key,
int limit) |
java.util.List<Genre> |
findGenres(java.lang.String key,
int limit) |
java.util.List<Writer> |
findWriters(java.lang.String key,
int limit) |
Actor |
getActor(int actorId) |
Actor |
getActor(java.lang.String actorName) |
java.util.List<Actor> |
getActors() |
Director |
getDirector(int directorId) |
Director |
getDirector(java.lang.String directorName) |
java.util.List<Director> |
getDirectors() |
java.util.List<FailedToRip> |
getFailedToRip() |
Genre |
getGenre(int genreId) |
Genre |
getGenre(java.lang.String genreTag) |
java.util.List<Genre> |
getGenres() |
LibrarySection |
getLibrarySection(int key) |
java.util.List<LibrarySection> |
getLibrarySections() |
int |
getMaxVideoTextsSummaryLength() |
int |
getMaxVideoTextsTaglineLength() |
TVSeason |
getTVSeason(int seasonId) |
TVSeason |
getTVSeasonFromHashKey(int key)
Get a TV Season based on its plex key
|
java.util.List<TVSeason> |
getTVSeasons() |
java.util.List<TVSeason> |
getTVSeasons(int videoId)
Return a list of TVSeasons for a show
|
java.util.List<UserAttribute> |
getUserAttributes(int userId)
Get the UserAttributes for this userId.
|
Video |
getVideo(int videoId) |
VideoBase |
getVideoBase(int videoId)
Get the VideoBase with this videoId.
|
java.util.List<VideoBase> |
getVideoBases() |
int |
getVideoCount()
Return the number of unique videos in the library
|
java.util.List<java.lang.Integer> |
getVideoIdsByActor(int key) |
java.util.List<java.lang.Integer> |
getVideoIdsByDirector(int key) |
java.util.List<java.lang.Integer> |
getVideoIdsByGenre(int key) |
java.util.List<java.lang.Integer> |
getVideoIdsByWriter(int key) |
java.util.List<Video> |
getVideos() |
VideoTexts |
getVideoTexts(int id)
Return the tagline and summary texts for the video.
|
java.util.List<WishList> |
getWishList() |
Writer |
getWriter(int writerId) |
Writer |
getWriter(java.lang.String writerName) |
java.util.List<Writer> |
getWriters() |
void |
saveTVSeason(TVSeason season) |
void |
saveUserAttributes(java.util.List<UserAttribute> list) |
void |
saveVideo(Video video) |
void |
setInit(java.lang.String configFile)
Configure and initialize the database.
|
void |
truncateLibrary()
Reset to empty all of the tables
|
public void setInit(java.lang.String configFile)
configFile
- "BuckoVidLib-test-hibernate.cfg.xml" or null to use the built-in configpublic java.util.List<FailedToRip> getFailedToRip()
getFailedToRip
in interface Database
public java.util.List<WishList> getWishList()
getWishList
in interface Database
public void addWishList(WishList wishList)
addWishList
in interface Database
public int getVideoCount()
Database
getVideoCount
in interface Database
public java.util.List<java.lang.Integer> getVideoIdsByActor(int key)
getVideoIdsByActor
in interface Database
public java.util.List<java.lang.Integer> getVideoIdsByDirector(int key)
getVideoIdsByDirector
in interface Database
public java.util.List<java.lang.Integer> getVideoIdsByWriter(int key)
getVideoIdsByWriter
in interface Database
public java.util.List<java.lang.Integer> getVideoIdsByGenre(int key)
getVideoIdsByGenre
in interface Database
public void truncateLibrary()
Database
truncateLibrary
in interface Database
public void deleteVideo(VideoBase vb)
Database
deleteVideo
in interface Database
vb
- The VideoBase to deletepublic int getMaxVideoTextsSummaryLength()
getMaxVideoTextsSummaryLength
in interface Database
public int getMaxVideoTextsTaglineLength()
getMaxVideoTextsTaglineLength
in interface Database
public VideoBase getVideoBase(int videoId)
Database
getVideoBase
in interface Database
videoId
- The id to fetch.public java.util.List<VideoBase> getVideoBases()
getVideoBases
in interface Database
public void saveTVSeason(TVSeason season)
saveTVSeason
in interface Database
public TVSeason getTVSeason(int seasonId)
getTVSeason
in interface Database
public TVSeason getTVSeasonFromHashKey(int key)
Database
getTVSeasonFromHashKey
in interface Database
key
- The plex key to lookuppublic java.util.List<TVSeason> getTVSeasons()
getTVSeasons
in interface Database
public java.util.List<TVSeason> getTVSeasons(int videoId)
Database
getTVSeasons
in interface Database
videoId
- The show to lookuppublic void addDirector(Director director)
addDirector
in interface Database
public Director getDirector(int directorId)
getDirector
in interface Database
public Director getDirector(java.lang.String directorName)
getDirector
in interface Database
public java.util.List<Director> getDirectors()
getDirectors
in interface Database
public java.util.List<Director> findDirectors(java.lang.String key, int limit)
findDirectors
in interface Database
public Writer getWriter(java.lang.String writerName)
public java.util.List<Writer> getWriters()
getWriters
in interface Database
public java.util.List<Writer> findWriters(java.lang.String key, int limit)
findWriters
in interface Database
public Genre getGenre(java.lang.String genreTag)
public java.util.List<Genre> findGenres(java.lang.String key, int limit)
findGenres
in interface Database
public Actor getActor(java.lang.String actorName)
public java.util.List<Actor> findActors(java.lang.String key, int limit)
findActors
in interface Database
public VideoTexts getVideoTexts(int id)
Database
getVideoTexts
in interface Database
id
- the videoId to fetchpublic void addLibrarySection(LibrarySection librarySection)
addLibrarySection
in interface Database
public LibrarySection getLibrarySection(int key)
getLibrarySection
in interface Database
public java.util.List<LibrarySection> getLibrarySections()
getLibrarySections
in interface Database
public java.util.List<UserAttribute> getUserAttributes(int userId)
Database
User
parses these into his working attributes.getUserAttributes
in interface Database
userId
- The id of this userpublic void saveUserAttributes(java.util.List<UserAttribute> list)
saveUserAttributes
in interface Database