post.setTitle("标题");
post.setPreview("预览");
post.setModificationDate(new Date());
post.setCreationDate(new Date());
post.setType(PostType.NEWS);
postDao.persist(post);
postDao.getEntityManager().getTransaction().commit();
postDao.setEntityManager(factory.createEntityManager());
System.out.println(postDao.retrieve(post.getId()).getContent());
System.out.println(postDao.retrieve(1).getPreview());
}