public boolean updateRole(Role r, String roleID) {
boolean result = false;
em =EMF.get().createEntityManager();
try{
em.getTransaction().begin();
Role rx = em.find(Role.class, Integer.valueOf(roleID));
rx.setRoleName(r.getRoleName());
rx.setInactive(r.getInactive());
em.getTransaction().commit();
result = true;
}
catch (Exception e){System.out.println("couldn't persist: " + e);