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 that take a lot of time, reduce development efficiency, etc., and achieve the effect of facilitating code transplantation, improving operating efficiency, and reducing memory resources

Active Publication Date: 2018-11-20
蔡廷超 +1
View PDF4 Cites 2 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
  • ORM design method and device
  • ORM design method and device
  • ORM design method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0040] The specific embodiment of the present invention provides an ORM design method and device.

[0041] The embodiments described below in conjunction with the accompanying drawings (when referring to specific language descriptions, Java language descriptions) are only one implementation of the present invention, and should not be construed as limitations on the present invention.

[0042] Treat the entity type corresponding to any DB table as an abstract type without distinction, such as figure 1 shown. In the method parameter list, the entity type parameters use generics and the return value type uses generics (such as figure 1 shown in 11), or the entity type parameters in the method parameter list use generics (such as figure 1 shown in 12); the method is applied in the interface (such as figure 1 13) or in the 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 im...

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 a device. The main design idea is listed as follows: 1) the entity type corresponding to any DB table is regarded as an abstract type without distinction and the generic type is used as the entity parameter type passed in by the object-oriented interface method; 2) the generic entity parameter type passed in the suid method is converted into the corresponding sql statement; 3) and the query result is automatically assembled into the corresponding entity type structure result according to the pass-in entity type structure and the reflection mechanism. The device at least comprises an object-oriented mode suid interface module, an object-to-sql-statement module, a bottom interface operation DB, an automatic assembly return result module and a context module. Developers only need to use the interface in the object-oriented suid interface module. According to the device, the coding complexity C (n) is O (l). The DB is operated by using the unified dao, and the developers do not need to write any specific dao implementations even if the JavaBean for the DB operation needs to be increased.

Description

technical field [0001] The present invention relates to the field of computer technology and software technology, in particular to a method and device for realizing object-relational mapping (ORM). Background technique [0002] Explanation of term or abbreviation: [0003] ORM: Object Relational Mapping. ORM is the mapping between the concept of objects in object-oriented programming and the concept of tables in relational databases; thus, the direct operation of the database is changed to an object-oriented method, so as to indirectly operate the tables of the DB through the operation objects. The device for realizing ORM should have the function of automatically converting data format or data structure between objects and relational databases. [0004] Methods: As shown below, class User has methods getName, setName. String name is the parameter list of the method setName. Some computer languages ​​also call methods functions. [0005] [0006] DB: database, the da...

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/30G06F17/30
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