///<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> ///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; } }