title: How can I send default value to CriteriaBuilder constructor based selection field?
body: <p>I am using JPA <code>CriteriaBuilder</code> to create query and uses constructor base selection. But  In my case I want some default value to specific parameter (Dummy). But that parameter is not a table column.</p>
  
  <p>Is there any way to achieve this?</p>
  
  <pre><code>CriteriaBuilder cb = getEntityManager().getCriteriaBuilder();
  CriteriaQuery&lt;HEntity&gt; cq = cb.createQuery(HEntity.class);
  Root&lt;HTable&gt; root = cq.from(HTable.class);
  
  // original selection criteria
  // build result set class
  cq.select(cb.construct(HDto.class,
                  root.&lt;Long&gt;get("id"),
                  root.&lt;Date&gt;get("datetime"),
                  root.get("device")
                 )
  </code></pre>
  
  <p>Is there any way to achieve like following?</p>
  
  <pre><code>// build result set class
  cq.select(cb.construct(HDto.class,
                  root.&lt;Long&gt;get("id"),
                  root.&lt;Date&gt;get("datetime"),
                  root.get("devicename"),
                  "default value"
                 )
  </code></pre>