@@ -0,0 +1,742 @@
+package dev.openshift.tapestry.angular.services;%0A%0Aimport dev.openshift.tapestry.angular.data.Comment;%0Aimport org.hibernate.Session;%0Aimport org.hibernate.criterion.Order;%0Aimport org.hibernate.criterion.Restrictions;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Date;%0Aimport java.util.List;%0A%0Apublic class CommentDAOImpl implements CommentDAO%0A%7B%0A    private final Session session;%0A%0A    public CommentDAOImpl(Session session)%0A    %7B%0A        this.session = session;%0A    %7D%0A%0A    public List%3CComment%3E getCommentsByPhoneId(int phoneId) %7B%0A        return session.createCriteria(Comment.class).add(Restrictions.eq(%22phoneid%22, phoneId)).addOrder(Order.desc(%22id%22)).list();%0A    %7D%0A%0A    public void add(Comment comment) %7B%0A        session.save(comment);%0A    %7D%0A%7D%0A

Add Comment DAO implementation