In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "Hibernate API example Analysis". In the operation of actual cases, many people will encounter such a dilemma. Then let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Java code
The interfaces in Hibernate API can be divided into: STRONG >
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. The port used to extend the function of Hibernate: 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
This is the end of the content of "Hibernate API example Analysis". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.