Beispiel #1
0
        public void AddToMainCast(Person cast)
        {
            Watchable DBObject = GetMatchingObject();

            //            _mainCast.Add(cast);
            DBObject._mainCast.Add(cast);
            MultimediaDB.db.Store(DBObject._mainCast);
        }
Beispiel #2
0
        public void SetEntity(Watchable en)
        {
            Feature DBObject = GetMatchingObject();

            _entity          = en;
            DBObject._entity = en;
            Update(DBObject);
        }
Beispiel #3
0
        public void SetSubscribers(List <User> subscribers)
        {
            Watchable DBObject = GetMatchingObject();

            _subscribers          = subscribers;
            DBObject._subscribers = subscribers;
            MultimediaDB.db.Store(DBObject._subscribers);
        }
Beispiel #4
0
        public void UnsubscribeToWatchable(Watchable watchable)
        {
            User DBObject = GetMatchingObject();

            watchable.RemoveSubscriber(this);
            DBObject._watchableSubscriptions.Remove(watchable);
            MultimediaDB.db.Store(DBObject._watchableSubscriptions);
        }
Beispiel #5
0
        public void SetSynopsis(string synopsis)
        {
            Watchable DBObject = GetMatchingObject();

            _synopsis          = synopsis;
            DBObject._synopsis = synopsis;
            Update(DBObject);
        }
Beispiel #6
0
        public void SetMainCast(List <Person> mainCast)
        {
            Watchable DBObject = GetMatchingObject();

            _mainCast          = mainCast;
            DBObject._mainCast = mainCast;
            MultimediaDB.db.Store(DBObject._mainCast);
        }
Beispiel #7
0
        public void SetTitleName(string titleName)
        {
            Watchable DBObject = GetMatchingObject();

            _titleName          = titleName;
            DBObject._titleName = titleName;
            Update(DBObject);
        }
Beispiel #8
0
        public void setPoster(Image poster)
        {
            Watchable DBObject = GetMatchingObject();

            _poster          = imageToByteArray(poster);
            DBObject._poster = imageToByteArray(poster);
            Update(DBObject);
        }
Beispiel #9
0
        public void SetGenre(List <string> genre)
        {
            Watchable DBObject = GetMatchingObject();

            _genre          = genre;
            DBObject._genre = genre;
            MultimediaDB.db.Store(DBObject._genre);
        }
Beispiel #10
0
        public void SetWatchable(Watchable w)
        {
            Award DBObject = GetMatchingObject();

            _watchable          = w;
            DBObject._watchable = w;
            Update(DBObject);
        }
Beispiel #11
0
        public void RemoveFromWatchList(Watchable watchable)
        {
            User DBObject = GetMatchingObject();

            //            _watchList.Remove(watchable);
            DBObject._watchList.Remove(watchable);
            MultimediaDB.db.Store(DBObject._watchList);
        }
Beispiel #12
0
        public void AddToWatchList(Watchable watchable)
        {
            User DBObject = GetMatchingObject();

            //            _watchList.Add(watchable);
            DBObject._watchList.Add(watchable);
            MultimediaDB.db.Store(DBObject._watchList);
        }
Beispiel #13
0
        public void RemoveSubscriber(User sub)
        {
            Watchable DBObject = GetMatchingObject();

            //            _subscribers.Remove(sub);
            DBObject._subscribers.Remove(sub);
            MultimediaDB.db.Store(DBObject._subscribers);
        }
Beispiel #14
0
        public void SetMpaaRating(string mpaaRating)
        {
            Watchable DBObject = GetMatchingObject();

            _mpaaRating          = mpaaRating;
            DBObject._mpaaRating = mpaaRating;
            Update(DBObject);
        }
Beispiel #15
0
        public void SetRating(double rating)
        {
            Watchable DBObject = GetMatchingObject();

            _rating          = rating;
            DBObject._rating = rating;
            Update(DBObject);
            Notify(_titleName + " has been given a rating of " + rating);
        }
Beispiel #16
0
        public void SetProductionStatus(string productionStatus)
        {
            Watchable DBObject = GetMatchingObject();

            _productionStatus          = productionStatus;
            DBObject._productionStatus = productionStatus;
            Update(DBObject);
            Notify(_titleName + " production status has been set to " + productionStatus);
        }
Beispiel #17
0
        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());
        }
Beispiel #18
0
        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());
        }
Beispiel #19
0
 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);
 }
Beispiel #20
0
 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);
     }
 }
Beispiel #21
0
        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);
        }