public class Database extends Object
Constructor and Description |
---|
Database() |
Modifier and Type | Method and Description |
---|---|
void |
clearChangedPersonal()
Empties the ChangedPersonal List
|
void |
clearServer()
Empties the server based ratings list
|
ArrayList<Rating> |
getChangedPersonal() |
Rating |
getPersonalRating(Program program)
Gets one personal Rating for a specific Program
|
Rating |
getPersonalRating(String title)
Gets one personal Rating for a specific title
|
Collection<Rating> |
getPersonalRatings()
Gets the personal Ratings in this Database
|
Rating |
getServerRating(Program program)
Gets the server rating for a specific program
|
Rating |
getServerRating(String title)
Gets one server rating for a specific title
|
Collection<Rating> |
getServerRatings()
Gets the server ratings in this database
|
void |
readData(ObjectInputStream in)
Called by the host-application during start-up.
|
void |
setPersonalRating(Rating rating)
Saves the personal rating in the database
|
void |
setServerRating(Rating rating)
Sets the Rating
|
void |
writeData(ObjectOutputStream out)
Counterpart to loadData.
|
public Collection<Rating> getServerRatings()
public Rating getServerRating(Program program)
program
- get rating for this programpublic Rating getServerRating(String title)
title
- get rating for this Titlepublic void setServerRating(Rating rating)
rating
- public Collection<Rating> getPersonalRatings()
public Rating getPersonalRating(Program program)
program
- get Rating for this Programpublic Rating getPersonalRating(String title)
title
- get rating for this Titlepublic void setPersonalRating(Rating rating)
rating
- save this Ratingpublic void clearChangedPersonal()
public void clearServer()
public void readData(ObjectInputStream in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
writeData(ObjectOutputStream)
public void writeData(ObjectOutputStream out) throws IOException
IOException
readData(ObjectInputStream)
TV-Browser 2.7.6, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)