Skip to content

Commit eece229

Browse files
committed
HHH-16097 Moved chapters batch, bootstrap and domain
1 parent 24e046d commit eece229

File tree

180 files changed

+483
-441
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+483
-441
lines changed

documentation/src/main/asciidoc/userguide/appendices/LegacyBasicTypeResolution.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
:sourcedir: ../../../../test/java/org/hibernate/userguide/mapping
1+
:root-project-dir: ../../../../../..
2+
:core-project-dir: {root-project-dir}/hibernate-core
3+
:sourcedir: {core-project-dir}/src/test/java/org/hibernate/orm/test/mapping
24
:extrasdir: extras
35
:originalextrasdir: ../chapters/domain/extras
46

documentation/src/main/asciidoc/userguide/chapters/batch/Batching.adoc

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
[[batch]]
22
== Batching
33
:root-project-dir: ../../../../../../..
4-
:documentation-project-dir: {root-project-dir}/documentation
54
:core-project-dir: {root-project-dir}/hibernate-core
6-
:example-dir-doc-batch: {documentation-project-dir}/src/test/java/org/hibernate/userguide/batch
5+
:example-dir-doc-batch: {core-project-dir}/src/test/java/org/hibernate/orm/test/batch
76
:example-dir-bulkid: {core-project-dir}/src/test/java/org/hibernate/orm/test/bulkid
87
:extrasdir: extras
98

@@ -49,7 +48,7 @@ Since version 5.2, Hibernate allows overriding the global JDBC batch size given
4948
====
5049
[source, JAVA, indent=0]
5150
----
52-
include::{example-dir-doc-batch}/BatchTest.java[tags=batch-session-jdbc-batch-size-example]
51+
include::{example-dir-doc-batch}/BatchTests.java[tags=batch-session-jdbc-batch-size-example]
5352
----
5453
====
5554

@@ -63,7 +62,7 @@ The following example shows an anti-pattern for batch inserts.
6362
====
6463
[source, JAVA, indent=0]
6564
----
66-
include::{example-dir-doc-batch}/BatchTest.java[tags=batch-session-batch-example]
65+
include::{example-dir-doc-batch}/BatchTests.java[tags=batch-session-batch-example]
6766
----
6867
====
6968

@@ -91,7 +90,7 @@ When you make new objects persistent, employ methods `flush()` and `clear()` to
9190
====
9291
[source, JAVA, indent=0]
9392
----
94-
include::{example-dir-doc-batch}/BatchTest.java[tags=batch-session-batch-insert-example]
93+
include::{example-dir-doc-batch}/BatchTests.java[tags=batch-session-batch-insert-example]
9594
----
9695
====
9796

@@ -106,7 +105,7 @@ In addition, use method `scroll()` to take advantage of server-side cursors for
106105
====
107106
[source, JAVA, indent=0]
108107
----
109-
include::{example-dir-doc-batch}/BatchTest.java[tags=batch-session-scroll-example]
108+
include::{example-dir-doc-batch}/BatchTests.java[tags=batch-session-scroll-example]
110109
----
111110
====
112111

@@ -152,7 +151,7 @@ IMPORTANT: Due to the lack of a first-level cache, stateless sessions are vulner
152151
====
153152
[source, JAVA, indent=0]
154153
----
155-
include::{example-dir-doc-batch}/BatchTest.java[tags=batch-stateless-session-example]
154+
include::{example-dir-doc-batch}/BatchTests.java[tags=batch-stateless-session-example]
156155
----
157156
====
158157

@@ -208,7 +207,7 @@ You can use sub-queries in the `WHERE` clause, and the sub-queries themselves ca
208207
====
209208
[source, JAVA, indent=0]
210209
----
211-
include::{example-dir-doc-batch}/BatchTest.java[tags=batch-bulk-jpql-update-example]
210+
include::{example-dir-doc-batch}/BatchTests.java[tags=batch-bulk-jpql-update-example]
212211
----
213212
====
214213

@@ -217,7 +216,7 @@ include::{example-dir-doc-batch}/BatchTest.java[tags=batch-bulk-jpql-update-exam
217216
====
218217
[source, JAVA, indent=0]
219218
----
220-
include::{example-dir-doc-batch}/BatchTest.java[tags=batch-bulk-hql-update-example]
219+
include::{example-dir-doc-batch}/BatchTests.java[tags=batch-bulk-hql-update-example]
221220
----
222221
====
223222

@@ -229,7 +228,7 @@ You can use a versioned update to force Hibernate to reset the version or timest
229228
====
230229
[source, JAVA, indent=0]
231230
----
232-
include::{example-dir-doc-batch}/BatchTest.java[tags=batch-bulk-hql-update-version-example]
231+
include::{example-dir-doc-batch}/BatchTests.java[tags=batch-bulk-hql-update-version-example]
233232
----
234233
====
235234

@@ -245,7 +244,7 @@ This feature is only available in HQL since it's not standardized by Jakarta Per
245244
====
246245
[source, JAVA, indent=0]
247246
----
248-
include::{example-dir-doc-batch}/BatchTest.java[tags=batch-bulk-jpql-delete-example]
247+
include::{example-dir-doc-batch}/BatchTests.java[tags=batch-bulk-jpql-delete-example]
249248
----
250249
====
251250

@@ -254,7 +253,7 @@ include::{example-dir-doc-batch}/BatchTest.java[tags=batch-bulk-jpql-delete-exam
254253
====
255254
[source, JAVA, indent=0]
256255
----
257-
include::{example-dir-doc-batch}/BatchTest.java[tags=batch-bulk-hql-delete-example]
256+
include::{example-dir-doc-batch}/BatchTests.java[tags=batch-bulk-hql-delete-example]
258257
----
259258
====
260259

@@ -312,7 +311,7 @@ in which case the seed value defined by the `org.hibernate.type.descriptor.java.
312311
====
313312
[source, JAVA, indent=0]
314313
----
315-
include::{example-dir-doc-batch}/BatchTest.java[tags=batch-bulk-hql-insert-example]
314+
include::{example-dir-doc-batch}/BatchTests.java[tags=batch-bulk-hql-insert-example]
316315
----
317316
====
318317

documentation/src/main/asciidoc/userguide/chapters/bootstrap/Bootstrap.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[[bootstrap]]
22
== Bootstrap
33
:root-project-dir: ../../../../../../..
4-
:documentation-project-dir: {root-project-dir}/documentation
54
:core-project-dir: {root-project-dir}/hibernate-core
6-
:example-dir-boot: {documentation-project-dir}/src/test/java/org/hibernate/userguide/bootstrap
7-
:example-dir-boot-spi: {core-project-dir}/src/test/java/org/hibernate/orm/test/bootstrap/spi
5+
:core-test-base: {core-project-dir}/src/test/java/org/hibernate/orm/test
6+
:example-dir-boot: {core-test-base}/bootstrap
7+
:example-dir-boot-spi: {core-test-base}/bootstrap/spi
88
:extrasdir: extras
99

1010
The term bootstrapping refers to initializing and starting a software component.

documentation/src/main/asciidoc/userguide/chapters/domain/associations.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[[associations]]
22
=== Associations
33
:root-project-dir: ../../../../../../..
4-
:documentation-project-dir: {root-project-dir}/documentation
54
:core-project-dir: {root-project-dir}/hibernate-core
65
:example-dir-association: {core-project-dir}/src/test/java/org/hibernate/orm/test/associations
76
:extrasdir: extras/associations

documentation/src/main/asciidoc/userguide/chapters/domain/basic_types.adoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
[[basic]]
22
=== Basic values
33
:root-project-dir: ../../../../../../..
4-
:documentation-project-dir: {root-project-dir}/documentation
5-
:documentation-example-base: {documentation-project-dir}/src/test/
6-
:example-dir-model: {documentation-project-dir}/src/main/java/org/hibernate/userguide/model
7-
:example-dir-basic-mapping: {documentation-example-base}/java/org/hibernate/userguide/mapping
8-
:example-dir-resources: {documentation-example-base}/resources/org/hibernate/userguide/
4+
:testing-project-dir: {root-project-dir}/hibernate-testing
5+
:example-dir-model: {testing-project-dir}/src/main/java/org/hibernate/testing/orm/domain/userguide
96
:core-project-dir: {root-project-dir}/hibernate-core
107
:core-test-base: {core-project-dir}/src/test
8+
:example-dir-basic-mapping: {core-test-base}/java/org/hibernate/orm/test/mapping
9+
:example-dir-resources: {core-test-base}/resources/org/hibernate/orm/test/
1110
:example-dir-generated: {core-test-base}/java/org/hibernate/orm/test/mapping/generated
1211
:example-dir-converter: {core-test-base}/java/org/hibernate/orm/test/mapping/converted/converter
1312
:extrasdir: extras

documentation/src/main/asciidoc/userguide/chapters/domain/dynamic_model.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
[[dynamic-model]]
22
=== Dynamic Model
33
:root-project-dir: ../../../../../../..
4+
:core-project-dir: {root-project-dir}/hibernate-core
45
:documentation-project-dir: {root-project-dir}/documentation
5-
:example-dir-dynamic: {documentation-project-dir}/src/test/java/org/hibernate/userguide/mapping/dynamic
6-
:example-dir-resources: {documentation-project-dir}/src/test/resources/org/hibernate/userguide/mapping/dynamic
6+
:example-dir-dynamic: {core-project-dir}/src/test/java/org/hibernate/orm/test/mapping/dynamic
7+
:example-dir-resources: {core-project-dir}/src/test/resources/org/hibernate/orm/test/mapping/dynamic
78
:extrasdir: extras
89

910
[IMPORTANT]

documentation/src/main/asciidoc/userguide/chapters/domain/embeddables.adoc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
[[embeddables]]
22
=== Embeddable values
33
:root-project-dir: ../../../../../../..
4-
:documentation-project-dir: {root-project-dir}/documentation
5-
:documentation-example-base: {documentation-project-dir}/src/test/java
6-
:example-dir-emeddable: {documentation-example-base}/org/hibernate/userguide/mapping/embeddable
74
:core-project-dir: {root-project-dir}/hibernate-core
85
:core-test-base: {root-project-dir}/hibernate-core/src/test/java
6+
:example-dir-emeddable: {core-test-base}/org/hibernate/orm/test/mapping/embeddable
97
:example-dir-embeddableinstantiator: {core-test-base}/org/hibernate/orm/test/mapping/embeddable/strategy/instantiator
108
:example-dir-compositeusertype: {core-test-base}/org/hibernate/orm/test/mapping/embeddable/strategy/usertype
119
:extrasdir: extras

documentation/src/main/asciidoc/userguide/chapters/domain/entity.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[[entity]]
22
=== Entity types
33
:root-project-dir: ../../../../../../..
4-
:documentation-project-dir: {root-project-dir}/documentation
5-
:example-dir-locking: {documentation-project-dir}/src/test/java/org/hibernate/userguide/locking
6-
:example-dir-mapping: {documentation-project-dir}/src/test/java/org/hibernate/userguide/mapping
7-
:example-dir-proxy: {documentation-project-dir}/src/test/java/org/hibernate/userguide/proxy
8-
:example-dir-persister: {documentation-project-dir}/src/test/java/org/hibernate/userguide/persister
4+
:core-project-dir: {root-project-dir}/hibernate-core
5+
:core-test-base: {core-project-dir}/src/test/java/org/hibernate/orm/test
6+
:example-dir-mapping: {core-test-base}/mapping
7+
:example-dir-proxy: {core-test-base}/proxy
8+
:example-dir-persister: {core-test-base}/persister
99
:extrasdir: extras
1010

1111
.Usage of the word _entity_

documentation/src/main/asciidoc/userguide/chapters/domain/identifiers.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[[identifiers]]
22
=== Identifiers
33
:root-project-dir: ../../../../../../..
4-
:documentation-project-dir: {root-project-dir}/documentation
5-
:example-dir-identifier: {documentation-project-dir}/src/test/java/org/hibernate/userguide/mapping/identifier
6-
:example-dir-associations: {documentation-project-dir}/src/test/java/org/hibernate/userguide/associations
7-
:core-test-base: {root-project-dir}/hibernate-core/src/test/java
4+
:core-project-dir: {root-project-dir}/hibernate-core
5+
:core-test-base: {core-project-dir}/src/test/java/org/hibernate/orm/test
6+
:example-dir-identifier: {core-test-base}/mapping/identifier
7+
:example-dir-associations: {core-test-base}/associations
88
:jpaJavadocUrl: https://javadoc.io/doc/jakarta.persistence/jakarta.persistence-api/latest/jakarta.persistence
99
:extrasdir: extras
1010

@@ -578,9 +578,9 @@ and type-safe definition and configuration of custom `org.hibernate.id.Identifie
578578
====
579579
[source,java]
580580
----
581-
include::{core-test-base}/org/hibernate/orm/test/id/custom/CustomSequenceGenerator.java[tag=identifiers-IdGeneratorType-example, indent=0]
581+
include::{core-test-base}/id/custom/CustomSequenceGenerator.java[tag=identifiers-IdGeneratorType-example, indent=0]
582582
583-
include::{core-test-base}/org/hibernate/orm/test/id/custom/Sequence.java[tag=identifiers-IdGeneratorType-example, indent=0]
583+
include::{core-test-base}/id/custom/Sequence.java[tag=identifiers-IdGeneratorType-example, indent=0]
584584
----
585585
====
586586

documentation/src/main/asciidoc/userguide/chapters/domain/natural_id.adoc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
[[naturalid]]
22
=== Natural Ids
33
:root-project-dir: ../../../../../../..
4-
:documentation-project-dir: {root-project-dir}/documentation
5-
:example-dir-naturalid: {documentation-project-dir}/src/test/java/org/hibernate/userguide/mapping/identifier
4+
:core-project-dir: {root-project-dir}/hibernate-core
5+
:example-dir-naturalid: {core-project-dir}/src/test/java/org/hibernate/orm/test/mapping/identifier
6+
:jcache-project-dir: {root-project-dir}/hibernate-jcache
7+
:example-dir-caching: {jcache-project-dir}/src/test/java/org/hibernate/orm/test/caching
68
:extrasdir: extras
79

810
Natural ids represent domain model unique identifiers that have a meaning in the real world too.
@@ -157,6 +159,6 @@ Not only can this NaturalId-to-PK resolution be cached in the Session, but we ca
157159
====
158160
[source,java]
159161
----
160-
include::{example-dir-naturalid}/CacheableNaturalIdTest.java[tags=naturalid-cacheable-mapping-example,indent=0]
162+
include::{example-dir-caching}/CacheableNaturalIdTest.java[tags=naturalid-cacheable-mapping-example,indent=0]
161163
----
162164
====

0 commit comments

Comments
 (0)