.convertDegreesToRadians(latitude);
final double longitudeInRadians = EnMeUtils
.convertDegreesToRadians(longitude);
List<TweetPollSavedPublishedStatus> tpSavedPublished = new ArrayList<TweetPollSavedPublishedStatus>();
TweetPoll itemTweetPoll;
Poll itemPoll;
if (itemType.equals(TypeSearchResult.ALL)) {
// POLL
List<Object[]> distanceFromOriginTweetPoll = this
.getItemsByDistanceFromOrigin(range, maxItem,
TypeSearchResult.TWEETPOLL, longitudeInRadians,
latitudeInRadians, this.earth_radius, period);
log.debug("Retrieved items by distance -->"
+ distanceFromOriginTweetPoll.size());
for (Object[] objects : distanceFromOriginTweetPoll) {
itemTweetPoll = this.getTweetPollById((Long) objects[0]);
tpSavedPublished = getTweetPollDao().getLinksByTweetPoll(
itemTweetPoll, null, null, TypeSearchResult.TWEETPOLL);
log.debug("Tweetpolls published on social networks -->"
+ itemTweetPoll.getTweetPollId());
socialGeoBean.addAll(ConvertDomainBean
.convertTweetPollSavedPublishedToSocialGeoLocationBean(
tpSavedPublished,
itemTweetPoll.getTweetPollId(), itemType,
(Float) objects[1], (Float) objects[2],
objects[3].toString(), (Double) objects[4]));
}
// POLL
List<Object[]> distanceFromOriginPoll = this
.getItemsByDistanceFromOrigin(range, maxItem,
TypeSearchResult.POLL, longitudeInRadians,
latitudeInRadians, this.earth_radius, period);
log.debug("Retrieved items by distance -->"
+ distanceFromOriginTweetPoll.size());
for (Object[] objects : distanceFromOriginPoll) {
itemPoll = this.getPollById((Long) objects[0]);
tpSavedPublished = getTweetPollDao().getLinksByTweetPoll(
null, null, itemPoll, TypeSearchResult.POLL);
log.debug("Polls published on social networks -->"
+ itemPoll.getPollId());
socialGeoBean.addAll(ConvertDomainBean
.convertTweetPollSavedPublishedToSocialGeoLocationBean(
tpSavedPublished,
itemPoll.getPollId(), itemType,
(Float) objects[1], (Float) objects[2],
objects[3].toString(), (Double) objects[4]));
}