"Design and Implementation of agile ORM framework of the Spring environment," the paper notes

"Design and Implementation of agile ORM framework of the Spring environment," the paper notes

First, the basic information

  • Title: Agile Spring ORM framework of environmental design and implementation

  • Source: Institute of Jiangxi University of Finance and network engineering software

  • Keywords :: Spring; development efficiency; database; ORM

    Second, research

  1. Universal SQL module implements the principle of
    • Java reflection mechanism referenced class properties and analytical methods according to one example, may create a new instance. Factory mode allows designers to obtain their own product specifications and product categories, abstract products, thus ensuring the unity of the factory model. Reasonable Singleton pattern can reduce the number of created objects, reduce memory consumption and increase reusability. This module according to parameter type, the use of factory class SQLGen generated SQLBeanBuilder or SQLTextBuilder class singleton, then according to the methods in the class singleton generated by the key information reflection parameter class name, attribute name and methods, to produce the desired SQL text.
  2. CRUD module implements the principle of universal
    • Spring-based framework, injection dependency (dependency Injection, DI) can provide the desired instance and for generating a corresponding arbitrary dynamic Java objects. This module IOC mode in dependence Spring environment achieved by the interface module InitializingBean DaoFactory factory class, the class factory to provide DataSourceMap Spring injection attribute, then access by access attribute method defaultDao like.
  3. Rapid CRUD methods module implements the principle of
    • 代理模式尤其是Java的动态代理模式使软件开发人员无须定义代理类,只需指定一组接口及被代理类的对象便可动态获得代理类。Java的动态代理由Proxy类和InvocationHandler接口实现。Proxy 类提供了创建动态代理的类及其实例的静态方法。运行过程中Java通过调用动态处理类的bind方法完成被代理类绑定,可无限制地调用被代理类的方法。本模块依赖Spring 环境下基于JDK 的动态代理方式,通过RepositoryProxyFactory 实InvocationHandler 接口功能,同时使用RepositoryRegistry 类BeanDefinitionRegistry-PostProcessor接口实现对代理类的注册。

      三、结论

  • ORM 框架名称为template-module-orm,包含通用SQL快速生成模块(template-module-sql)、多模式数据库通用CRUD模块(template-module-jpa)、数据表格分页查询模块(template-module-pagination)以及快速CRUD 方法4 个模块(template-module-repository),每个模块对应处理不同内容,通过4个模块的合作达到对DAL层的高效开发。

四、参考文献

  • [1]伍文彬.Spring环境下的敏捷ORM框架设计与实现[J].软件导刊,2019,18(5):134-136. DOI:10.11907/rjdk.191289.

Guess you like

Origin www.cnblogs.com/clamye/p/12045454.html