A kind of orm design method and device

A design method and entity type technology, applied in the computer field, can solve the problems of writing and debugging sql statements, reducing development efficiency and other problems, so as to facilitate code transplantation, improve operating efficiency, and reduce memory resources.

Active Publication Date: 2022-04-15
蔡廷超 +1
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Mybatis needs to write too many sql statements, and it takes a lot of time to write and debug sql statements, which reduces development efficiency

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
  • A kind of orm design method and device
  • A kind of orm design method and device
  • A kind of orm design method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0042] Specific embodiments of the present invention provide an ORM design method and apparatus.

[0043] The embodiments described below with reference to the accompanying drawings (when involving specific language description, are described in Java language) are only one embodiment of the present invention, and should not be construed as a limitation of the present invention.

[0044] Treat the entity type corresponding to any DB table as an indistinguishable abstract type, such as figure 1 shown. Use generics for entity type parameters in the method parameter list and generics for return value types (such as figure 1 11), or use generics for entity type parameters in the method parameter list (such as figure 1 12); the method is applied in the interface (such as figure 1 13) or class. The class or interface hierarchy has no entity type parameters or generic parameters (such as figure 1 shown in 13). The interface has a specific implementation class, and the implementa...

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 provides an ORM design method and device. The main design ideas are as follows: 1) Treat the entity type corresponding to any DB table as an indistinguishable abstract type, and use generics as the entity parameter type passed in by the object-oriented interface method; The generic entity parameter type is converted into the corresponding sql statement; 3) According to the incoming entity type structure and reflection mechanism, the query result is automatically assembled into the result of the corresponding entity type structure. The device involved in the present invention at least includes: an object-oriented suid interface module, an object-to-sql statement module, a bottom interface operation DB and an automatic assembly return result module and a context module. Developers only need to use the interface in the suid interface module in an object-oriented manner. For the device involved in the present invention, the encoding complexity C(n) is O(l). Using a unified dao to operate the DB, even if the number of JavaBeans required to complete the DB operation increases, developers do not need to write any specific dao implementations.

Description

technical field [0001] The present invention relates to the field of computer technology and software technology, and in particular, to a method and device for implementing Object Relational Mapping (ORM). Background technique [0002] Explanation of terms or abbreviations: [0003] ORM: Object Relational Mapping. ORM is the mapping between the concept of object in object-oriented programming and the concept of table in relational database; thus, the operation of the database is changed to operate in an object-oriented way, so that the table of the DB is indirectly operated through the operation object. The device implementing ORM should have the function of automatically converting the data format or data structure between object-oriented and relational database. [0004] Methods: As shown below, the class User has methods getName, setName. String name is the parameter list of the method setName. In some computer languages, methods are also called functions. [0005] ...

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 Patents(China)
IPC IPC(8): G06F8/30G06F16/21
CPCG06F8/315
Inventor 蔡廷超其他发明人请求不公开姓名
Owner 蔡廷超
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products