@Override
  public List<RateComment> getRateComments() {
    List<RateComment> list = null;

    // SqlSession session = factory.openSession();
    RateCommentDao rmapper = session.getMapper(RateCommentDao.class);

    try {
      list = rmapper.getRateComments();
      // session.commit();
    } finally {
      // session.close();
    }

    return list;
  }
  @Override
  public int cancelRating(RateComment rateComment) {
    int result = 0;

    // SqlSession session = factory.openSession();
    RateCommentDao rmapper = session.getMapper(RateCommentDao.class);

    try {
      result = rmapper.cancelRating(rateComment);
      // session.commit();
    } finally {
      // session.close();
    }

    return result;
  }