26--34hibernate核心开发接口介绍(重点)

026_CoreAPI_Configuration_SessionFactory_GetCurrentSession_OpenSession  27:58

027_CoreAPI_JTA简介   10:24

028_CoreAPI_对象三种状态 25:16

029_CoreAPI_Delete 06:19

030_CoreAPI_Get_Load 12:21

031_CoreAPI_Get_Load_2 06:41

032_CoreAPI_Update 32:14

033_CoreAPI_saveOrUpdate_Clear_Flush  16:39

034_CoreAPI_SchemaExport_and_总结  09:18

本章内容

核心开发接口介绍

1.hibernate_0500_CoreAPI

2.hibernateAPI文档需要单独下载

3.Configuration

 a)AnnotationConfiguration

 b)进行配置信息的管理

 c)用来产生SessionFactory()

 d)可以在configure方法中指定hibernate配置文件

 e)只需关注一个方法即:buildSessionFactory()

4.schemaExport

 a)

5.SessionFactory()

 a)用来产生和管理Session

 b)通常情况下每个应用只需要一个SessionFactor

 c)除非要访问多个数据库的情况

 d)关注两个方法即:

     openSession  和  getCurrentSession

6.Session

 a)管理一个数据库的任务单元

 b)方法(CRUD)

    i.  save()

    ii. delete

    iii.update

猜你喜欢

转载自yuzhouxiner.iteye.com/blog/2268414