@Transactional
  public void remove(Set<GroupEntity> groups) {
    for (GroupEntity groupEntity: groups) {
      entityManagerProvider.get().remove(entityManagerProvider.get().merge(groupEntity));
    }
  }
Find the group entity for the given admin principal entity.

@param principal the principal entity

@return the matching gropu entity
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/GroupDAO.java