code: public void populateEntity(Object entity, RowResult result, EntityType entityType, MetamodelImpl metaModel)
      {
          Set<Attribute> attributes = entityType.getAttributes();
          Iterator<Attribute> iterator = attributes.iterator();
          iterateAndPopulateEntity(entity, result, metaModel, iterator);
      }
docs: Populate entity.
  
  @param entity
  the entity
  @param result
  the result
  @param entityType
  the entity type
  @param metaModel
  the meta model