/** @author Amol */
public class CommentBizLogic {

  private static CommentDAO commentDAO = CommentDAO.getInstance();

  /**
   * @param photoId
   * @return
   */
  public List<Comment> getCommentsByPhotoId(int photoId) {
    Criteria commentCriteria = commentDAO.getCriteriaInstance();
    commentCriteria.add(Restrictions.eq("photo.id", photoId));
    return commentCriteria.list();
  }
}
 /**
  * @param photoId
  * @return
  */
 public List<Comment> getCommentsByPhotoId(int photoId) {
   Criteria commentCriteria = commentDAO.getCriteriaInstance();
   commentCriteria.add(Restrictions.eq("photo.id", photoId));
   return commentCriteria.list();
 }