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

@param blueprintEntity  entity to merge
@return the merged entity
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/BlueprintDAO.java