title: Returning a HashMap collection with simple property keys in QueryDsl
body: <p>In Querydsl, I would like to return a simple <code>Map&lt;String, Object&gt;</code> collection.  I imagine there's a simple way to do it.  I've used QMap, but it returns keys as fully qualified properties instead of simple properties.</p>
  
  <p>So instead of items looking like this using a QMap collection:</p>
  
  <pre><code>{
      poolMaster.calculateValue: "Y"
      poolMaster.downloadStats: "Y"
      poolMaster.maxPlayerValue: 25
      poolMaster.minPlayerValue: 5
      poolMaster.pickDeadline: 1430366400000
      size(poolMaster.poolSequences): 1
      poolMaster.year: 2015
  }
  </code></pre>
  
  <p>I'd like to get items that look like this:</p>
  
  <pre><code>{
      calculateValue: "Y"
      downloadStats: "Y"
      maxPlayerValue: 25
      minPlayerValue: 5
      pickDeadline: 1430366400000
      poolSequencesCount: 1
      year: 2015
  }
  </code></pre>
  
  <p>This is my elaborate solution so far, but I'm hoping Querydsl has something already built in.</p>
  
  <pre><code>public Collection&lt;Map&lt;String, Object&gt;&gt; findAll() {
      return this.from(poolMaster)
              .orderBy(poolMaster.year.desc())
              .list(
                      map(
                              poolMaster.year, poolMaster.pickDeadline, poolMaster.downloadStats,
                              poolMaster.calculateValue, poolMaster.minPlayerValue, poolMaster.maxPlayerValue,
                              poolMaster.poolSequences.size()
                      )
              ).stream()
              .map(toHashMap())
              .collect(toList());
  }
  
  public static Function&lt;Map&lt;Expression&lt;?&gt;, ?&gt;, Map&lt;String, Object&gt;&gt; toHashMap() {
      return expressionMap -&gt; {
          Map&lt;String, Object&gt; map = new HashMap&lt;&gt;();
          for (Expression&lt;?&gt; key : expressionMap.keySet()) {
              Path path = null;
              String suffix = "";
  
              if(key instanceof NumberOperation) {
                  NumberOperation op = (NumberOperation) key;
  
                  if(op.getOperator().getId().equals(Ops.COL_SIZE.getId())) {
                      suffix = "Count";
                  }
  
                  path = (Path) op.getArg(0);
              }
  
              if(key instanceof Path) {
                  path = (Path) key;
              }
  
              if(path != null) {
                  map.put(path.getMetadata().getName() + suffix, expressionMap.get(key));
              }
          }
          return map;
      };
  }
  </code></pre>