dbTier这个Eclipse插件封装了Hibernate组件并为Eclipse RCP应用程序提供统一的数据访问接口。
官方网站:http://eclipsedbtier.sourceforge.net/index.html
下载地址:http://eclipsedbtier.sourceforge.net/index.html
Using dbTier in Eclipse RCP Project.
For using dbTier you need:
- Add dbTier to dependencies of your plug-in. Open your plug-in manifest and navigate to dependencies tab folder. Add ru.unislabs.dbtier to Required plug-ins list.
- Configure hibernate.cfg.xml as you need. This file is placed in hibernate subfolder of ru.unislabs.dbtier plug-in. For more information see Hibernate documentation.
- Place mapping description hbm.xml files to hibernate subfolder of ru.unislabs.dbtier. Or use hibernate annotations for your domain area classes.
- Export java packages with domain object area DTOs from your plugin descriptor.
- Use DAO for data access:
DAO dao = DAOFactory.getInstance().getDAO();
List domainObjects = dao.select(MyDomainObject.class);
|