Unlock instant, AI-driven research and patent intelligence for your innovation.

Implementation method of data persistence layer

A technology of data persistence layer and implementation method, applied in the field of JAVA development, can solve problems such as increasing development workload, and achieve the effect of providing flexibility and reducing writing

Pending Publication Date: 2020-02-14
G CLOUD TECH
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The implementation methods of each module are basically the same, which could have been realized through a unified implementation class, but currently each business needs an implementation class, which increases the development workload

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Implementation method of data persistence layer

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0021] See figure 1 As shown, the present invention is based on the data persistence layer implementation method steps of the ibatis framework foundation as follows:

[0022] S10: Define the persistent layer unified interface BasicDao, mainly including insert, deleteById, update, queryForList, queryForObject and other database operation methods. The aforementioned methods all require two parameters, which are the id of the SQL statement and the object to be operated on. The return value of the method implements different return types through generics.

[0023] S20: Define the unified implementation class BasicDaoImpl of the persistence layer interface.

[0024] The implementation class BasicDaoImpl implements the BasicDao interface and inherits SqlMapClientDaoSupport to obtain support for related aspects of the ibatis framework. In the specific methods of this implementation class, data storage and query are realized through the insert, deleteById, update, queryForList, and...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to the technical field of JAVA development, in particular to an implementation method of a data persistence layer. According to the method, a unified persistent layer interface is realized, and all methods for database operation are defined in the interface; unified implementation classes of persistent layer interfaces are realized; wherein the implementation class implementsall methods of the interface; in the service implementation layer, directly calling the database base class to complete the operation of the database; an sql statement of the service module is developed, and the id of the statement is consistent with the method of the service module. The method solves the problems that the development workload of the persistent layer is large, and upgrading is inconvenient; the method can be used for realizing a data persistence layer based on an ibatis framework foundation.

Description

technical field [0001] The invention relates to the technical field of JAVA development, in particular to a method for realizing a data persistence layer. Background technique [0002] At present, in the ibatis-based persistence layer framework, the interface of the business persistence layer is usually defined first, and then the interface is implemented. In the implementation class of this interface, each method uses the call of the corresponding method of the SqlMapClientTemplate class to realize data addition, deletion, modification, and query. In the implementation process, SqlMapClientTemplate provides insert, update, delete, queryForList, queryForObject and other methods. The aforementioned methods all require two important parameters, one is the id of SQL, and the other is the object information to be operated. Usually, the program will pass the sql statement id of the xml configuration directly as a parameter to the corresponding method in a hard-coded manner, so ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/30
CPCG06F8/30
Inventor 关班记季统凯
Owner G CLOUD TECH