摘要
数据持久化层不仅向业务逻辑层提供面向对象的API,而且封装数据访问细节,为系统中的数据库操作提供统一的接口。本文结合DAO设计模式和Hibernate框架给出了一种通用数据持久化层的实现方案,并详细介绍了Hibernate配置文件与映射文件和DAO模式在通用数据持久化层中的实现过程。该方案很好地解决了系统设计中扩展性和移植性等问题。
Data persistent layer provides object oriented API to the business logic layer and encapsulates the data access details, providing unified interface for the database system operation. In this paper, we propose the implementation of general data persistent layer combining with DAO design pattern and Hibernate frame, and intro- duce its implementation process of Hibernate configuration file and mapping file and DAO pattern. The scheme solves the problems of expansibility and transplantation of the system design.
出处
《电光系统》
2012年第3期43-46,共4页
Electronic and Electro-optical Systems
基金
重庆市科委自然科学基金(CSTC,2011BB2143).