@Transactional
  public PrivilegeEntity merge(PrivilegeEntity entity) {
    return entityManagerProvider.get().merge(entity);
  }
Merge the state of the given entity into the current persistence context.

@param entity  entity to merge

@return the merged entity
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/PrivilegeDAO.java