Ejemplo n.º 1
0
/** @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();
  }
}
Ejemplo n.º 2
0
 /**
  * @param photoId
  * @return
  */
 public List<Comment> getCommentsByPhotoId(int photoId) {
   Criteria commentCriteria = commentDAO.getCriteriaInstance();
   commentCriteria.add(Restrictions.eq("photo.id", photoId));
   return commentCriteria.list();
 }