code: private Object populateEntityFromHBaseData(Object entity, HBaseDataWrapper hbaseData, EntityMetadata m,
              Object rowKey)
      {
          try
          {
              Map<String, Object> relations = new HashMap<String, Object>();
              if (entity.getClass().isAssignableFrom(EnhanceEntity.class))
              {
                  relations = ((EnhanceEntity) entity).getRelations();
                  entity = ((EnhanceEntity) entity).getEntity();
              }
              MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
                      m.getPersistenceUnit());
              EntityType entityType = metaModel.entity(m.getEntityClazz());
              Set<Attribute> attributes = ((AbstractManagedType) entityType).getAttributes();
  
              writeValuesToEntity(entity, hbaseData, m, metaModel, attributes, m.getRelationNames(), relations, -1, "");
              if (!relations.isEmpty())
              {
                  return new EnhanceEntity(entity, rowKey, relations);
              }
              return entity;
          }
          catch (PropertyAccessException e1)
          {
              throw new RuntimeException(e1);
          }
      }
docs: Populate entity from hBase data.
  
  @param entity
  the entity
  @param hbaseData
  the hbase data
  @param m
  the m
  @param rowKey
  the row key
  @return the object