48495051525354555657
return getSession().createQuery("from Post order by description") .list(); } public void deletePost(Long postId) { Post post = getPost(postId); if (post != null) { getSession().delete(post); } }
545556575859606162636465
} } public void createPost(String title, String description, Date date, String autor) { Post post = new Post(); post.setTitle(title); post.setDescription(description); post.setAutor(autor); post.setDate(date); blogDao.createPost(post); }