class ForumService {

	public void removePost(int postId){
		Post post = postDao.get(postId);
		postDao.remove(post);
		
		Topic topic = topicDao.get(post.getTopic().getTopicId());
		topic.setReplies(topic.getReplies() - 1);
		
		User user =post.getUser();
		user.setCredit(user.getCredit() - 20);
		
		//topic处于Hibernate受管状态，无须显示更新
		//topicDao.update(topic);
		//userDao.update(user);
	}

}