public boolean exists(PrivilegeEntity entity) {
    return exists(entity.getPrincipal(), entity.getResource(), entity.getPermission());
  }
Determine whether or not the given privilege entity exists.

@param entity  the privilege entity

@return true if the given privilege entity already exists
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/PrivilegeDAO.java