Java Value Object Conversion Using Selective Field Processing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional systems incur high conversion costs and performance degradation when processing large data sets, such as in financial batch systems, due to unnecessary encoding and decoding of unused data fields, and require extensive development for efficient data mapping between file formats and Java VO.
Innovation Solution
An apparatus and method that decode only used data when generating a Java VO from a file and encode only modified data when storing it, using an object generating unit, object processing unit, and metadata providing unit to process data in specific units, reducing the need for additional layout information and mapper class development.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If conventional systems encode and decode all data fields when converting Java VO to file format or vice versa, then complete data conversion is achieved, but unnecessary operation costs are incurred for unused fields and system processing performance is degraded
Solution Approach 1:
The patent extracts only the necessary data fields that are actually used in work logic from the complete data set. The system identifies and processes only those specific fields required for the current operation, leaving unused fields untouched. This extraction approach eliminates unnecessary encoding and decoding operations for irrelevant data, directly reducing conversion costs and improving processing performance.
Solution Approach 2:
Instead of performing complete encoding and decoding on all data fields, the system applies partial action by processing only the specific portions of data that are necessary for the current work logic. This selective processing approach avoids the excessive action of converting entire data sets when only a subset is needed, thereby reducing operational overhead and enhancing system productivity.
2Adaptability or versatility
If a general reflection mapper is used to convert data between file format and Java VO, then versatility in processing various Java VOs is achieved, but conversion speed is slow due to reflection overhead
Solution Approach 1:
The system performs preliminary action by pre-configuring mapping relationships between file format fields and Java VO fields. Instead of using reflection to dynamically resolve mappings during conversion, the mappings are established in advance, allowing the system to directly access and convert data without the overhead of runtime reflection operations, thereby significantly improving conversion speed while maintaining versatility.
3Speed
If a custom mapper is used to explicitly call getter and setter methods for each Java VO, then conversion speed is improved, but development work is increased due to requiring exclusive mapper class for each Java VO
Solution Approach 1:
The patent implements a universal mapper class that can handle multiple different Java VO types through a standardized interface and configuration mechanism. Instead of requiring a separate custom mapper class for each Java VO, the universal mapper uses pre-defined mapping relationships and generic processing logic to adapt to various VO structures. This approach maintains the speed benefits of explicit method calling while eliminating the need for extensive development work for each new VO type.
Data Source
AI summary
An apparatus and a method for converting a value object (VO) are disclosed. An object generating unit reads out data recorded in an input file in specific units, and generates the VO corresponding to the specific units. An object processing unit includes a byte array storing a column value included in the specific units and an object array storing a field value of the VO, and processes provision and change of the column value. A metadata providing unit provides metadata including a size and a data type of each column included in the specific units for the object processing unit. According to the present invention, when generating the VO from data stored with different data formats, and when converting the VO into the different type of data formats, conversion costs are minimized and data processing performance is improved.


