code: public void populate(Entity entity) {
      // auto date
      generateAutoDateOrDateTime(singletonList(entity), entity.getEntityType().getAttributes());
  
      // auto id
      Attribute idAttr = entity.getEntityType().getIdAttribute();
      if (idAttr != null
          && idAttr.isAuto()
          && entity.getIdValue() == null
          && (idAttr.getDataType() == STRING)) {
        entity.set(idAttr.getName(), idGenerator.generateId());
      }
    }
docs: Populates an entity with auto values
  
  @param entity populated entity