code: public int getPropertyId(@NotNull final PersistentStoreTransaction txn, @NotNull final String propertyName, final boolean allowCreate) {
          return allowCreate ? propertyIds.getOrAllocateId(txn, propertyName) : propertyIds.getId(txn, propertyName);
      }
docs: Gets id of a property and creates the new one if necessary.
  
  @param txn          transaction
  @param propertyName name of the property.
  @param allowCreate  if set to true and if there is no property named as propertyName,
  create the new id for the propertyName.
  @return < 0 if there is no such property and create=false, else id of the property