- 授权协议: Apache
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: http://git.oschina.net/piaoniu/pndao
- 软件文档: http://git.oschina.net/piaoniu/pndao/blob/master/README.md?dir=0&filepath=README.md&oid=b71c0f3cf50091750a40aa293d201692e0722a74&sha=979505d8d1b0b83717a94ddf495697eaa0a4098b
软件介绍
pndao是票牛Java团队实践一年演化出来的工具。在实际生产中减少了80%以上的重复SQL编写工作,从而把关注力转移到模型本身的制定上。结合建表语句生成插件pngen,大部分场景只需编写一个模型类即可完成DAO层工作。
特性
支持最主流的MyBatis框架,无学习成本
基于常见DAO功能定制,提供便捷的同时也可约束命名规范
修改表结构后可同步修改SQL
编译期生成XML,也可便捷支持其他框架
以下是一个常见的DAO功能:
public class UserDaoTest extends AbstractTest{
public static final int USER_ID = 1;
@Autowired private UserDao userDao;
@Test
public void testInsertUser() throws Exception {
User user = initUser();
assertThat(userDao.insert(user)).isEqualTo(1);
}
@Test
public void testFindUserById() throws Exception {
User user = userDao.findById(USER_ID);
assertThat(user).isNotNull();
}
@Test
public void testUpdateUserName() throws Exception {
assertThat(userDao.updateForUserName("用户13700000001",USER_ID)).isEqualTo(1); }
}基于pndao,所有需要开发的DAO只有这些:
@DaoGen public interface UserDao {
int updateForUserName(@Param("userName") String userName, @Param("id") int id);
int insert(User t);
User findById(int id);
}
Google's PageRank and Beyond
Amy N. Langville、Carl D. Meyer / Princeton University Press / 2006-7-23 / USD 57.50
Why doesn't your home page appear on the first page of search results, even when you query your own name? How do other web pages always appear at the top? What creates these powerful rankings? And how......一起来看看 《Google's PageRank and Beyond》 这本书的介绍吧!
