Implement method of data access object mode based on dynamic proxy

A dynamic agent and data access technology, applied in the direction of electrical digital data processing, special data processing applications, instruments, etc., can solve problems such as huge, consuming a lot of energy, and similar codes

Inactive Publication Date: 2006-11-29
LINKAGE SYST INTEGRATION
View PDF1 Cites 22 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Disadvantages of session bean / JDBC: complex implementation
[0032] As mentioned above, most modern enterprise application software needs the support of the database. In order to effectively encapsulate the data persistence process and provide clear access operation logic, the DAO (Data Access Object) mode is often used to shield the complex and variable data inventory during the development process. The DAO model is easy to understand and use, so it is very easy to apply in various projects, but it also has some disadvantages, that is, as the project grows, the number of required DAOs also increases rapidly, but each DAO internal The code is similar but not exactly the same, which results in a high repetition rate of the code. In addition, the DAO pattern requires an interface and an implementation class, so the large number of DAOs and the high repetition rate of the code cause developers to have Spend a lot of energy on DAO writing

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
  • Implement method of data access object mode based on dynamic proxy
  • Implement method of data access object mode based on dynamic proxy
  • Implement method of data access object mode based on dynamic proxy

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0045] The following table reflects the position of the DAO layer in the entire application system and the main internal structure of this implementation technology:

[0046] IDaoFactory

Responsible for generating specific Dao objects according to the Dao interface,

This is an interface

DaoFactory (middle)

Implementation of IDaoFactory

proxy

Dynamic proxy class, provided by the Java class library

ICommand

Responsible for the specific execution of the Dao object call

Operation, which is an interface, ends with Command

All are implementation classes of this interface

FindAllCommand

Execute find all operations specifically

FindByPrimaryKeyCommand

Specifically execute the lookup operation through the primary key

QueryFindCommand

Specifically execute the search operation, the input parameters of this operation

for the IQuery object

FindWithNamedQueryCommand

Spec...

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

A method for realizing data access object mode based on dynamic agent includes applying open source object mapping tool Hibernate to realize DAO, utilizing DAO layer to carry out API interaction of Hibernate to let the other portion of program be separated form direct operation on Hibernate and applying some other scheme to replace off Hibernate for realizing DAO if it is necessary.

Description

technical field [0001] The invention relates to the data persistence layer of modern enterprise application software, especially the realization method of the data access object mode based on the dynamic agent technology. Background technique [0002] Many real enterprise applications require the use of persistent data to some degree. For many applications, persistent storage is implemented using different mechanisms, and the APIs used to access these different persistent storage mechanisms vary widely. [0003] Data is the most important aspect of any computer application. At its core, a computer application enables someone or another computer system to access its data. In an enterprise environment, data must not only be accessible (that is, interfaced with a user interface and managed by a set of business rules), but also persistent. Persistent data storage is data storage that survives server crashes. Persistent data exists outside of the application's active memory, ...

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): G06F17/30G06F9/44
Inventor 吴旻哲黄小新宋海华
Owner LINKAGE SYST INTEGRATION
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products