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

Method and device for performing data manipulation in Java application

A Java application and data manipulation technology, applied in the computer field, can solve problems such as low development efficiency, low stability, and error-prone, and achieve the effect of improving efficiency and accuracy

Inactive Publication Date: 2012-07-11
PEKING UNIV FOUNDER GRP CO LTD +1
View PDF2 Cites 11 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] Although the separation of business logic and data logic can be achieved through the DAO mode, a better balance can be achieved in terms of complexity and structural clarity. Usually, an object corresponds to a table in the database, and multiple attributes in the object correspond to the table. Multiple fields, in the actual development process of the DAO mode, it is necessary to manually convert the tables in the database into the objects of the DAO mode. If you need to process multiple tables in the database, you need to convert multiple tables into corresponding objects , so that the development efficiency is low, and because the table in the data block is manually converted to the object of the DAO mode, the stability is not high and error-prone

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
  • Method and device for performing data manipulation in Java application
  • Method and device for performing data manipulation in Java application
  • Method and device for performing data manipulation in Java application

Examples

Experimental program
Comparison scheme
Effect test

example 1

[0033] Example 1, the naming rules of the domain object class are set as follows: as shown in Table 1, the name of the domain object class is consistent with the name of the corresponding table, and the first letter is capitalized, the following letters are lowercase, and there is an underscore in the name of the table , remove the underscore from the name of the corresponding domain object class, capitalize the first letter after the underscore, and lowercase the following letter.

[0034] Table 1

[0035] table name

[0036] APPUSER, appuser

example 2

[0037] Example 2, when mapping the fields contained in the structure information of the table to the private data of the domain object class, the naming rules used are set as follows: Refer to Table 2, the private data name of the domain object class and the field name in the table structure information Consistent, and all letters are lowercase. When there is an underscore in the field name, when converting to the private data name of the domain object class, the underscore will be removed from the corresponding private data name, and the first letter after the underscore is capitalized, and the subsequent letters lower case.

[0038] Table 2

[0039] field names in the table

example 3

[0040] Example 3, the data type mapping rule of the domain object class is set as follows: In Java applications, the data type of a certain field of the table can be obtained through the getColumnType function in the overall comprehensive information object, and whether a certain field of the table is known through the isNullable function For null values, the data type mapping rules are determined according to the data type of the field and whether the field is null, as shown in Table 3 for details. When mapping the structure of the table as a private data member of the domain object class, it can be mapped according to the rules in Table 3.

[0041] table 3

[0042]

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 method and a device for performing data manipulation in Java application, wherein the method and the device are used for mapping a data table into a source code form and improving the efficiency and the accuracy of object-relational mapping. The method comprises the following steps of: obtaining structure information of at least one table from a database; mapping the structure information of the at least one table into a domain object class file and a data access class file; while receiving a data manipulation instruction, performing data manipulation on the domain object class file based on a function in the data access class file. The method can map the data table into source codes, and can improve the efficiency and the accuracy of the object-relational mapping. And the invention also discloses a device for performing data manipulation in Java application.

Description

technical field [0001] The invention relates to the field of computers, in particular to a method and device for performing data operations in Java applications. Background technique [0002] In the process of Java-based project development, it is necessary to frequently add, delete, modify, and query operations on the database. When using Java Database Connectivity (JDBC) to connect to the database, developers are faced with primitive collection of data. In the process of business logic development, developers need to obtain the required data from the database according to the structure information of related tables in the database known in advance, which increases the workload of the developers and reduces the development efficiency. [0003] In order to solve this problem, object-relational mapping is required. The so-called object-relational mapping is to map the data in the database into objects, which introduces the data access object (Data Access Object, DAO) mode. D...

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): G06F9/44G06F17/30
Inventor 崔杰
Owner PEKING UNIV FOUNDER GRP 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