the design principles and code analysis of hibernate lazy loading
2013-09-05 10:49
651 查看
as we all know,Hibernate is already one of the most popular ORM frameworks. and its performance is key highlight .when we use ORM framework,there will be a lot of convertions between objects and database tables.if it can be handled well,it will make this
framework extremely cumbersome. hibernate provides many fabulous functionalities .or example lazy loading. an domain object associates collections or another domain object, when initialition ,domain object will default not load collections and object entity.
only when on demands.so it can impove performance.
what are the design principles of lazy loading?
well,proxy pattern is the core principle. for colletion mapping,like set,map ,list etc ,in hibernate codes,there are PersistentSet,PersistentMap,PersistentList classes to implement these interfaces.for associated collection,Hiberate will using CLGIB,JAVAASSIST
create an proxy object to represent collection,it actually not load during the creation of the object,only needs it load them.
framework extremely cumbersome. hibernate provides many fabulous functionalities .or example lazy loading. an domain object associates collections or another domain object, when initialition ,domain object will default not load collections and object entity.
only when on demands.so it can impove performance.
what are the design principles of lazy loading?
well,proxy pattern is the core principle. for colletion mapping,like set,map ,list etc ,in hibernate codes,there are PersistentSet,PersistentMap,PersistentList classes to implement these interfaces.for associated collection,Hiberate will using CLGIB,JAVAASSIST
create an proxy object to represent collection,it actually not load during the creation of the object,only needs it load them.
相关文章推荐
- Introduction to The Design and Analysis of Algorithms (1)
- The Design of Sites: Patterns, Principles, and Processes for Crafting a Customer-Centered Web Experi
- The Design of Sites: Patterns, Principles, and Processes for Crafting a Customer-Centered Web Experience
- A meta-model for the analysis and design of organizations in multi-agent systems
- 微带天线读书(一): Microstrip Antennas: The Analysis and Design of Microstrip Antennas and Arrays
- Design and Model Analysis of the E-Commerce Development Platform for 3-Tiered Web Applications
- The design and analysis of high frequency phased array coils for MRI
- Design and Analysis of Algorithms_Fundamentals of the Analysis of Algorithm Efficiency
- Design and Model Analysis of the E-Commerce Development Platform for 3-Tiered Web Applications
- Bob Tarr: Some Object-Oriented Design Principles(1): Minimize The Accessibility of Classes and Members
- The Design of Sites: Patterns, Principles, and Processes for Crafting a Customer-Centered Web Experi
- C#也能写病毒,源代码分析 the analysis of C# virus source code
- Refecing Improving the Design of Existing Code reading comments(一)
- The Art and Science of Level Design
- Test-Driven C#: Improve the Design and Flexibility of Your Project with Extreme Programming Techniques
- 【原创】The solutional manual of the Verilog HDL: A Guide to Digital Design and Synthesis (2nd)--ch03
- How to collect TrustZone debug logs and check the meaning of error code in the logs
- The principles of service-orientation part 3 of 6: Service abstraction and reuse [by Thomas Erl]
- C#也能写病毒,源代码分析 the analysis of C# virus source code
- Design and Analysis of Algorithms_Introduction