hibernateBook
简介
日志
前言
参与
系统需求
入门指南
1. 体系结构
1.1. 体系结构概述
2. 域模型
2.1. 类型映射
2.1.1. 值类型
2.1.2. 实体类型
2.2. 命名策略
2.2.1. 隐式命名策略
2.2.2. 显示命名策略
2.3. 基础类型
2.3.1. Hibernate的基础类型
2.3.2. @Basic注解
2.3.4. BasicTypeRegistry
2.3.3. @Column注解
2.3.5. 显示的基础类型
2.3.6. 自定义基础类型
2.3.7. 枚举类型映射
2.3.8. LOBs类型映射
2.3.9. Nationalized、Character和Data类型映射
2.3.10. UUID类型映射
2.3.11. UUID类型映射成binary类型
2.3.12. UUID类型映射成(var)char类型
2.3.13. PostgeSQL特定的UUID
2.3.14. UUID作为标识码
2.3.15. Date\/Time映射
2.3.16. JPA 2.1 属性转换
2.3.17. SQL中引号包围的标识符
2.3.18. 数据库生成属性
2.3.19. 列变换器:读取和写入表达式
2.3.20. @Formula注解
2.3.21. @Where注解
2.3.22. @Filter注解
2.3.23. @Any 注解
2.4. 嵌入类型
2.4.1. 组件类型
2.4.2. 多个可嵌入类型
2.4.3. 重载JPA属性
2.4.4. 隐式命名策略
2.4.5. 嵌入类型集合
2.4.6. 嵌入类型主键
2.4.7. 嵌入类型标识
2.5. 实体类型
2.5.1. POJO 模型
2.5.2. 非终极类
2.5.3. 实现没有参数的构造方法
2.5.4. 为持久化属性声明gettter和setter方法
2.5.5. 提供标识属性
2.5.6. 实体映射
2.5.7. 实现equals() and hashCode()
2.5.8. 映射乐观锁
2.5.9. 访问策略
2.6. 主键标识
2.6.1. 简单主键
2.6.2. 组合主键
2.6.3. 带@EmbeddedId注解的组合主键
2.6.4. 带@IdClass注解的组合主键
2.6.5. 带关联关系的组合主键
2.6.6. 动态生成主键
2.6.7. 自动生成主键
2.6.8. 使用序列
2.6.9. 使用标识列
2.6.10. 使用标识表
2.6.11. 使用UUID 生成
2.6.12. 使用 @GenericGenerator生成
2.6.13. 优化
2.6.14. 派生标识
2.7. 关联关系
2.7.1. 多对一
2.7.2. 一对多
2.7.3. 一对一
2.7.4. 多对多
2.8. 集合
2.8.1. 集合作为值类型
2.8.2. 值类型集合
2.8.3. 实体类型集合
2.8.4. Bags集合
2.8.5. Ordered Lists类型
2.8.6. Sets 类型
2.8.7. Sorted sets类型
2.8.8. Maps 类型
2.8.9. Arrays类型
2.8.10. Arrays 映射为 binary类型
2.8.11. Collections映射为基本类型
2.8.12. 自定义集合类型
2.9. 自然标识
2.9.1. 自然标识映射
2.9.2. 自然标识API
2.9.3. 自然标识的可变性和缓存
2.10. 动态实体类型
2.10.1. 动态模型映射
2.11. 继承关系
2.11.1. MappedSuperclass
2.11.2. 简单表
2.11.3. 连接表
2.11.4. Tableperclass
2.12. 不变性
2.12.1. 实体不变性
2.12.2. 集合不变性
3. 引导介绍
3.1. JPA 引导
3.1.1. JPA_compliant 引导
3.1.2. 外部化XML映射文件
3.2. 本身引导
3.2.1. 构建 ServiceRegistry对象
3.2.2. 注册事件监听器
3.2.3. 构建元数据
3.2.4. 构建 SessionFactory
4. 模式生成
4.1. 导入脚本文件
4.2. 数据库对象
4.3. 数据库级别检查
4.4. 数据库列的默认值
5. 持久化对象
5.1. 从JPA中获取Hibernate APIs
5.2. 字节码增强
5.2.1. 性能增强
5.2.2. 执行能力增强
5.3. 持久化对象
5.4. 删除对象
5.5. 获取不初始化的实体引用
5.6. 获取初始化的实体引用
5.7. 通过自然标识获取实体
5.8. 修改持久化状态
5.9. 刷新实体状态
5.9.1. 刷新陷阱
5.10. 使用脱管数据
5.10.1. 重新附加脱管数据
5.10.2. 合并脱管数据
5.11. 检查持久化状态
5.12. 清除实体对象
6. 刷新
6.1. 自动刷新
6.1.1. AUTO flush on commit
6.1.2. AUTO flush on JPQL\/HQL query
6.1.3. AUTO flush on native SQL query
6.2. COMMIT flush
6.3. ALWAYS flush
6.4. MANUAL flush
6.5. Flush operation order
7. 数据库访问
7.1. ConnectionProvider
7.2. Using DataSources
7.3. Using c3p0
7.4. Using Proxool
7.5. Using existing Proxool pools
7.6. Configuring Proxool via XML
7.7. Configuring Proxool via Properties
7.8. Using Hikari
7.9. Using Hibernate’s built-in (and unsupported) pooling
7.10. User-provided Connections
7.11. ConnectionProvider support for transaction isolation setting
7.12. Database Dialect
8. Transactions and concurrency control
8.1. Physical Transactions
8.2. JTA configuration
8.3. Hibernate Transaction API
8.4. Contextual sessions
8.5. Transactional patterns (and anti-patterns)
8.6. Session-per-operation anti-pattern
8.7. Session-per-request pattern
8.8. Conversations
8.9. Session-per-application
9. JNDI
10. Locking
10.1. Optimistic
10.2. Dedicated version number
10.3. Timestamp
10.4. Pessimistic
10.5. LockMode and LockModeType
10.6. JPA locking query hints
10.7. The buildLockRequest API
10.8. Follow-on-locking
11. Fetching
11.1. The basics
11.2. Applying fetch strategies
11.3. No fetching
11.4. Dynamic fetching via queries
11.5. Dynamic fetching via JPA entity graph
11.6. Dynamic fetching via Hibernate profiles
11.7. Batch fetching
11.8. The @Fetch annotation mapping
11.9. FetchMode.SELECT
11.10. FetchMode.SUBSELECT
11.11. FetchMode.JOIN
12. Batching
12.1. JDBC batching
12.2. Session batching
12.2.1. Batch inserts
12.2.2. Session scroll
12.2.3. StatelessSession
12.3. Hibernate Query Language for DML
12.3.1. HQL\/JPQL for UPDATE and DELETE
12.3.2. HQL syntax for INSERT
13. Caching
13.1. Configuring second-level caching
13.1.1. RegionFactory
13.1.2. Caching configuration properties
13.2. Configuring second-level cache mappings
13.3. Entity inheritance and second-level cache mapping
13.4. Entity cache
13.5. Collection cache
13.6. Query cache
13.6.1. Query cache regions
13.7. Managing the cached data
13.7.1. Evicting cache entries
13.8. Caching statistics
13.9. JCache
13.9.1. RegionFactory
13.9.2. JCache CacheManager
13.10. Ehcache
13.10.1. RegionFactory
13.11. Infinispan
13.11.1. RegionFactory
13.11.2. Configuration properties
14. Interceptors and events
14.1. Interceptors
14.2. Native Event system
14.3. Mixing Events and Interceptors
14.4. Hibernate declarative security
14.5. JPA Callbacks
15. HQL and JPQL
15.1. Query API
15.2. Examples domain model
15.3. JPA Query API
15.4. Hibernate Query API
15.4.1. Query scrolling
15.5. Case Sensitivity
15.6. Statement types
15.7. Select statements
15.8. Update statements
15.9. Delete statements
15.10. Insert statements
15.11. The FROM clause
15.12. Identification variables
15.13. Root entity references
15.14. Explicit joins
15.15. Implicit joins (path expressions)
15.16. Distinct
15.16.1. Using DISTINCT with SQL projections
15.16.2. Using DISTINCT with entity queries
15.17. Collection member references
15.18. Special case - qualified path expressions
15.19. Polymorphism
15.20. Expressions
15.21. Identification variable
15.22. Path expressions
15.23. Literals
15.24. Arithmetic
15.25. Concatenation (operation)
15.26. Aggregate functions
15.27. Scalar functions
15.28. JPQL standardized functions
15.29. HQL functions
15.30. Non-standardized functions
15.31. Collection-related expressions
15.32. Entity type
15.33. CASE expressions
15.34. Simple CASE expressions
15.35. Searched CASE expressions
15.36. NULLIF expressions
15.37. COALESCE expressions
15.38. The SELECT clause
15.39. Predicates
15.40. Relational comparisons
15.41. Nullness predicate
15.42. Like predicate
15.43. Between predicate
15.44. In predicate
15.45. Exists predicate
15.46. Empty collection predicate
15.47. Member-of collection predicate
15.48. NOT predicate operator
15.49. AND predicate operator
15.50. OR predicate operator
15.51. The WHERE clause
15.52. Group by
15.53. Order by
15.54. Read-only entities
16. Criteria
16.1. Typed criteria queries
16.2. Selecting an entity
16.3. Selecting an expression
16.4. Selecting multiple values
16.5. Selecting a wrapper
16.6. Tuple criteria queries
16.7. FROM clause
16.8. Roots
16.9. Joins
16.10. Fetches
16.11. Path expressions
16.12. Using parameters
16.13. Using group by
17. 本地 SQL 查询
17.1. 使用JPA创建本地查询
17.2. 标量查询
17.3. 实体查询
17.4. 关联和集合处理
17.5. 返回多个实体
17.6. 别名和属性引用
17.7. 返回DTOs (数据传输对象)
17.8. inheritance 处理
17.9. 查询参数
17.10. 命名SQL查询
17.10.1. 命名SQL查询选择标量值
17.10.2. 命名SQL查询选择实体
17.11. 解析本地SQL查询中的全局目录和模式
17.12. 使用存储过程查询
17.13. 自定义增删改查SQL语句
18. 空间要素
18.1. 空间要素简介
18.2. 空间要素配置
18.2.1. 依赖配置
18.2.2. 方言配置
18.3. Types
19. Multitenancy
19.1. What is multitenancy?
19.2. Multitenant data approaches
19.2.1. Separate database
19.2.2. Separate schema
19.3. Partitioned (discriminator) data
19.4. Multitenancy in Hibernate
19.4.1. MultiTenantConnectionProvider
19.4.2. CurrentTenantIdentifierResolver
19.4.3. Caching
20. OSGi
20.1. OSGi Specification and Environment
20.2. hibernate-osgi
20.3. features.xml
20.4. QuickStarts\/Demos
20.5. Container-Managed JPA
20.6. Enterprise OSGi JPA Container
20.7. persistence.xml
20.8. DataSource
20.9. Bundle Package Imports
20.10. Obtaining an EntityManger
20.11. Unmanaged JPA
20.12. persistence.xml
20.13. Bundle Package Imports
20.14. Obtaining an EntityMangerFactory
20.15. Unmanaged Native
20.16. Bundle Package Imports
20.17. Obtaining an SessionFactory
20.18. Optional Modules
20.19. Extension Points
20.20. Caveats
21. Envers
21.1. Basics
21.2. Configuration
21.3. Additional mapping annotations
21.4. Choosing an audit strategy
21.5. Revision Log
21.6. Tracking entity names modified during revisions
21.7. Tracking entity changes at property level
21.8. Queries
21.9. Querying for entities of a class at a given revision
21.10. Querying for revisions, at which entities of a given class changed
21.11. Querying for revisions of entity that modified given property
21.12. Querying for entities modified in a given revision
21.13. Querying for entities using entity relation joins
21.14. Conditional auditing
21.15. Understanding the Envers Schema
21.16. Generating schema with Ant
21.17. Mapping exceptions
21.17.1. What isn’t and will not be supported
21.17.2. What isn’t and will be supported
21.18. @OneToMany with @JoinColumn
21.19. Advanced: Audit table partitioning
21.20. Benefits of audit table partitioning
21.22. Audit table partitioning example
21.23. Determining a suitable partitioning column
21.24. Determining a suitable partitioning scheme
21.25. Envers links
21.21. Suitable columns for audit table partitioning
22. 数据库可移植性注意事项
22.1. 可移植性基础
22.2. 数据库方言
22.3. 数据库方言解析
22.4. 标识码生成
22.5. 数据库方法
22.6. 类型映射
22.6.1. BLOB\/CLOB 类型映射
22.6.2. Boolean 类型映射
23. 配置
23.1. 策略配置
23.2. 常规配置
23.3. 数据库连接属性
23.4. c3p0 数据源属性
23.5. 映射属性
23.6. 字节增强
23.7. 查询设置
23.8. 批处理属性
23.8.1. 获取(fetching)属性
23.9. 语句记录和统计
23.10. 缓存属性
23.11. Infinispan 配置
23.12. 事物属性
23.13. Multi-tenancy settings
23.14. 自动模式生成
23.15. 异常处理
23.16. 回话事件
23.17. JMX 设置
23.18. JACC 设置
23.19. 类加载器属性
23.20. 引导属性
23.21. 其他属性
23.22. Envers 属性
23.23. 空间属性
23.24. 内部属性
24. 注解映射类型
24.1. JPA 中的注解
24.1.1. @Access注解
24.1.2. @AssociationOverride注解
24.1.3. @AssociationOverrides注解
24.1.4. @AttributeOverride注解
24.1.5. @AttributeOverrides注解
24.1.6. @Basic注解
24.1.7. @Cacheable注解
24.1.8. @CollectionTable注解
24.1.9. @Column注解
24.1.10. @ColumnResult注解
24.1.11. @ConstructorResult注解
24.1.12. @Convert注解
24.1.13. @Converter注解
24.1.14. @Converts注解
24.1.15. @DiscriminatorColumn注解
24.1.16. @DiscriminatorValue注解
24.1.17. @ElementCollection注解
24.1.18. @Embeddable注解
24.1.19. @Embedded注解
24.1.20. @EmbeddedId注解
24.1.21. @Entity注解
24.1.22. @EntityListeners注解
24.1.23. @EntityResult注解
24.1.24. @Enumerated注解
24.1.25. @ExcludeDefaultListeners注解
24.1.26. @ExcludeSuperclassListeners注解
24.1.27. @FieldResult注解
24.1.28. @ForeignKey注解
24.1.29. @GeneratedValue注解
24.1.30. @Id注解
24.1.31. @IdClass注解
24.1.32. @Index注解
24.1.33. @Inheritance注解
24.1.34. @JoinColumn注解
24.1.35. @JoinColumns注解
24.1.36. @JoinTable注解
24.1.37. @Lob注解
24.1.38. @ManyToMany注解
24.1.39. @ManyToOne注解
24.1.40. @MapKey注解
24.1.41. @MapKeyClass注解
24.1.42. @MapKeyColumn注解
24.1.43. @MapKeyEnumerated注解
24.1.44. @MapKeyJoinColumn注解
24.1.45. @MapKeyJoinColumns注解
24.1.46. @MapKeyTemporal注解
24.1.47. @MappedSuperclass注解
24.1.48. @MapsId注解
24.1.49. @NamedAttributeNode注解
24.1.50. @NamedEntityGraph注解
24.1.51. @NamedEntityGraphs注解
24.1.52. @NamedNativeQueries注解
24.1.53. @NamedNativeQuery注解
24.1.54. @NamedQueries注解
24.1.55. @NamedQuery注解
24.1.56. @NamedStoredProcedureQueries注解
24.1.57. @NamedStoredProcedureQuery注解
24.1.58. @NamedSubgraph注解
24.1.59. @OneToMany注解
24.1.60. @OneToOne注解
24.1.61. @OrderBy注解
24.1.62. @OrderColumn注解
24.1.63. @PersistenceContext注解
24.1.64. @PersistenceContexts注解
24.1.65. @PersistenceProperty注解
24.1.66. @PersistenceUnit注解
24.1.67. @PersistenceUnits注解
24.1.68. @PostLoad注解
24.1.69. @PostPersist注解
24.1.70. @PostRemove注解
24.1.71. @PostUpdate注解
24.1.72. @PrePersist注解
24.1.73. @PreRemove注解
24.1.74. @PreUpdate注解
24.1.75. @PrimaryKeyJoinColumn注解
24.1.76. @PrimaryKeyJoinColumns注解
24.1.77. @QueryHint注解
24.1.78. @SecondaryTable注解
24.1.79. @SecondaryTables注解
24.1.80. @SequenceGenerator注解
24.1.81. @SqlResultSetMapping注解
24.1.82. @SqlResultSetMappings注解
24.1.83. @StoredProcedureParameter注解
24.1.84. @Table注解
24.1.85. @TableGenerator注解
24.1.86. @Temporal注解
24.1.87. @Transient注解
24.1.88. @UniqueConstraint注解
24.1.89. @Version注解
24.2. Hibernate 注解
24.2.1. @AccessType注解
24.2.2. @Any注解
24.2.3. @AnyMetaDef注解
24.2.4. @AnyMetaDefs注解
24.2.5. @AttributeAccessor注解
24.2.6. @BatchSize注解
24.2.7. @Cache注解
24.2.8. @Cascade注解
24.2.9. @Check注解
24.2.10. @CollectionId注解
24.2.11. @CollectionType注解
24.2.12. @ColumnDefault注解
24.2.13. @Columns注解
24.2.14. @ColumnTransformer注解
24.2.15. @ColumnTransformers注解
24.2.16. @CreationTimestamp注解
24.2.17. @DiscriminatorFormula注解
24.2.18. @DiscriminatorOptions注解
24.2.19. @DynamicInsert注解
24.2.20. @DynamicUpdate注解
24.2.21. @Entity注解
24.2.22. @Fetch注解
24.2.23. @FetchProfile注解
24.2.24. @FetchProfile.FetchOverride注解
24.2.25. @FetchProfiles注解
24.2.26. @Filter注解
24.2.27. @FilterDef注解
24.2.28. @FilterDefs注解
24.2.29. @FilterJoinTable注解
24.2.30. @FilterJoinTables注解
24.2.31. @Filters注解
24.2.32. @ForeignKey注解
24.2.33. @Formula注解
24.2.34. @Generated注解
24.2.35. @GeneratorType注解
24.2.36. @GenericGenerator注解
24.2.37. @GenericGenerators注解
24.2.38. @Immutable注解
24.2.39. @Index注解
24.2.40. @IndexColumn注解
24.2.41. @JoinColumnOrFormula注解
24.2.42. @JoinColumnsOrFormulas注解
24.2.43. @JoinFormula注解
24.2.44. @LazyCollection注解
24.2.45. @LazyGroup注解
24.2.46. @LazyToOne注解
24.2.47. @ListIndexBase注解
24.2.48. @Loader注解
24.2.49. @ManyToAny注解
24.2.50. @MapKeyType注解
24.2.51. @MetaValue注解
24.2.52. @NamedNativeQueries注解
24.2.53. @NamedNativeQuery注解
24.2.54. @NamedQueries注解
24.2.55. @NamedQuery注解
24.2.56. @Nationalized注解
24.2.57. @NaturalId注解
24.2.58. @NaturalIdCache注解
24.2.59. @NotFound注解
24.2.60. @OnDelete注解
24.2.61. @OptimisticLock注解
24.2.62. @OptimisticLocking注解
24.2.63. @OrderBy注解
24.2.64. @ParamDef注解
24.2.65. @Parameter注解
24.2.66. @Parent注解
24.2.67. @Persister注解
24.2.68. @Polymorphism注解
24.2.69. @Proxy注解
24.2.70. @RowId注解
24.2.71. @SelectBeforeUpdate注解
24.2.72. @Sort注解
24.2.73. @SortComparator注解
24.2.74. @SortNatural注解
24.2.75. @Source注解
24.2.76. @SQLDelete注解
24.2.77. @SQLDeleteAll注解
24.2.78. @SqlFragmentAlias注解
24.2.79. @SQLInsert注解
24.2.80. @SQLUpdate注解
24.2.81. @Subselect注解
24.2.82. @Synchronize注解
24.2.83. @Table注解
24.2.84. @Tables注解
24.2.85. @Target注解
24.2.86. @Tuplizer注解
24.2.87. @Tuplizers注解
24.2.88. @Type注解
24.2.89. @TypeDef注解
24.2.90. @TypeDefs注解
24.2.91. @UpdateTimestamp注解
24.2.92. @ValueGenerationType注解
24.2.93. @Where注解
24.2.94. @WhereJoinTable注解
25. 性能优化和最佳实战
25.1. 架构赶你
25.2. 日志记录
25.3. JDBC 批量导入
25.4. 映射
25.4.1. 标识
25.4.2. 关联
25.5. 继承
25.6. 获取对象
25.6.1. 获取关联对象
25.7. 缓存
26. Legacy Bootstrapping
27. Migration
28. Legacy Domain Model
29. Legacy Hibernate Criteria Queries
29.1. Creating a Criteria instance
29.2. JPA vs Hibernate entity name
29.3. Narrowing the result set
29.4. Ordering the results
29.5. Associations
29.6. Dynamic association fetching
29.7. Components
29.8. Collections
29.9. Example queries
29.10. Projections, aggregation and grouping
29.11. Detached queries and subqueries
29.12. Queries by natural identifier
30. Legacy Hibernate Native Queries
30.1. Legacy Named SQL queries
30.2. Legacy return-property to explicitly specify column\/alias names
30.3. Legacy stored procedures for querying
30.4. Legacy rules\/limitations for using stored procedures
30.5. Legacy custom SQL for create, update and delete
30.6. Legacy custom SQL for loading
31. 参考文献
Powered by
GitBook
22.6.1. BLOB\/CLOB 类型映射
22.6.1. BLOB/CLOB mappings
</div> <div class="sect3">
results matching "
"
No results matching "
"