code: private <X extends Class, T extends Object> void populateMetadata(EntityMetadata metadata, Class<X> clazz,
              Map puProperties)
      {
          // process for metamodelImpl
  
          if (metadata.getPersistenceUnit() != null)
          {
              MetaModelBuilder<X, T> metaModelBuilder = kunderaMetadata.getApplicationMetadata().getMetaModelBuilder(
                      metadata.getPersistenceUnit());
  
              onBuildMetaModelSuperClass(clazz.getSuperclass(), metaModelBuilder);
  
              metaModelBuilder.process(clazz);
  
              for (Field f : clazz.getDeclaredFields())
              {
                  if (f != null && !Modifier.isStatic(f.getModifiers()) && !Modifier.isTransient(f.getModifiers())
                          && !f.isAnnotationPresent(Transient.class))
                  {
                      // construct metamodel.
                      metaModelBuilder.construct(clazz, f);
  
                      // on id attribute.
                      onIdAttribute(metaModelBuilder, metadata, clazz, f);
  
                      // determine if it is a column family or super column
                      // family.
                      onFamilyType(metadata, clazz, f);
                  }
              }
  
              EntityType entityType = (EntityType) metaModelBuilder.getManagedTypes().get(metadata.getEntityClazz());
  
              validateAndSetId(metadata, clazz, metaModelBuilder);
              validateandSetEntityType(metadata, clazz, metaModelBuilder);
              MetadataUtils.onJPAColumnMapping(entityType, metadata);
  
              /* Scan for Relationship field */
              populateRelationMetaData(entityType, clazz, metadata);
          }
      }
docs: Populate metadata.
  
  @param <X>
  the generic type
  @param <T>
  the generic type
  @param metadata
  the metadata
  @param clazz
  the clazz