/connect-dao/src/main/java/org/osforce/connect/dao/review/impl/RatingDaoImpl.java

http://focus-sns.googlecode.com/ · Java · 28 lines · 16 code · 5 blank · 7 comment · 0 complexity · 1570882818ee5a8b863defbb6dc6d891 MD5 · raw file

  1. package org.osforce.connect.dao.review.impl;
  2. import org.osforce.connect.dao.review.RatingDao;
  3. import org.osforce.connect.entity.review.Rating;
  4. import org.osforce.spring4me.dao.AbstractDao;
  5. import org.osforce.spring4me.dao.Page;
  6. import org.springframework.stereotype.Repository;
  7. /**
  8. *
  9. * @author <a href="mailto:haozhonghu@hotmail.com">gavin</a>
  10. * @since 1.1.2
  11. * @create Jun 23, 2011 - 12:51:39 PM
  12. * <a href="http://www.opensourceforce.org">????</a>
  13. */
  14. @Repository
  15. public class RatingDaoImpl extends AbstractDao<Rating> implements RatingDao {
  16. public RatingDaoImpl() {
  17. super(Rating.class);
  18. }
  19. static final String JPQL0 = "FROM Rating AS r WHERE r.project.id = ?1";
  20. public Page<Rating> findRatingPage(Page<Rating> page, Long projectId) {
  21. return findPage(page, JPQL0, projectId);
  22. }
  23. }