Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

LinQ in JAVA

  Asked By: Joel    Date: Sep 22    Category: Java    Views: 1014

did anyone have a LinQ component jar file such as .net LinQ ?,
Please help me ..



5 Answers Found

Answer #1    Answered By: Albert Ellis     Answered On: Sep 22

Do you mean a Java implementation of Linq? Or a Java ORM tool?

1- There is a library named Quaere, but I think it is not a full LINQ implementation because LINQ uses Lambda Expressions and generates inspection tree at runtime. You can use it and if you have a good experience with Quaere, discuss here.

2- If you mean an ORM tool for Java, you can use JPA (Java Persistence API) with one of its implementation (Hibernate, TopLink).

Answer #2    Answered By: Dannon Jones     Answered On: Sep 22

Just something I had in mind, in addition to what Ali said:

1. In addition to library implementations (like enumeration pipeline, expression tree, etc.) LINQ is built on top of a couple of language features (anonymous types, extension methods, lambda expressions, implicitly typed variables, and query keywords), which provide some compile time benefits. (like type-safety) I think LINQ can’t just be ‘implemented’ as a class library in Java, unless you provide some pre-compilation phase and an IDE to simulate that. Let me know if I’m wrong.

2. LINQ is a very broad set of features targeting different aspects of development. (for example, its LINQ2SQL provides some kind of ORM. We do use LINQ in our project a lot, and it really helps us, but nothing ORM-related.) You should specify what kind of thing you want to do similar to the LINQ way.

Answer #3    Answered By: Walborgd Fischer     Answered On: Sep 22

my mean is a Java implementation of Linq,
i have found one implementation of Quaere
but its incomplete and dont work .

Answer #4    Answered By: Bradley Evans     Answered On: Sep 22

if you are only searching for type safe query (not other LINQ features)
it is coming in JPA 2.0

Answer #5    Answered By: Barak Levi     Answered On: Sep 22

LINQ is not just an ORM tool or library. I saw some LINQ providers like
LINQ to SQL (to connect to SQL Server Relational Database), LINQ to NHibernate (Hibernate's cousin),
LINQ to LDAP and so forth. In general, LINQ is a standard way to access your data without care about
where they are.

For adding LINQ to .NET Framework, Microsoft introduced lots of new features in C# language and almost
none of these new features is available in Java till now. So wait for Java 7, JEE 6 and JPA 2.

Didn't find what you were looking for? Find more on LinQ in JAVA Or get search suggestion and latest updates.