1 package org.javabb.dao.entity; 2 3 import java.util.List ; 4 5 import org.javabb.dao.DAOConstants; 6 import org.javabb.vo.Forum; 7 import org.javabb.vo.Post; 8 import org.javabb.vo.Topic; 9 10 25 26 32 public interface IPostDAO extends DAOConstants { 33 34 38 public Post load(Long id); 39 40 43 public Post findLastPost(); 44 45 public List findLastPosts(int limit); 46 47 51 public List findByTopicDesc(Topic topic); 52 53 57 public List findByForumDesc(Forum forum); 58 59 63 public Integer findCountOfPostsByForum(Forum forum); 64 65 66 71 public int getTotalRowsOfLucene(String query); 72 73 77 public List search(String query, int pageNumber, int numItems); 78 79 84 public List search(final String query, final int page); 85 86 90 public int countPostsByTopic(Long idTopic); 91 92 98 public List findByTopic(Long topicId, int pageNumber, int rowsPerPage); 99 100 104 public List findByUser( Long userId, int pageNumber, int itemsPerPage ); 105 106 public int countPostsByUser(Long userId); 107 108 111 public List findUnanswered(int pageNumber, int itemsPerPage); 112 113 public int countUnanswered(); 114 115 118 public void update(Post post); 119 120 124 public Long create(Post post); 125 126 129 public void delete(Long postId); 130 131 134 public int countAllPosts(); 135 } 136 | Popular Tags |