code: protected List<EnhanceEntity> transform(EntityMetadata m, List<EnhanceEntity> ls, List resultList)
      {
          if ((ls == null || ls.isEmpty()) && resultList != null && !resultList.isEmpty())
          {
              ls = new ArrayList<EnhanceEntity>(resultList.size());
          }
          for (Object r : resultList)
          {
              if (r != null && !r.getClass().isAssignableFrom(EnhanceEntity.class))
              {
                  EnhanceEntity e = new EnhanceEntity(r, getId(r, m), null);
                  ls.add(e);
              }
          }
          return ls;
      }
docs: Transform.
  
  @param m
  the m
  @param ls
  the ls
  @param resultList
  the result list
  @return the list