* com.bolbachchan.blog.dao.posts.UserPostsDAO#saveNewPost(com.bolbachchan
* .blog.dto.PostDTO)
*/
@Override
public void saveNewPost(PostDTO dto) {
Posts post = null;
Session session = null;
try {
session = getSessionFactory().getCurrentSession();
post = new Posts();
post.setUserDetails(dto.getUserDetails());
post.setPostTitle(dto.getPostTitle());
post.setPostContent(dto.getPostContent());
Timestamp updateDt = new Timestamp(new Date().getTime());
post.setCreateDt(updateDt);
post.setUpdateDt(updateDt);
LOG.debug("The new post is : " + post);
int id = (Integer) session.save(post);