code: public void addSingleEntity(String keyName) {
      // [START addSingleEntity]
      Key key = datastore.newKeyFactory().setKind("MyKind").newKey(keyName);
      Entity.Builder entityBuilder = Entity.newBuilder(key);
      entityBuilder.set("propertyName", "value");
      Entity entity = entityBuilder.build();
      try {
        datastore.add(entity);
      } catch (DatastoreException ex) {
        if ("ALREADY_EXISTS".equals(ex.getReason())) {
          // entity.getKey() already exists
        }
      }
      // [END addSingleEntity]
    }
docs: [VARIABLE "my_key_name"]