@Transactional
  public StackEntity merge(StackEntity stack) {
    return entityManagerProvider.get().merge(stack);
  }
Merge the speicified stack with the existing stack in the database.

@param stack
         the stack to merge (not {@code null}).
@return the updated stack with merged content (never {@code null}).
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/StackDAO.java