public void putProperty(String key, String value) {
    removeProperty(key);
    ViewInstancePropertyEntity viewInstancePropertyEntity = new ViewInstancePropertyEntity();
    viewInstancePropertyEntity.setViewName(viewName);
    viewInstancePropertyEntity.setViewInstanceName(name);
    viewInstancePropertyEntity.setName(key);
    viewInstancePropertyEntity.setValue(value);
    viewInstancePropertyEntity.setViewInstanceEntity(this);
    properties.add(viewInstancePropertyEntity);
  }
Add a property value to this instance.

@param key   the property key
@param value the property value
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java