Is there any entity framework equivalent in java? [closed]

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.

For example, if I have a database called Shop, and in the Shop database I have Products table, i can get all product of Productstable where their price is less than 2 dollar in the following way:

ShopEntity _Db = new ShopEntity();
List<Product> products = _Db.Products.Where(p => p.Price < 2).ToList();

The above code is equivalent to this SQL statement:

Select * From Products Where Price < 2

I want to know is there any framework like that in Java?

I also saw quaere. But it just queries collections. I want to query against the database. There is another framework in java called Hibernate which does not provide good functionality for query the database.


The standard ORM API in Java it's called JPA, and is part of the Java EE specification. Another alternative would be to use Hibernate. Both provide their own query language (JPQL and HQL respectively), but no query framework exists under Java that provides a direct integration at the language level the way LINQ does for C#.