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?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
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.
For LINQ (LINQ to Objects to be more accurate) you can use Streams starting from Java 8
This doesn't work for databases however, only for internal objects like Collections and Lists
It is really powerfull, but not as complete as LINQ (in my opinion)
Check out this tutorial - http://www.oracle.com/technetwork/articles/java/ma14-java-se-8-streams-2177646.html
As for Entity Framework there is nothing quite as powerful that I have found yet, but haven't tried all the solutions provided in the other answers