title: JPA entity without underlying table
body: <p>I want to create a class that can be mapped to a result extracted from the database using JPA native query. Is there a way to map an entity without an underlying table to the result?
  I referred to <a href="https://stackoverflow.com/questions/8002989/hibernate-entities-without-underlying-tables" title="this">this</a> link which allows it for hibernate. Can this be done using JPA instead?</p>
  
  <p>This is my class for which I want the result to be mapped.</p>
  
  <pre><code>import java.math.BigDecimal;
  import javax.persistence.Entity;
  @Entity
  public class OpUsage {  
      String username;    
      BigDecimal number_of_clicks;    
      String accordion;
      public String getUsername() {
          return username;
      }
      public void setUsername(String username) {
          this.username = username;
      }
      public BigDecimal getNumber_of_clicks() {
          return number_of_clicks;
      }
      public void setNumber_of_clicks(BigDecimal number_of_clicks) {
          this.number_of_clicks = number_of_clicks;
      }
  
      public String getAccordion() {
          return accordion;
      }
  
      public void setAccordion(String accordion) {
          this.accordion = accordion;
      }
  }
  </code></pre>