///<Summary> ///TweetMentionsCollectionFromSearchFields ///This method returns the collection of BOTweetMentions objects, filtered by a search object ///</Summary> ///<returns> ///List<BOTweetMentions> ///</returns> ///<parameters> /// ///</parameters> public static IList <BOTweetMentions> TweetMentionsCollectionFromSearchFields(BOTweetMentions boTweetMentions) { try { IList <BOTweetMentions> boTweetMentionsCollection = new List <BOTweetMentions>(); DAOTweetMentions daoTweetMentions = new DAOTweetMentions(); daoTweetMentions.Id = boTweetMentions.Id; daoTweetMentions.Time = boTweetMentions.Time; daoTweetMentions.Topic = boTweetMentions.Topic; daoTweetMentions.Count = boTweetMentions.Count; daoTweetMentions.Avg = boTweetMentions.Avg; daoTweetMentions.Min = boTweetMentions.Min; daoTweetMentions.Max = boTweetMentions.Max; daoTweetMentions.Stdev = boTweetMentions.Stdev; IList <DAOTweetMentions> daoTweetMentionsCollection = DAOTweetMentions.SelectAllBySearchFields(daoTweetMentions); foreach (DAOTweetMentions resdaoTweetMentions in daoTweetMentionsCollection) { boTweetMentionsCollection.Add(new BOTweetMentions(resdaoTweetMentions)); } return(boTweetMentionsCollection); } catch (Exception ex) { //logger.Log(ex.StackTrace, LOGLEVELS.ERROR); throw; } }
///<Summary> ///TweetMentionsCollectionCount ///This method returns the collection count of BOTweetMentions objects ///</Summary> ///<returns> ///Int32 ///</returns> ///<parameters> /// ///</parameters> public static Int32 TweetMentionsCollectionCount() { try { Int32 objCount = DAOTweetMentions.SelectAllCount(); return(objCount); } catch (Exception ex) { //logger.Log(ex.StackTrace, LOGLEVELS.ERROR); throw; } }
///<Summary> ///Delete ///This method deletes one TweetMentions record from the store ///</Summary> ///<returns> ///void ///</returns> ///<parameters> /// ///</parameters> public static void DeleteAll(string UserId) { DAOTweetMentions daoTweetMentions = new DAOTweetMentions(); try { daoTweetMentions.DeleteAll(UserId); } catch (Exception ex) { //logger.Log(ex.StackTrace, LOGLEVELS.ERROR); throw; } }
///<Summary> ///Constructor ///This constructor initializes the business object from its respective data object ///</Summary> ///<returns> ///void ///</returns> ///<parameters> ///DAOTweetMentions ///</parameters> protected internal BOTweetMentions(DAOTweetMentions daoTweetMentions) { try { _id = daoTweetMentions.Id; _time = daoTweetMentions.Time; _topic = daoTweetMentions.Topic; _count = daoTweetMentions.Count; _avg = daoTweetMentions.Avg; _min = daoTweetMentions.Min; _max = daoTweetMentions.Max; _stdev = daoTweetMentions.Stdev; } catch (Exception ex) { //logger.Log(ex.StackTrace, LOGLEVELS.ERROR); throw; } }
///<Summary> ///Constructor ///Constructor using primary key(s) ///</Summary> ///<returns> ///void ///</returns> ///<parameters> ///Int64 id ///</parameters> public BOTweetMentions(Int64 id) { try { DAOTweetMentions daoTweetMentions = DAOTweetMentions.SelectOne(id); _id = daoTweetMentions.Id; _time = daoTweetMentions.Time; _topic = daoTweetMentions.Topic; _count = daoTweetMentions.Count; _avg = daoTweetMentions.Avg; _min = daoTweetMentions.Min; _max = daoTweetMentions.Max; _stdev = daoTweetMentions.Stdev; } catch (Exception ex) { //logger.Log(ex.StackTrace, LOGLEVELS.ERROR); throw; } }
///<Summary> ///Delete ///This method deletes one TweetMentions record from the store ///</Summary> ///<returns> ///void ///</returns> ///<parameters> /// ///</parameters> public virtual void Delete() { DAOTweetMentions daoTweetMentions = new DAOTweetMentions(); RegisterDataObject(daoTweetMentions); BeginTransaction("deleteBOTweetMentions"); try { daoTweetMentions.Id = _id; daoTweetMentions.Delete(); CommitTransaction(); } catch (Exception ex) { RollbackTransaction("deleteBOTweetMentions"); //logger.Log(ex.StackTrace, LOGLEVELS.ERROR); throw; } }
///<Summary> ///TweetMentionsLatestTen ///This method returns the collection of BOTweetMentions objects ///</Summary> ///<returns> ///List[BOTweetMentions] ///</returns> ///<parameters> /// ///</parameters> public static IList <BOTweetMentions> TweetMentionsLatest(string userId) { try { IList <BOTweetMentions> boTweetMentionsCollection = new List <BOTweetMentions>(); IList <DAOTweetMentions> daoTweetMentionsCollection = DAOTweetMentions.SelectLatest(userId); foreach (DAOTweetMentions daoTweetMentions in daoTweetMentionsCollection) { boTweetMentionsCollection.Add(new BOTweetMentions(daoTweetMentions)); } return(boTweetMentionsCollection); } catch (Exception ex) { //logger.Log(ex.StackTrace, LOGLEVELS.ERROR); throw ex; } }
///<Summary> ///TweetMentionsCollectionFromSearchFieldsCount ///This method returns the collection count of BOTweetMentions objects, filtered by a search object ///</Summary> ///<returns> ///Int32 ///</returns> ///<parameters> /// ///</parameters> public static Int32 TweetMentionsCollectionFromSearchFieldsCount(BOTweetMentions boTweetMentions) { try { DAOTweetMentions daoTweetMentions = new DAOTweetMentions(); daoTweetMentions.Id = boTweetMentions.Id; daoTweetMentions.Time = boTweetMentions.Time; daoTweetMentions.Topic = boTweetMentions.Topic; daoTweetMentions.Count = boTweetMentions.Count; daoTweetMentions.Avg = boTweetMentions.Avg; daoTweetMentions.Min = boTweetMentions.Min; daoTweetMentions.Max = boTweetMentions.Max; daoTweetMentions.Stdev = boTweetMentions.Stdev; Int32 objCount = DAOTweetMentions.SelectAllBySearchFieldsCount(daoTweetMentions); return(objCount); } catch (Exception ex) { //logger.Log(ex.StackTrace, LOGLEVELS.ERROR); throw; } }
///<Summary> ///Update ///This method updates one TweetMentions record in the store ///</Summary> ///<returns> ///void ///</returns> ///<parameters> ///BOTweetMentions ///</parameters> public virtual void Update() { DAOTweetMentions daoTweetMentions = new DAOTweetMentions(); RegisterDataObject(daoTweetMentions); BeginTransaction("updateBOTweetMentions"); try { daoTweetMentions.Id = _id; daoTweetMentions.Time = _time; daoTweetMentions.Topic = _topic; daoTweetMentions.Count = _count; daoTweetMentions.Avg = _avg; daoTweetMentions.Min = _min; daoTweetMentions.Max = _max; daoTweetMentions.Stdev = _stdev; daoTweetMentions.Update(); CommitTransaction(); _id = daoTweetMentions.Id; _time = daoTweetMentions.Time; _topic = daoTweetMentions.Topic; _count = daoTweetMentions.Count; _avg = daoTweetMentions.Avg; _min = daoTweetMentions.Min; _max = daoTweetMentions.Max; _stdev = daoTweetMentions.Stdev; _isDirty = false; } catch (Exception ex) { RollbackTransaction("updateBOTweetMentions"); //logger.Log(ex.StackTrace, LOGLEVELS.ERROR); throw; } }