rascio
rascio

Reputation: 9279

Java orm framework

Do someone know if there exists a framework for java where I don't have to implement the DAO but I need just to define the interface and it works like the groovy entities?

For example naming a method findByPrimaryKey it will autodetect the primary key and do the right thing.

I'm not sure but I remember I have seen something like this with Spring...Am I wrong?

Upvotes: 1

Views: 294

Answers (5)

ipolevoy
ipolevoy

Reputation: 5518

you might want to consider ActiveJDBC: http://javalite.io/activejdbc. It was modeled after RoR ActiveRecord, and retains some of its dynamic behavior. However, in Java you cannot define new methods at run time, as there is no equivalent of method_mising from Ruby. There is plenty documentation you can follow: http://javalite.io/documentation

Upvotes: 0

mmigdol
mmigdol

Reputation: 2193

As of Grails 2.3.6, GORM is officially supported as a standalone module. See the release notes for more details.

Upvotes: 0

Jeff Miller
Jeff Miller

Reputation: 1434

sormula may work for you also. CRUD operations are available without requiring any DAO implementions. It does not have auto primary key detection but one simple annotation defines the primary key(s).

Upvotes: 0

Aravind A
Aravind A

Reputation: 9697

You may want to take a look at the Spring Data-JPA project . It has similar features to what you need . See their page here.

Here's a link to their query methods . It think this is what you're looking for .

Upvotes: 4

Ralph
Ralph

Reputation: 120791

There are two for Spring, both based on JPA

Upvotes: 2

Related Questions