@Test public void getAllThreads() { List<Thread> threads = cs.getAllThreads(2); for (Thread t : threads) { System.out.println(t.getThreadTitle()); } }
/** 取得所有的东西 */ @Test public void getAllThing() { List<Thread> threads = cs.getAllThreads(2); for (Thread t : threads) { System.out.println("Thread : " + t.getThreadTitle()); List<Post> posts = ts.getAllPosts(t.getThreadId()); for (Post p : posts) { System.out.println(">>>>Post : " + p.getPostContent()); List<Comment> comments = ps.getAllComments(p.getPostId()); for (Comment cm : comments) { System.out.println(">>>>>>>>Comment : " + cm.getCommentContent()); } } } }