Supercharge Your Innovation With Domain-Expert AI Agents!

Spring data JPA dynamic query realization method

A dynamic query and dynamic technology, applied in special data processing applications, instruments, electrical digital data processing, etc., can solve the problems of unsuitable development teams, etc., and achieve the effects of reducing the possibility of development errors, wide application range, and lightening the burden

Inactive Publication Date: 2014-06-18
CERTUS NETWORK TECHNANJING
View PDF4 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

But first of all, this needs to be configured using Xml, and it still needs to write more complex scripts. In addition, the entire programming needs to use the Mybatis architecture, which is not applicable to development teams using hibernate or JPA architecture.

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
  • Spring data JPA dynamic query realization method
  • Spring data JPA dynamic query realization method
  • Spring data JPA dynamic query realization method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0036] In order to describe the technical content of the present invention more clearly, further description will be given below in conjunction with specific embodiments.

[0037] This technology is an extension of Spring data JPA technology, enabling it to dynamically construct query statements according to the characteristics of passed query parameters and returned objects, and dynamically return POJO (plain old java object, simple Java object) object collections.

[0038] This technology is mainly to solve the common page query problem in web development, and expands the framework of Spring data, so that it can dynamically construct query statements according to the query parameters and the characteristics of the returned object, and dynamically encapsulate the queried data into the returned result object. This technology is perfectly integrated into the Spring data framework, and it also only needs to declare the interface method definition without implementing any actual ...

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 a spring data JPA dynamic query realization method, which comprises the following steps that the dynamic query confirming class created on the basis of spring Factory Bean is adopted for judging whether an invoked interface method needs the dynamic query or not; dynamic query sentences are created by adopting a dynamic JPA query class created on the basis of the spring Factory Bean; the dynamic inquiry sentences are sent to a JPA framework by the dynamic JPA query class; the JPA query class converts inquiry results of the JPA framework into the specific type of return objects. When the spring data JPA dynamic query realization method is adopted, the definition declaration only through adopting an interface method can be realized, the realization of any practical coding logics is not needed, when the later page inquiry requirements are changed, only the attribute and annotation increase or modification in the corresponding VO class is needed, the burden of development personnel is greatly reduced, the error generating possibility of the page query development is reduced, the software maintenance performance is enhanced, the productivity of software development is improved, and a wider application range is realized.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to the field of dynamic query, and specifically refers to a method for implementing dynamic query with Spring data JPA. Background technique [0002] Spring data JPA refers to a Spring data persistence architecture, which is Spring (an open source framework created to solve the complexity of enterprise application development) based on ORM (Object / Relation Mapping, object-relational mapping) framework, JPA (Java Persistence API , an enterprise-level standard for accessing Java relational data, JPA describes the mapping relationship between objects and relational tables through JDK5. The application framework is an enterprise-level Java modern data access technology, which perfectly combines the ease of use of Spring and the powerful data access function of JPA. Developers are using Spring data (a tool for simplifying database access , and supports the open source framework of clo...

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
IPC IPC(8): G06F17/30
CPCG06F8/31
Inventor 逯利军钱培专汪金忠林强李克民宋聚平卢天华
Owner CERTUS NETWORK TECHNANJING
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More