public void createOrUpdate(ExtensionLinkEntity link)
      throws AmbariException {
    if (null == link.getLinkId()) {
      create(link);
    } else {
      merge(link);
    }
  }
Creates or updates the specified entity. This method will check
{@link ExtensionLinkEntity#getLinkId()} in order to determine whether the entity
should be created or merged.

@param link the link to create or update (not {@code null}).
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ExtensionLinkDAO.java