public void AddToMainCast(Person cast) { Watchable DBObject = GetMatchingObject(); // _mainCast.Add(cast); DBObject._mainCast.Add(cast); MultimediaDB.db.Store(DBObject._mainCast); }
public void SetEntity(Watchable en) { Feature DBObject = GetMatchingObject(); _entity = en; DBObject._entity = en; Update(DBObject); }
public void SetSubscribers(List <User> subscribers) { Watchable DBObject = GetMatchingObject(); _subscribers = subscribers; DBObject._subscribers = subscribers; MultimediaDB.db.Store(DBObject._subscribers); }
public void UnsubscribeToWatchable(Watchable watchable) { User DBObject = GetMatchingObject(); watchable.RemoveSubscriber(this); DBObject._watchableSubscriptions.Remove(watchable); MultimediaDB.db.Store(DBObject._watchableSubscriptions); }
public void SetSynopsis(string synopsis) { Watchable DBObject = GetMatchingObject(); _synopsis = synopsis; DBObject._synopsis = synopsis; Update(DBObject); }
public void SetMainCast(List <Person> mainCast) { Watchable DBObject = GetMatchingObject(); _mainCast = mainCast; DBObject._mainCast = mainCast; MultimediaDB.db.Store(DBObject._mainCast); }
public void SetTitleName(string titleName) { Watchable DBObject = GetMatchingObject(); _titleName = titleName; DBObject._titleName = titleName; Update(DBObject); }
public void setPoster(Image poster) { Watchable DBObject = GetMatchingObject(); _poster = imageToByteArray(poster); DBObject._poster = imageToByteArray(poster); Update(DBObject); }
public void SetGenre(List <string> genre) { Watchable DBObject = GetMatchingObject(); _genre = genre; DBObject._genre = genre; MultimediaDB.db.Store(DBObject._genre); }
public void SetWatchable(Watchable w) { Award DBObject = GetMatchingObject(); _watchable = w; DBObject._watchable = w; Update(DBObject); }
public void RemoveFromWatchList(Watchable watchable) { User DBObject = GetMatchingObject(); // _watchList.Remove(watchable); DBObject._watchList.Remove(watchable); MultimediaDB.db.Store(DBObject._watchList); }
public void AddToWatchList(Watchable watchable) { User DBObject = GetMatchingObject(); // _watchList.Add(watchable); DBObject._watchList.Add(watchable); MultimediaDB.db.Store(DBObject._watchList); }
public void RemoveSubscriber(User sub) { Watchable DBObject = GetMatchingObject(); // _subscribers.Remove(sub); DBObject._subscribers.Remove(sub); MultimediaDB.db.Store(DBObject._subscribers); }
public void SetMpaaRating(string mpaaRating) { Watchable DBObject = GetMatchingObject(); _mpaaRating = mpaaRating; DBObject._mpaaRating = mpaaRating; Update(DBObject); }
public void SetRating(double rating) { Watchable DBObject = GetMatchingObject(); _rating = rating; DBObject._rating = rating; Update(DBObject); Notify(_titleName + " has been given a rating of " + rating); }
public void SetProductionStatus(string productionStatus) { Watchable DBObject = GetMatchingObject(); _productionStatus = productionStatus; DBObject._productionStatus = productionStatus; Update(DBObject); Notify(_titleName + " production status has been set to " + productionStatus); }
public void AddAwardWin(Award awardWin) { Watchable DBObject = GetMatchingObject(); // _awardWins.Add(awardWin); DBObject._awardWins.Add(awardWin); MultimediaDB.db.Store(DBObject._awardWins); Notify(_titleName + " " + " has won " + awardWin.GetTitle() + " " + awardWin.GetCategory()); }
public void AddAwardNomination(Award awardNomination) { Watchable DBObject = GetMatchingObject(); // _awardNominations.Add(awardNomination); DBObject._awardNominations.Add(awardNomination); MultimediaDB.db.Store(DBObject._awardNominations); Notify(_titleName + " " + " has been nominated for " + awardNomination.GetTitle() + " " + awardNomination.GetCategory()); }
public Award(int year, string category, string title, bool win, Watchable watchable) { _year = year; _category = category; _title = title; _win = win; //_nomination = nomination; _watchable = watchable; _feature = null; MultimediaDB.db.Store(this); }
public Feature(string actingRole, Watchable entity, Person person, string productionRole) { _actingRole = actingRole; _entity = entity; _person = person; _productionRole = productionRole; if (!Exists(_person, _entity)) { MultimediaDB.db.Store(this); } }
public static bool Exists(Person person, Watchable entity) { bool result = false; Feature x = new Feature(); IObjectSet AllObjects = MultimediaDB.db.QueryByExample(typeof(Feature)); for (int i = 0; i < AllObjects.Count; i++) { x = (Feature)AllObjects[i]; if (x.GetEntity().Equals(entity) && x.GetPerson().Equals(person)) { result = true; } } return(result); }