Having played with Linq (to SQL and Objects) as well as the Entity Framework from Microsoft recently, I was wondering what the non-.Net (specifically Java) equivalents are?
There is nothing like LINQ for Java. Now with Java 8 we are introduced to the Stream API, this is a similar kind of thing when dealing with collections, but it is not quite the same as Linq.
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.
Entity Framework is an object-relational mapping (ORM) framework for connecting C# code to external databases, usually SQL Server. LINQ is a query language embedded into C# and a set of extension methods in order to make it useful.
nHibernate supports all types of databases but Entity framework need additional connectors to support databases other than MSSQL. nHibernate can be extended in terms of data loading, SQL generation, custom column types, custom collections etc but entity framework has limited extension points.
Consider using Querydsl : http://www.querydsl.com
It supports JPA/Hibernate, JDO, SQL and Collections.
Querydsl is fully type-safe, supports autocomplete in IDEs and provides a common querying syntax on top multiple backends.
I am the maintainer of Querydsl, and I wrote a comparison to other frameworks some time ago.
It is slightly biased, but shows the different emphasis
Newer frameworks experiment also with closure syntax.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With