一、Hibernate 概述

1.Hibernate 是一个持久化框架

(1)从狭义的角度来讲,“持久化” 仅仅指把内存中的对象永久的保存到硬盘中的数据库中。

(2)从广义的角度来讲,“持久化” 包括和数据库相关的各种操作。如:CRUD。

2.Hibernate 是一个 ORM 框架

ORM:对象关系映射。O 面向对象:类、对象、属性。R 面向关系:表、行(记录)、列(字段)。M 映射。

ORM 思想:关系数据库中的 行(记录)映射一个对象,程序员可以把对数据库的操作转化为对对象的操作。

在 Hibernate 中,存在 对象关系映射文件用来描述对象与表记录之间的映射关系。

3.Hibernate 配置文件:hibernate.cfg.xml ,配置数据库连接、Hibernate 本身的一些信息、对象关系映射。

4.Entity.hbm.xml 配置文件:对象关系映射文件。

5.Session 接口:Session 是应用程序与数据库之间交互操作的一个单线程对象,是 Hibernate 运作的中心。Session 有一个一级缓存,相当于 JDBC 中的 Connection。

6.SessionFactory 接口:根据配置生成 Session 的工厂。

7.Transaction :事务,可以通过 Session 来开启事务。

二、HelloWorld

(1)在 Intellij Idea 下新建 hibernate.cfg.xml 和根据表创建 实体和 Entity.hbm.xml 文件已经在前一篇文章中讲过了。

(2)生成的 hibernate.cfg.xml 文件。

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- 配置连接数据库的基本信息 -->
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost:3306/hibernate</property> <!-- 配置 Hibernate 的基本信息 -->
<property name="dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
<property name="show_sql">true</property>
<property name="format_sql">true</property>
<!-- 指定自动生成数据表的策略 -->
<property name="hbm2ddl.auto">update</property>
<mapping resource="com/nucsoft/hibernate/News.hbm.xml"/> </session-factory>
</hibernate-configuration>

(2)创建的 news 表。

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEU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q6+DSfV6vGxbgkHAODf7xpHJwx9Ne/YkFckUw5qxifH++vL+HE7XviN2iltM5kynKS4CZPJa8LtCCEmUuw5eaJUZ6byqjXrOw6PxbZv+jyqMn5bXV7QdJbn/U9++aBpy+HZ2rGu7uzOaVqV8449u3W2s+z2c6B8mX5xP/DddbhtMshuPtQEYIs6jWsOv23fbbG7TB+7BXhpkSe4fyE1HBeUG+5/JiLsnF/cPXJ6g7ubZk0DnyAIAG7F0PKak3J5PKvmza8rm4ubjj1PyGmbq+ECcGq0W/Yls3XDur9h+bZhdZredwuxgW/gooq59DVkC+q7O2S8//0/fmVb34hWNzrQUVPMBnZxbUe/Rqcd6W+r5LMAIE9Q3zui02s1o0M9jVJZZ7+qs0UuLvg3QJ5Aruzq6u4d0mg1Q6qe7i5lnTAWOR66CYBX1dndgMnkteB2hBATmQwn6A+BQ4NyFfZ2tmGFmcMaIuwBhJjAcJKDcGhQrsLezjasMHNYQ4Q9gBATGE5yEA4NylXY29mGFWYOa4iwBxBiAsNJDsKhQbkKezvbsMLMYQ0R9gBCTGA4yUE4NChXYW9nG1aYOawhwh5AiIl/FTDwu395lBoODcpV2NvZhhVmDmuIsAcQYuL/AeYNdE0toX4fAAAAAElFTkSuQmCC" alt="" width="750" height="97" />

(3)生成的 News 实体和 News.hbm.xml 文件。

/**
* @author solverpeng
* @create 2016-09-28-19:36
*/
public class News {
private int id;
private String title;
private String author;
private Date date; public int getId() {
return id;
} public void setId(int id) {
this.id = id;
} public String getTitle() {
return title;
} public void setTitle(String title) {
this.title = title;
} public String getAuthor() {
return author;
} public void setAuthor(String author) {
this.author = author;
} public Date getDate() {
return date;
} public void setDate(Date date) {
this.date = date;
} @Override
public boolean equals(Object o) {
if(this == o) {
return true;
}
if(o == null || getClass() != o.getClass()) {
return false;
} News news = (News) o; if(id != news.id) {
return false;
}
if(title != null ? !title.equals(news.title) : news.title != null) {
return false;
}
if(author != null ? !author.equals(news.author) : news.author != null) {
return false;
}
if(date != null ? !date.equals(news.date) : news.date != null) {
return false;
} return true;
} @Override
public int hashCode() {
int result = id;
result = 31 * result + (title != null ? title.hashCode() : 0);
result = 31 * result + (author != null ? author.hashCode() : 0);
result = 31 * result + (date != null ? date.hashCode() : 0);
return result;
}
}

News.java

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping> <class name="com.nucsoft.hibernate.News" table="news" schema="hibernate">
<id name="id">
<column name="id" sql-type="int(11)"/>
</id>
<property name="title">
<column name="title" sql-type="varchar(255)" not-null="true"/>
</property>
<property name="author">
<column name="author" sql-type="varchar(50)" length="50" not-null="true"/>
</property>
<property name="date">
<column name="date" sql-type="date" not-null="true"/>
</property>
</class>
</hibernate-mapping>

News.hbm.xml

(4)测试

  • 获取 SessionFactory 对象
  • 通过 SessionFactory 获取 Session 对象
  • 通过 Session 开启事务
  • 执行数据库操作
  • 提交事务
  • 关闭资源
@Test
public void test() {
// 1.创建 SessionFactory
SessionFactory sessionFactory = null; Configuration configuration = new Configuration().configure(); ServiceRegistry serviceRegistry =
new ServiceRegistryBuilder().applySettings(configuration.getProperties()).buildServiceRegistry(); sessionFactory = configuration.buildSessionFactory(serviceRegistry); // 2.创建 Session
Session session = sessionFactory.openSession(); // 3.开启事务
Transaction transaction = session.beginTransaction(); // 4.执行数据库操作
News news = new News();
news.setTitle("Title");
news.setAuthor("tom");
news.setDate(new Date(new java.util.Date().getTime())); session.save(news);
// 5.提交事务
transaction.commit(); // 6.关闭 Session
session.close(); // 7.关闭 SessionFactory
sessionFactory.close(); }

说明:

①SessionFactory 对象是通过 Configuration 对象来获取的,Configuration 的 configure() 方法会默认取读取类路径下的 hibernate.cfg.xml 文件。

从 hibernate.cfg.xml 中读取的配置会向 ServiceRegistry 中注册,最终生成的 SessionFactory 对象就是根据 hibernate.cfg.xml 配置生成的。

②事务的开启:Session 的 beginTransaction() 方法。

③注意资源的关闭。

④事实上,在容器的环境下,我们不需要去关注 SessionFactory 的获取,资源的关闭。

结果:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAA5gAAAA3CAIAAADmCHJMAAAZkElEQVR4nO2daVfaWhfH7+c5vLBr0S710FYRXY6oda5lqXXWqjjVsbVVq4hjBREpihimAAkyHFqr8Vm9976/n+l5gUPUgFGhFdi/xYuW5CRk7+0+/+zsJH/J7ktmZua9xwLiATunEuBNIBFAXAEAkLb8de+RkDp/D2DnVAK8CSQCiCsAANIWELKPHbBzKgHeBBIBxBUAAGkLCNnHDtg5lQBvAokA4goAgLQFhOxjB+ycSoA3gUQAcQUAQNoSNyFrFM217WBcMWj5yRLOttxRgLHgvnBB+xLDsYQZfyW8QgoTLzsLIsb4MpmsUx9mybFprOqhB5P2JNSbD6dTH2bJiXkcHJ1kJDZL/KH0i5V98yaHQduvjJ6a/hRFnStb+7TZSi32KAVXwLi0fenAdEDvGL+oCvBDRolHjKf462CsbNdYd8yb7ypz77ovAHg8xFPIKnnw/3vt39e2g3Fx2wpDB0Jb4/VyELI3iJedZTIZziltVH9Z1E7UK87MeNP4N9eRgZCNH3H05gOJ7mgQsslHQuPqrulXMLTuCs6pUu98Z0PsXEvhvTeSOJSjDg/hfOFThpqtyRE4zJzaT+Yg5wufsr69nhL8kFHiuauQlclkeSqtJcR5dqerhX4PACQFf74iKwYQshc8xM64csoc4lh2u60wepoTWgeEbLx4PBXZ6I4GIZt8PKqKrJg8cytFPTtOwtk2ugsfXzlWdi5JmRDHEv+Xt4prSzFWNC35GcIxhLspZO86Sjz3ELIYFzYv+xkS1qkr7ro7AHgkxE3Itra2Knh0dnaWlJTEq7YEQvYC40MqsiBk/zSPqCILQjaFeFwV2QcLWZxTN06dsEF6rOaRXvKOSFKXPcAQjt4aKL6qtnGJesPHsX6GCgoI2buOEs89hKxMJsOVE8YAxzgWG+RpN70CqUF8hGxrDT5ae/6PLjPy+b6c9XGwVqFQiEmdGBc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qHVrmIxBL7uNCz8q6Fb3qjeWPLvLGzpxl78wKSFQCkAfEUskCCAFOnEuBNIBFAXAEAkJ6AkE0CwNSpBHgTSAQQVwAApCcgZJMAMHUqAd4EEgHEFQAA6QkI2SQATJ1KgDeBRABxBQBAegJCNgkAU6cS4E0gEUBcAQCQnvyV+QD+9I9PF8DUqQR4E0gEEFcAAKQn/wfNYcJCDMgKngAAAABJRU5ErkJggg==" alt="" width="750" height="47" />

三、总结

从第一部分 Hibernate 概述中,确定了学习 Hibernate,要从以下几个方面来学习:Hibernate的配置文件,对象关系映射文件(主要内容是关联关系),Session API 以及缓存,事务控制。

从第二部分 Helloworld 中,体验了 Hibernate的 便捷,关于配置的添加,上篇文章已经说过,在以后的文章中详细介绍具体配置。

Hibernate —— 概述与 HelloWorld的更多相关文章

  1. hibernate 02之helloworld

    1.安装插件 安装方法说明(hibernatetools-.Final): Help --> Install New Software... Click Add... In dialog Add ...

  2. Hibernate学习笔记(一)—— Hibernate概述及入门

    一.Hibernatea概述 1.1 什么是Hibernate? 在介绍什么是Hibernate之前,我们先讨论一下什么是框架?框架是用来提高开发效率的,框架封装好了一些功能,我们需要使用这些功能时, ...

  3. hibernate概述

    转自:http://www.cnblogs.com/eflylab/archive/2007/01/09/615338.html Hibernate的核心组件在基于MVC设计模式的JAVA WEB应用 ...

  4. Hibernate入门1 - Hibernate概述及第一个小例子

    一.什么是ORM? ORM,即Object Relational Mapping.我们知道,利用面向对象的思想编写的数据库应用程序最终都是把对象信息保存在关系型数据库中,于是需要编写与底层数据库相关的 ...

  5. 5 -- Hibernate的基本用法 --1 4 Hibernate概述

    Hibernate 不仅仅管理Java类到数据库的映射(包括Java数据类型到SQL数据类型的映射),还提供数据查询和获取数据的方法,可以大幅度减少开发时人工使用SQL和JDBC处理数据的时间.

  6. ORM与hibernate概述

    JDBC是什么? JDBC代表java数据库连接,并提供一组java API,用于java成许访问关系数据库.这些Java的API允许Java程序执行SQL语句,并与任何SQL兼容的数据库进行交互. ...

  7. Hibernate 3.0 HelloWorld

    说明 基于Hibernate 3.0,Mysql5.0,java jdk 1.7,运行需要的lib 库,从http://files.cnblogs.com/HCCZX/Hibernate_Lib.ra ...

  8. 小峰Hibernate简介与HelloWorld

    一.Hibernate简介: 二.Hibernate4 版Hello World 实现 工程结构: com.cy.model.Student: package com.cy.model; public ...

  9. 【Hibernate一】概述及入门

    Hibernate学习框架: 1.基本部分      crud的操作      主键的生成机制      类型      持久化类      映射文件 *.hbm.xml      配置文件 hibe ...

随机推荐

  1. 浅析MSIL中间语言——基础篇

    一.开篇 研究MSIL纯属于个人喜好,说在前面MSIL应用于开发的地方很少,但是很大程度上能够帮着我们理解底层的原理,这是我了解MSIL的主要原因.托管代码表示应用程序的方法的功能,它们以微软的中间语 ...

  2. TDR测试原理

    什么是TDR? TDR是英文Time Domain Reflectometry 的缩写,中文名叫时域反射计,是测量传输线特性阻抗的主要工具.TDR主要由三部分构成:快沿信号发生器,采样示波器和探头系统 ...

  3. 循序渐进,了解Hive是什么!

    一直想抽个时间整理下最近的所学,断断续续接触hive也有半个多月了,大体上了解了很多Hive相关的知识.那么,一般对陌生事物的认知都会经历下面几个阶段: 为什么会出现?解决了什么问题? 如何搭建?如何 ...

  4. CefSharp初识--把网页移到桌面

    在开发中我们可曾有过这样的需求,将某个网页嵌入到.Net应用中来,但Winform自带的web browser不怎么理想.CefSharp可以让我们在.Net应用中嵌入一个Chromium.它提供了W ...

  5. 初学者--bootstrap(三)下载与安装----在路上(7)

    ----------------------------------------对于学习与工作者来说用压缩版,若是研究框架则用源代码---------------------------------- ...

  6. iOS-即时通讯-环信

    下载地址:http://www.easemob.com/downloads SDK目录讲解 1.从官网下载下来的包分为如下四部分: 环信iOS SDK 开发使用 环信iOS release note ...

  7. EditText的小细节

    EditText获取焦点时,右边图片的改变例如: <item android:state_window_focused="false" android:drawable=&q ...

  8. SSISDB7:查看当前正在运行的Package

    在项目组中做ETL开发时,经常会被问到:“现在ETL跑到哪一个Package了?” 为了缩短ETL运行的时间,在ETL的设计上,经常会使用并发执行模式:Task 并发执行,Package并发执行.对于 ...

  9. SSIS Design1: 源数据提取

    数据量的大小由两个方面决定:行的宽度和数据行的数量,为了减少ETL运行的时间,可以从源数据的提取上做优化,从数据源的输入上控制数据的质量和大小,减少转换和IO. 一,减少行的宽度 1,只加载需要的数据 ...

  10. Markdown编辑器入门

    欢迎使用博客园的Markdown编辑器 前言 今天早上起来在Ubuntu下操作,所以不能使用Windows Live Writer.所以就直接使用博客园的后台编辑器,开始以为博客园出错了,怎么编辑都没 ...