hibernate如何反向工程的详细步骤(原创)

步骤一:
window-->open Perspective-->MyEclipse Java Persistence
进行了上面的 操作后会出现一个视图DB Brower:MyEclipse Derby,点击右键新建一个在出现的面板中,driver template中选择Oracle(ThinDriver)这里以oracle软件为例,driver name自己写个随便的,Connection URL就写平常的JDBC中的URL,jdbc:oracle:thin:@127.0.0.1:1521>]:<database_name>,用户名,用户密码也是的,接下来add Jars添加oracle的驱动包,测试下是否可用,点击下一步完成,这时在视图中会出现你写的driver name的那个图标了,点击图标可以看到数据库中所有的表 。

步骤二:
选中项目右键 -->MyEclipse-->add Hibernate Capabilities 这里我们选择hibernate3.3然后如果需要用到在实体类 上添加注释的话那么选中紧挨着的add Hibernate Annotations Support然后下一步选中一个目录存放自动生成hibernate.cfg.xml文件,下一步选中一个DB Driver中我们第一步建立的那个,然后下一步选中一个目录存放自动生成的 HibernateSessionFactory工具类

步骤三:
反转,到DB Brower中那个新建的选中点开到所有表选中并且点击右键--->Hibernate Reverse Enginnering 选中目录存放将要反转出来的实体类并且勾选中Create POJO<>DB(add Hibernate mapping..用来在实体类中添加注释映射,可选可不选),选中Update Hibernate configuration..用来将生成的实体类映射到上一步生成的hibernate.cfg.xml中去,接着再下一步到typeMapping 这里选中Hibernate type类型,再到Id Generator这里,可以设置成为native,Generate version and timestamp tag是用来在有version字样的数据库列生成表的字段时自动加上@version注解,同样可选可不选,然后点击Finish完成。 就可以回到my eclipse enterprise视图下面看到所生成的实体类以及配置文件。

Multi-objective evolutionary federated learning (MEFL) is a machine learning approach that combines the principles of multi-objective optimization and federated learning. Multi-objective optimization is a technique that aims to optimize multiple objectives simultaneously, while federated learning is a decentralized machine learning approach that allows multiple devices to train a model collaboratively without sharing their data. MEFL is designed to overcome the limitations of traditional federated learning approaches, which often suffer from issues related to privacy, communication, and scalability. By using multi-objective optimization, MEFL can optimize the performance of the federated learning algorithm while also addressing these issues. MEFL works by dividing the optimization problem into multiple objectives, such as minimizing the loss function, reducing communication costs, and preserving privacy. A genetic algorithm is then used to optimize these objectives simultaneously, producing a set of Pareto-optimal solutions that represent the trade-offs between the different objectives. These Pareto-optimal solutions can then be used to select the best model for deployment, depending on the specific requirements of the application. MEFL has been shown to be effective in a wide range of applications, including image classification, natural language processing, and speech recognition. Overall, MEFL represents a promising approach to federated learning that can improve the privacy, communication, and scalability of the algorithm while also optimizing its performance.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值