Java orm框架 [英] Java orm framework

查看:98
本文介绍了Java orm框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道是否存在用于Java的框架,而我无需实现DAO,但我只需要定义接口即可,并且它就像Groovy实体一样工作?

例如,命名方法 findByPrimaryKey ,它将自动检测主键并执行正确的操作.

我不确定,但是我记得我在Spring中看到过类似的东西...我错了吗?

解决方案

您可能想看一下Spring Data-JPA项目.它具有与您所需类似的功能.在此处中查看其页面.

这是一个链接为其查询方法.它认为这就是您要寻找的.

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?

解决方案

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 .

这篇关于Java orm框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆