Hibernate Search牛刀小试
Hibernate Search牛刀小试
前几天看到Hibernate与Lucene的整合框架Hiberate Search3.0.0.GA版出来了,昨天试这写了一个Demo,感觉用起来的确很方便的,贴出来与大家分享一下。 1、创建POJO packagecom.yehui; importjavax.persistence.CascadeType; importjavax.persistence.Column; importjavax.persistence.Entity; importjavax.persistence.GeneratedValue; importjavax.persistence.GenerationType; importjavax.persistence.Id; importjavax.persistence.JoinColumn; importjavax.persistence.ManyToOne; importjavax.persistence.Table;


importorg.hibernate.search.annotations.DocumentId; importorg.hibernate.search.annotations.Field;
importorg.hibernate.search.annotations.Index;
importorg.hibernate.search.annotations.Indexed;
importorg.hibernate.search.annotations.IndexedEmbedded;
importorg.hibernate.search.annotations.Store;
/**
* Employee generated by MyEclipse Persistence Tools
*/
@Entity
@Table(name = "employee", catalog = "hise", uniqueConstraints = {})
@Indexed(index = "indexes/employee")
publicclass Employee implementsjava.io.Serializable{
privatestaticfinallongserialVersionUID = 7794235365739814541L;
private Integer empId;
private String empName;
private Department dept;
private String empNo;
private Double empSalary;
// Constructors
/** default constructor */
public Employee() {
Hibernate Search 是 Hibernate 的子项目,把数据库全文检索能力引入到项目中,并...Hibernate培训教程 75页 1下载券 喜欢此文档的还喜欢 Hibernate Search牛刀小.....
使用:提供对领域模型的全文检索对数据库中的数据进行检索,是hibernate对著名的...Hibernate Search牛刀小... 10页 免费 基于Hibernate搜索的数据... 3页 1下载...
JPA和Hibernate比较 2页 免费 JPA和Hibernate的关系 2页 1下载券 JPA批注 60页 免费 Hibernate_4_JPA 8页 1下载券 Hibernate注解+JPA 22页 1下载券 JPA+批注...
作者:想飞的马 Hibernate Search 使用入门 http://mayabin.javaeye.com, http://blog.csdn.net/mayabin 转载请注明出处 介绍一下在使用 H Search 时,都需要做...
Getting Started with Hibernate Search_计算机软件及应用_IT/计算机_专业资料。Hibernate Search入门教程#32 Get More Refcardz! Visit refcardz.com Brought to you ...
本文针对现有数据库全文检索服务的不足,通过采用 Hibernate Search 等技术设计了一个能较好支持中文的、易于 扩展的数据库全文检索系统。 概述 数据库与全文检索系统...
如何做牛刀小试 2页 免费 牛刀小试1 1页 1财富值 第一章 牛刀小试 41页 免费...牛刀小试真题四级试练 83页 20财富值 Hibernate Search牛刀小试 10页 免费 牛...
hibernate如何实现ORM 2页 免费 ORM底层实现机制 2页 免费 Groovy简单语法开发 ...[原创]牛刀小试——用 Groovy 实现最简单的 ORM(2006.9.25 更新) 潜水那么久...
resource="Search/Clob_Blob/TestCB.hbm.xml" /> session-factory> hibernate-configuration> POJO: package Search.Clob_Blob; import java.sql.Blob; import ...
2. Criteria 牛刀小试 Criteria 是一个完全面向对象,可扩展的条件查询 API ,通过它完全不需要考虑数据 库底层如何实现、SQL 语句如何编写, 是 Hibernate 框架的...
热门文档