private static void removeEntity(EntityManagerFactory emf, int id) {
EntityManager em = emf.createEntityManager();
Employee employee = em.find(Employee.class, id);
System.out.println("-- removing entity --");
printObject(employee);
em.getTransaction().begin();
em.remove(employee);
em.getTransaction().commit();
em.close();
}