public void revoke(RoleAssignment ra) {
   if (!em.contains(ra)) {
     ra = em.merge(ra);
   }
   em.remove(ra);
   /** @todo update permissionModificationTime here. */
   indexAsync.indexRole(ra);
 }
 public RoleAssignment save(RoleAssignment assignment) {
   if (assignment.getId() == null) {
     em.persist(assignment);
     em.flush();
   } else {
     assignment = em.merge(assignment);
   }
   /** @todo update permissionModificationTime here. */
   indexAsync.indexRole(assignment);
   return assignment;
 }