public void setVersion(String version) {
    this.version = version;

    // need to be called to avoid work with wrong value until entity would be persisted
    if (null != version && null != stack && null != stack.getStackName()){
      removePrefixFromVersion();
    }
  }
Sets the version on this repository version entity. If the version is
confirmed as correct, then the called should also set
{@link #setResolved(boolean)}.

@param version
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RepositoryVersionEntity.java