In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Hibernate API and core interface, I believe that many inexperienced people are at a loss about this. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
The interfaces in Hibernate API can be divided into:
The interfaces in Hibernate API can be divided into:
Java code
1. Provides interfaces for accessing database operations: Session,Transaction, and Query interfaces
two。 The interface used to configure Hibernate: Configruation.
3. Callback interface, using the application to accept events that occur within Hibernate, and make relevant responses: Interceptor,Lifecycle, and Validatable interfaces
4. Used to extend the function Hibernate API:UserType,CompositeUserType
The core interface of Hibernate:
1.Configuration interface: configure Hibernate, start Hibernate, and create SessionFactory objects
2.SessionFactory interface: initializes Hibernate, acts as a proxy for data storage sources, and creates Session objects
3.Seission interface: responsible for saving, updating, deleting, loading and querying objects
4.Transaction: manage things; it is the data transaction interface of hibernate, encapsulating the transaction interface of the layer, and the underlying transaction interface: JDBC API,JTA,CORBA API
5.Query and Criteria interfaces: execute database query objects and control the query process
Callback APIs are divided into two types:
1.Lifecycle and Validatable interfaces: these two ports are implemented by persistence; the Lifecycle interface enables instances of persistent classes to respond to events that are loaded, saved, or deleted; and the Validatable interface enables instances of persistent classes to validate data before being saved
2.Interceptor interface: the Interceptor interface does not need to be implemented by persistent classes. Applications can define classes that specifically implement the Interceptor interface, and Interceptor implementation classes are responsible for loading, saving or deleting instances of persistent classes, and updating events.
Mapping type API of Hibernate: the Type API represents the Hibernate mapping type
The 1.PrimitiveType class maps the java base type
2.DateType: mapping java date types
3.BinaryType: mapping Byte [] type
After reading the above, have you mastered the method of Hibernate API and core interface? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.