Skip to content
This repository has been archived by the owner on Feb 3, 2018. It is now read-only.

Latest commit

 

History

History
20 lines (14 loc) · 646 Bytes

readme.md

File metadata and controls

20 lines (14 loc) · 646 Bytes

This is a playground area for an idea I had about making data access easier in Java.

The idea comes from Linq to SQL in .Net.

Here is an example what this might look like:

final UserContext context = DataContext.from (User.class);
// This could also be written as
// final UserContext context = ContextFactory.newInstance(User.class, UserContext.class);

final Enumerable<User> userEnumerable = from (User.class)
		.whereEmailAddress ("[email protected]")
		.or ().whereEmailAddress ("[email protected]")
		.select (User.class);

final int totalUsers = userEnumerable.count ();
final User[] users = userEnumerable.toArray ();