利用Java反射实现万能DAO

上传者: icarus_wang | 上传时间: 2021-07-20 08:42:42 | 文件大小: 41KB | 文件类型: RAR
利用Java的反射机制实现的万能DAO工具类,包含对应的测试代码。具体功能包括:单表查询,多表查询,模糊查询,添加,修改,删除等。利用万能DAO可以对数据库中任意表进行操作,只需一个DAO类即可完成。阅读本代码需要掌握Java反射机制以及数据库DAO类基础。

文件下载

资源详情

[{"title":"( 30 个子文件 41KB ) 利用Java反射实现万能DAO","children":[{"title":"SuperDAO","children":[{"title":"SuperDAO.iml <span style='color:#111;'> 621B </span>","children":null,"spread":false},{"title":"src","children":[{"title":"cn","children":[{"title":"lovepi","children":[{"title":"dao","children":[{"title":"AntypeDAO.java <span style='color:#111;'> 1.19KB </span>","children":null,"spread":false},{"title":"AnimalsDAO.java <span style='color:#111;'> 1.69KB </span>","children":null,"spread":false}],"spread":true},{"title":"util","children":[{"title":"SuperDAOPro.java <span style='color:#111;'> 19.10KB </span>","children":null,"spread":false},{"title":"SuperDAO.java <span style='color:#111;'> 11.21KB </span>","children":null,"spread":false},{"title":"DBConnectionFactory.java <span style='color:#111;'> 2.67KB </span>","children":null,"spread":false}],"spread":true},{"title":"main","children":[{"title":"TestMain.java <span style='color:#111;'> 3.04KB </span>","children":null,"spread":false}],"spread":true},{"title":"bean","children":[{"title":"Antype.java <span style='color:#111;'> 675B </span>","children":null,"spread":false},{"title":"Animals.java <span style='color:#111;'> 1.21KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"dbconfiger.properties <span style='color:#111;'> 109B </span>","children":null,"spread":false}],"spread":true},{"title":".idea","children":[{"title":"libraries","children":[{"title":"mysql_connector_java_5_1_38_bin.xml <span style='color:#111;'> 314B </span>","children":null,"spread":false}],"spread":true},{"title":"misc.xml <span style='color:#111;'> 2.90KB </span>","children":null,"spread":false},{"title":"compiler.xml <span style='color:#111;'> 686B </span>","children":null,"spread":false},{"title":"dataSources.local.xml <span style='color:#111;'> 428B </span>","children":null,"spread":false},{"title":"uiDesigner.xml <span style='color:#111;'> 8.59KB </span>","children":null,"spread":false},{"title":"workspace.xml <span style='color:#111;'> 84.21KB </span>","children":null,"spread":false},{"title":"dataSources.xml <span style='color:#111;'> 892B </span>","children":null,"spread":false},{"title":"dataSources.ids <span style='color:#111;'> 2.24KB </span>","children":null,"spread":false},{"title":"modules.xml <span style='color:#111;'> 256B </span>","children":null,"spread":false},{"title":"sqldialects.xml <span style='color:#111;'> 182B </span>","children":null,"spread":false},{"title":"copyright","children":[{"title":"profiles_settings.xml <span style='color:#111;'> 76B </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"out","children":[{"title":"production","children":[{"title":"SuperDAO","children":[{"title":"cn","children":[{"title":"lovepi","children":[{"title":"dao","children":[{"title":"AnimalsDAO.class <span style='color:#111;'> 2.32KB </span>","children":null,"spread":false},{"title":"AntypeDAO.class <span style='color:#111;'> 2.00KB </span>","children":null,"spread":false}],"spread":true},{"title":"util","children":[{"title":"DBConnectionFactory.class <span style='color:#111;'> 2.95KB </span>","children":null,"spread":false},{"title":"SuperDAOPro.class <span style='color:#111;'> 12.92KB </span>","children":null,"spread":false},{"title":"SuperDAO.class <span style='color:#111;'> 7.34KB </span>","children":null,"spread":false}],"spread":true},{"title":"main","children":[{"title":"TestMain.class <span style='color:#111;'> 3.55KB </span>","children":null,"spread":false}],"spread":true},{"title":"bean","children":[{"title":"Antype.class <span style='color:#111;'> 1.07KB </span>","children":null,"spread":false},{"title":"Animals.class <span style='color:#111;'> 1.67KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"dbconfiger.properties <span style='color:#111;'> 109B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}]

评论信息

  • clevercode :
    看一下。。。。。
    2019-05-05
  • qq_33456258 :
    说句实话,楼主能把这些代码贡献出来,确实是怀着开源的精神,4分的却不高,去下了一个8分的,写的远远不如这个。
    2017-09-08

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明