Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Dao code generation method and computer terminal

A computer terminal and code generation technology, applied in the field of Java development, can solve problems such as low work efficiency of developers, increased code compilation failure, and non-standard code, so as to improve standardization and uniformity, avoid duplication of work, and increase success rate Effect

Inactive Publication Date: 2019-03-19
BEIJING QDING INTERCONNECTION TECHNOLOGY CO LTD
View PDF8 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

If there are 10 tables in the database of a project, then according to the three-tier structure of the Java development framework, at least 50 classes need to be written, and each class has different methods. In another project, it is also necessary to write the same function Multiple classes and methods cause developers to repeatedly write code with the same function in different projects, resulting in low work efficiency for developers; and due to the different programming styles of different developers, the code developed by the same project is not standardized , not uniform, increasing the probability of code compilation failure

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
  • Dao code generation method and computer terminal
  • Dao code generation method and computer terminal
  • Dao code generation method and computer terminal

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0059] like figure 1 As shown in FIG. 2 , it is a schematic structural diagram of the interaction between a Java development framework and a database provided by an embodiment of the present invention. The Java development framework 10 is divided into a presentation layer 11, a business logic layer 12, a data access layer 13 and a Mybatis SQL layer.

[0060] The presentation layer 11 shown is generally used to process and control data requests and page jumps.

[0061] Described business logic layer 12 is used for generating Service code, and described Service code comprises business interface class (such as IXX Service class, and wherein, XX can be the title of different business) and business service class (such as XX Service class, and wherein, XX can be for different business names). Both the business interface class and the business service class may include a get function, a getList function, an add function, an addSelective function, an update function, an updateSelect...

Embodiment 2

[0239] Figure 12 A schematic structural diagram of a Dao code generation device provided by an embodiment of the present invention is shown. The Dao code generating device 100 is applied in a Java development framework.

[0240] The code generation device 100 includes a conversion module 110 , an acquisition module 120 , a judgment module 130 and a generation module 140 .

[0241] The conversion module 110 is used to obtain the summary information of the table in the database and the field information of each field in the table, and convert the summary information and the field information into the entity information of the Java specification, wherein the entity information includes The variable of the Bean object and the method name of the Bean object.

[0242] The acquiring module 120 is configured to acquire the current session control information of the database.

[0243] A judging module 130, configured to judge whether there is an operation of a predetermined method ...

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 discloses a Dao code generation method and a computer terminal, and the method comprises the steps: obtaining summary information of a table in a database and field information of each field in the table, and converting the summary information and the field information into entity information of a Java standard; acquiring current session control information of the database; and judging whether the session control information has the operation of a predetermined method, and if the session control information has the operation of the predetermined method, generating a correspondingDao code according to the SQL code of the predetermined method, the variable of the Bean object and the method name of the Bean object. Technical scheme of the invention, According to the method, thetable summary information and the field information of each field are converted into the entity information corresponding to the Java standard, and the Dao type common codes are generated according to the entity information, so that the development work efficiency is improved, repeated work of compiling the same codes in each project by developers is avoided, and the work efficiency of the developers and the uniformity of the codes are improved.

Description

technical field [0001] The invention relates to the technical field of Java development, in particular to a Dao code generation method and a computer terminal. Background technique [0002] With the rapid development of the IT (Internet Technology, Internet Technology) industry, the work of developers is becoming more and more important, and writing codes takes up most of the time of developers. [0003] Among the existing computer programming languages, the Java language, as a representative of static object-oriented programming languages, perfectly implements the object-oriented theory, allowing programmers to perform complex programming in an elegant way of thinking, and is widely used. [0004] In the existing Java development framework, it usually includes the presentation layer, business logic layer and data access layer. If a project uses the Mybatis plug-in, developers need to write both SQL code and Java code when operating a table. Code, in the three-tier structur...

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/315
Inventor 彭敏
Owner BEIJING QDING INTERCONNECTION TECHNOLOGY CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products