*
* @param schedule
* @return
*/
public static final ScheduledItemBean convertScheduletoBean(final Schedule schedule) {
final ScheduledItemBean scheduleItemBean = new ScheduledItemBean();
scheduleItemBean.setId(schedule.getIdpub());
scheduleItemBean.setDate(schedule.getScheduleDate());
scheduleItemBean.setTweet(schedule.getTweetText());
//scheduleItemBean.setTweetPollResultsBean(ConvertDomainBean.convertTweetPollSavedPublishedStatus(schedule.getTpollSavedPublished()));
scheduleItemBean.setAccountBean(ConvertDomainBean.convertSocialAccountToBean(schedule.getSocialAccount()));
scheduleItemBean.setTypeSearch(schedule.getTypeSearch().toString());
if (TypeSearchResult.TWEETPOLL.equals(schedule.getTypeSearch())) {
scheduleItemBean.setItemId(schedule.getTpoll().getTweetPollId());
} else if(TypeSearchResult.POLL.equals(schedule.getTypeSearch())) {
scheduleItemBean.setItemId(schedule.getPoll().getPollId());
} else if(TypeSearchResult.SURVEY.equals(schedule.getTypeSearch())) {
scheduleItemBean.setItemId(schedule.getSurvey().getSid());
}
return scheduleItemBean;
}