title: Is there any entity framework equivalent in java?
body: <p>Everyone who programmed with C# knows that there is the Entity Framework as ORM (object-relational mapper) which enable programmer to query database using only C# code.</p>
  <p>For example, if I have a database called <code>Shop</code>, and in the <code>Shop</code> database I have <code>Products</code> table, i can get all product of <code>Products</code>table where their price is less than 2 dollar in the following way:</p>
  <pre><code>ShopEntity _Db = new ShopEntity();
  List&lt;Product&gt; products = _Db.Products.Where(p =&gt; p.Price &lt; 2).ToList();
  </code></pre>
  <p>The above code is equivalent to this SQL statement:</p>
  <pre><code>Select * From Products Where Price &lt; 2
  </code></pre>
  <p>I want to know is there any framework like that in Java?</p>
  <p>I also saw <a href="https://stackoverflow.com/questions/1083080/what-are-the-java-equivalents-to-linq-and-entity-framework">quaere</a>. But it just queries collections. I want to query  against the database. There is another framework in java called <a href="http://hibernate.org" rel="noreferrer">Hibernate</a> which does not provide good functionality for query the database.</p>