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

Method and sever for accessing attribute value from Java object, and storage medium

A technology of attribute values ​​and objects, applied in the field of application programs, can solve problems such as poor efficiency and poor performance, and achieve the effect of improving efficiency and avoiding performance bottlenecks

Active Publication Date: 2018-03-06
CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF3 Cites 11 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, due to the use of synchronization locks and java common reflection Method.invoke in the open source tool OGNL to call the get and set methods of the field, the performance is poor under high concurrency
[0007] The second is the open source tool Mvel (a powerful expression language based on Java applications): the performance is better than that of the open source tool OGNL, but because the bottom layer still uses java ordinary reflection Method.invoke to call the get / set method of the field, which is better than calling directly The efficiency of get / set is about 10 times worse

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 sever for accessing attribute value from Java object, and storage medium
  • Method and sever for accessing attribute value from Java object, and storage medium
  • Method and sever for accessing attribute value from Java object, and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0051] In view of the low efficiency of existing expressions from DTO (Data Transfer Objects) to store / get attribute values, the object of the present invention is to provide a method, server and storage medium for accessing attribute values ​​from Java objects. The configuration file configures the attribute correspondence of all fields of the two DTOs. For each pair of fields, first obtain the attribute value of one DTO, then convert it to the data type of another DTO, and then set it to the attribute of another DTO, which improves the The efficiency of storing / retrieving attribute values ​​from DTO avoids performance bottlenecks under high concurrency.

[0052] In order to make the object, technical solution and effect of the present invention more clear and definite, the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described here are only used to e...

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 server for accessing an attribute value from a Java object, and a storage medium. The method for accessing the attribute value from the Java object comprises thefollowing steps that: in a configuration file, configuring attribute corresponding relationships of all fields in a first data transmission object and a second data transmission object; for each pairof attribute corresponding relationships, through a reflection kit, obtaining the attribute value of the first data transmission object; calling the value method of an open source tool, obtaining a reference attribute value, comparing the reference attribute value with the attribute value of the first data transmission object, and outputting a comparison result; and when the comparison result isthe same, converting the attribute value of the first data transmission object into the data type of the second data transmission object, and setting in the attribute of the second data transmission object. By use of the method, attribute value accessing efficiency in the data transmission object is improved, and a performance bottleneck under high concurrence is avoided.

Description

technical field [0001] The invention relates to the technical field of application programs, in particular to a method for accessing attribute values ​​from Java objects, a server and a storage medium. Background technique [0002] In Java (an object-oriented programming language) program, it is often necessary to use expressions to store / retrieve property values ​​from a DTO (Data Transfer Object). For example, there is a UserDTO with a name attribute field (other fields are omitted), and each field has a corresponding get / set method for storing / retrieving values ​​(this is the prior art). [0003] Scenario 1: Configure the verification rule "UserDTO.name=length:20" in the configuration file. Before verification, the expression "UserDTO.name" needs to be identified, and the value of the name attribute is obtained from the UserDTO object. If the object has a multi-level structure, the expression also has multiple levels, such as "UserDTO.name.firstName". [0004] Scenario ...

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): G06F8/20
Inventor 张小松毛才斐李小培
Owner CHINA PING AN PROPERTY INSURANCE 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