code: private Object getEntityFieldValue(EntityMetadata entityMetadata, Object entity, String field)
      {
          Class clazz = entityMetadata.getEntityClazz();
          MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
                  entityMetadata.getPersistenceUnit());
          EntityType entityType = metaModel.entity(clazz);
  
          if (field.indexOf(".") > 0 && entityMetadata.getEntityClazz().equals(entity.getClass()))
          {
              String fieldName = field.substring(field.indexOf(".") + 1, field.length());
              Attribute attribute = entityType.getAttribute(fieldName);
              return PropertyAccessorHelper.getObject(entity, (Field) attribute.getJavaMember());
          }
          else
          {
              // for hbase v2 client (sends arraylist for specific fields)
              if (entity instanceof ArrayList)
              {
                  Object element = ((ArrayList) entity).get(0);
                  ((ArrayList) entity).remove(0);
                  return element;
              }
              else
              {
                  return entity;
              }
          }
      }
docs: Gets the entity field value.
  
  @param entityMetadata
  the entity metadata
  @param entity
  the entity
  @param field
  the field
  @return the entity field value