code: private void buildEntityFromCursor(Object entity, HashMap obj, EntityType entityType)
      {
          Iterator<Attribute> iter = entityType.getAttributes().iterator();
          while (iter.hasNext())
          {
              Attribute attribute = iter.next();
              Field field = (Field) attribute.getJavaMember();
              if (field.isAnnotationPresent(Id.class))
              {
                  PropertyAccessorHelper.set(entity, field, obj.get(ID));
              }
              else
              {
                  PropertyAccessorHelper.set(entity, field, obj.get(((AbstractAttribute) attribute).getJPAColumnName()));
              }
  
          }
      }
docs: Builds the entity from cursor.
  
  @param entity
  the entity
  @param obj
  the obj
  @param entityType
  the entity type
  @return the object