use of org.entando.entando.apsadmin.system.services.activitystream.model.ActivityStreamLikeInfos in project entando-core by entando.
the class SocialActivityStreamDAO method getActionLikeRecords.
@Override
public List<ActivityStreamLikeInfo> getActionLikeRecords(int id) {
List<ActivityStreamLikeInfo> infos = new ActivityStreamLikeInfos();
Connection conn = null;
PreparedStatement stat = null;
ResultSet result = null;
try {
conn = this.getConnection();
stat = conn.prepareStatement(GET_ACTION_LIKE_RECORDS);
stat.setInt(1, id);
result = stat.executeQuery();
while (result.next()) {
ActivityStreamLikeInfo asli = new ActivityStreamLikeInfo();
asli.setUsername(result.getString(1));
infos.add(asli);
}
} catch (Throwable t) {
logger.error("Error while loading activity stream like records", t);
throw new RuntimeException("Error while loading activity stream like records", t);
} finally {
closeDaoResources(result, stat, conn);
}
return infos;
}
Aggregations