code: public HBaseRow createHbaseRow(EntityMetadata m, Object entity, Object rowId, List<RelationHolder> relations)
              throws IOException
      {
          MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
                  m.getPersistenceUnit());
          EntityType entityType = metaModel.entity(m.getEntityClazz());
          Set<Attribute> attributes = entityType.getAttributes();
          if (metaModel.isEmbeddable(m.getIdAttribute().getBindableJavaType()))
          {
              rowId = KunderaCoreUtils.prepareCompositeKey(m, rowId);
          }
          HBaseRow hbaseRow = new HBaseRow(rowId, new ArrayList<HBaseCell>());
          // handle attributes and embeddables
          createCellsAndAddToRow(entity, metaModel, attributes, hbaseRow, m, -1, "");
          // handle relations
          if (relations != null && !relations.isEmpty())
          {
              hbaseRow.addCells(getRelationCell(m, rowId, relations));
          }
          // handle inheritence
          String discrColumn = ((AbstractManagedType) entityType).getDiscriminatorColumn();
          String discrValue = ((AbstractManagedType) entityType).getDiscriminatorValue();
          if (discrColumn != null && discrValue != null)
          {
              hbaseRow.addCell(new HBaseCell(m.getTableName(), discrColumn, discrValue));
          }
          return hbaseRow;
      }
docs: Creates the hbase row.
  
  @param m
  the m
  @param entity
  the entity
  @param rowId
  the row id
  @param relations
  the relations
  @return the hBase row
  @throws IOException
  Signals that an I/O exception has occurred.