public boolean updatePermission(Permission p, String permissionID) {
boolean result = false;
em =EMF.get().createEntityManager();
try{
em.getTransaction().begin();
Permission px = em.find(Permission.class, Integer.valueOf(permissionID));
px.setPermissionName(p.getPermissionName());
px.setInactive(p.getInactive());
em.getTransaction().commit();
result = true;
}
catch (Exception e){System.out.println("couldn't persist: " + e);