public void addVersion(ServiceComponentVersionEntity versionEntity) {
    if (null == serviceComponentVersions) {
      serviceComponentVersions = new ArrayList<>();
    }

    serviceComponentVersions.add(versionEntity);
    versionEntity.setServiceComponentDesiredState(this);
  }
@param versionEntity the version to add
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentDesiredStateEntity.java