///<Summary> ///TweetCountCollectionFromSearchFields ///This method returns the collection of BOTweetCount objects, filtered by a search object ///</Summary> ///<returns> ///List<BOTweetCount> ///</returns> ///<parameters> /// ///</parameters> public static IList <BOTweetCount> TweetCountCollectionFromSearchFields(BOTweetCount boTweetCount) { try { IList <BOTweetCount> boTweetCountCollection = new List <BOTweetCount>(); DAOTweetCount daoTweetCount = new DAOTweetCount(); daoTweetCount.Id = boTweetCount.Id; daoTweetCount.Topic = boTweetCount.Topic; daoTweetCount.SentimentScore = boTweetCount.SentimentScore; daoTweetCount.PlaceTimeZone = boTweetCount.PlaceTimeZone; daoTweetCount.TweetText = boTweetCount.TweetText; daoTweetCount.Retweeted = boTweetCount.Retweeted; daoTweetCount.RetweetCount = boTweetCount.RetweetCount; daoTweetCount.CreatedAt = boTweetCount.CreatedAt; IList <DAOTweetCount> daoTweetCountCollection = DAOTweetCount.SelectAllBySearchFields(daoTweetCount); foreach (DAOTweetCount resdaoTweetCount in daoTweetCountCollection) { boTweetCountCollection.Add(new BOTweetCount(resdaoTweetCount)); } return(boTweetCountCollection); } catch (Exception ex) { //logger.Log(ex.StackTrace, LOGLEVELS.ERROR); throw; } }
///<Summary> ///TweetCountCollectionCount ///This method returns the collection count of BOTweetCount objects ///</Summary> ///<returns> ///Int32 ///</returns> ///<parameters> /// ///</parameters> public static Int32 TweetCountCollectionCount() { try { Int32 objCount = DAOTweetCount.SelectAllCount(); return(objCount); } catch (Exception ex) { //logger.Log(ex.StackTrace, LOGLEVELS.ERROR); throw; } }
///<Summary> ///TweetCountCollection ///This method returns the collection of BOTweetCount objects ///</Summary> ///<returns> ///List[BOTweetCount] ///</returns> ///<parameters> /// ///</parameters> public static int TweetSpeed(string userId, string topic) { try { int speed = DAOTweetCount.LatestTweetSpeed(userId, topic); return(speed); } catch (Exception ex) { //logger.Log(ex.StackTrace, LOGLEVELS.ERROR); throw ex; } }
///<Summary> ///Delete ///This method deletes one TweetCount record from the store ///</Summary> ///<returns> ///void ///</returns> ///<parameters> /// ///</parameters> public static void DeleteAll(string UserId) { DAOTweetCount daoTweetCount = new DAOTweetCount(); try { daoTweetCount.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> ///DAOTweetCount ///</parameters> protected internal BOTweetCount(DAOTweetCount daoTweetCount) { try { _id = daoTweetCount.Id; _topic = daoTweetCount.Topic; _sentimentScore = daoTweetCount.SentimentScore; _placeTimeZone = daoTweetCount.PlaceTimeZone; _tweetText = daoTweetCount.TweetText; _retweeted = daoTweetCount.Retweeted; _retweetCount = daoTweetCount.RetweetCount; _createdAt = daoTweetCount.CreatedAt; _totalCount = daoTweetCount.TotalCount; } catch (Exception ex) { //logger.Log(ex.StackTrace, LOGLEVELS.ERROR); throw; } }
///<Summary> ///TweetCountCollection ///This method returns the collection of BOTweetCount objects ///</Summary> ///<returns> ///List[BOTweetCount] ///</returns> ///<parameters> /// ///</parameters> public static IList <BOTweetCount> TweetCountGetTweetsGreatorThanId(long Id, string userId) { try { IList <BOTweetCount> boTweetCountCollection = new List <BOTweetCount>(); IList <DAOTweetCount> daoTweetCountCollection = DAOTweetCount.SelectAllTweetGreaterThanId(Id, userId); foreach (DAOTweetCount daoTweetCount in daoTweetCountCollection) { boTweetCountCollection.Add(new BOTweetCount(daoTweetCount)); } return(boTweetCountCollection); } catch (Exception ex) { //logger.Log(ex.StackTrace, LOGLEVELS.ERROR); throw ex; } }
///<Summary> ///TweetCountGetTopics ///This method returns the collection of BOTweetCount objects, filtered by a search object ///</Summary> ///<returns> ///List<BOTweetCount> ///</returns> ///<parameters> /// ///</parameters> public static IList <BOTweetCount> TweetCountGetTopics() { try { IList <BOTweetCount> boTweetCountCollection = new List <BOTweetCount>(); IList <DAOTweetCount> daoTweetCountCollection = DAOTweetCount.TweetCountGetTopics(); foreach (DAOTweetCount resdaoTweetCount in daoTweetCountCollection) { boTweetCountCollection.Add(new BOTweetCount(resdaoTweetCount)); } return(boTweetCountCollection); } catch (Exception ex) { //logger.Log(ex.StackTrace, LOGLEVELS.ERROR); throw; } }
///<Summary> ///TweetCountCollectionFromSearchFieldsCount ///This method returns the collection count of BOTweetCount objects, filtered by a search object ///</Summary> ///<returns> ///Int32 ///</returns> ///<parameters> /// ///</parameters> public static Int32 TweetCountCollectionFromSearchFieldsCount(BOTweetCount boTweetCount) { try { DAOTweetCount daoTweetCount = new DAOTweetCount(); daoTweetCount.Id = boTweetCount.Id; daoTweetCount.Topic = boTweetCount.Topic; daoTweetCount.SentimentScore = boTweetCount.SentimentScore; daoTweetCount.PlaceTimeZone = boTweetCount.PlaceTimeZone; daoTweetCount.TweetText = boTweetCount.TweetText; daoTweetCount.Retweeted = boTweetCount.Retweeted; daoTweetCount.RetweetCount = boTweetCount.RetweetCount; daoTweetCount.CreatedAt = boTweetCount.CreatedAt; Int32 objCount = DAOTweetCount.SelectAllBySearchFieldsCount(daoTweetCount); return(objCount); } catch (Exception ex) { //logger.Log(ex.StackTrace, LOGLEVELS.ERROR); throw; } }
///<Summary> ///Update ///This method updates one TweetCount record in the store ///</Summary> ///<returns> ///void ///</returns> ///<parameters> ///BOTweetCount ///</parameters> public virtual void Update() { DAOTweetCount daoTweetCount = new DAOTweetCount(); RegisterDataObject(daoTweetCount); BeginTransaction("updateBOTweetCount"); try { daoTweetCount.Id = _id; daoTweetCount.Topic = _topic; daoTweetCount.SentimentScore = _sentimentScore; daoTweetCount.PlaceTimeZone = _placeTimeZone; daoTweetCount.TweetText = _tweetText; daoTweetCount.Retweeted = _retweeted; daoTweetCount.RetweetCount = _retweetCount; daoTweetCount.CreatedAt = _createdAt; daoTweetCount.Update(); CommitTransaction(); _id = daoTweetCount.Id; _topic = daoTweetCount.Topic; _sentimentScore = daoTweetCount.SentimentScore; _placeTimeZone = daoTweetCount.PlaceTimeZone; _tweetText = daoTweetCount.TweetText; _retweeted = daoTweetCount.Retweeted; _retweetCount = daoTweetCount.RetweetCount; _createdAt = daoTweetCount.CreatedAt; _isDirty = false; } catch (Exception ex) { RollbackTransaction("updateBOTweetCount"); //logger.Log(ex.StackTrace, LOGLEVELS.ERROR); throw; } }