Supercharge Your Innovation With Domain-Expert AI Agents!

Java EJB (Enterprise Java Bean) platform based entity BEAN general query method

A general query and entity technology, applied in special data processing applications, program control design, instruments, etc., can solve the problem of error-prone HQL statements, and achieve the effect of simplifying queries and avoiding errors.

Active Publication Date: 2017-03-22
中科瑞通科技股份有限公司
View PDF4 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The technical problem that the present invention solves is to provide a kind of entity BEAN general query method based on EJB platform; Solve the problem that the programmer writes HQL statement and makes mistakes easily when solving data multi-condition complex query

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
  • Java EJB (Enterprise Java Bean) platform based entity BEAN general query method
  • Java EJB (Enterprise Java Bean) platform based entity BEAN general query method
  • Java EJB (Enterprise Java Bean) platform based entity BEAN general query method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] As shown in Figure 1, the present invention adopts the following steps

[0021] Step 1. Create an entity object query result dataset class DataSet, which is used to encapsulate the queried data; for example:

[0022]

[0023]

[0024] Step 2. Create a query condition class QueryCondition, which mainly encapsulates field names, parameter types, operators, parameter values ​​and sub-query conditions; for example:

[0025]

[0026]

[0027] Step 3. Create the query condition setting class QueryConditionSetting, which defines some constants, such as: equal to, greater than, greater than or equal to, etc., and the QueryCondition collection, and provides the method of adding and query condition addAndQueryCondition, or query condition method addORQueryCondition, to obtain the query condition method getQueryConditions, etc.; such as:

[0028]

[0029]

[0030]

[0031]

[0032] Step 4. Add the sorting class OrderColumn...

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 the technical field of Java EJB platforms, and in particular relates to an EJB (Enterprise Java Bean) platform based entity BEAN general query method. The method is characterized in that keywords, such as WHERE, AND, OR, ORDER BY, LEFT JOIN, and other related statements, which are generally used in in HQL (Hibernate Query Language) statement, are encapsulated while multi-condition complex query is carried out through EntityManager of the EJB, so that the purposes of simplifying the query, and avoiding mistake of a programmer in writing of the HQL statement. The method is applied to multi-condition complex query using the EntityManager on the basis of the Java EJB platform.

Description

technical field [0001] The invention relates to the technical field of the Java EJB platform, in particular to an entity BEAN general query method based on the EJB platform. Background technique [0002] When using the EntityManager class to perform multi-condition complex queries under the Java EJB platform, it is easy to cause code errors. For this reason, a method is needed to effectively solve this problem. Contents of the invention [0003] The technical problem solved by the invention is to provide a general query method of entity BEAN based on the EJB platform; to solve the problem that programmers are prone to make mistakes when writing HQL statements when data is multi-condition and complex query. [0004] The technical scheme that the present invention solves the problems of the technologies described above is: [0005] Contains the following steps: [0006] Step 1. Create an entity object query result dataset class DataSet, and encapsulate the queried data; ...

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/45G06F17/30
CPCG06F8/31G06F16/2433
Inventor 陈林季统凯
Owner 中科瑞通科技股份有限公司
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