Skip to content

Commit 903f577

Browse files
committed
HHH-18453 - Fix Java code block highlighting in User Guide
1 parent 257adaf commit 903f577

29 files changed

+676
-677
lines changed

documentation/src/main/asciidoc/userguide/Bibliography.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@
33
- [[[PoEAA]]] Martin Fowler. https://www.martinfowler.com/books/eaa.html[Patterns of Enterprise Application Architecture].
44
Addison-Wesley Professional. 2002.
55
- [[[JPwH]]] Christian Bauer & Gavin King. https://www.manning.com/books/java-persistence-with-hibernate-second-edition[Java Persistence with Hibernate, Second Edition]. Manning Publications Co. 2015.
6-
- [[[jdbc]]] https://download.oracle.com/otndocs/jcp/jdbc-4_2-mrel2-spec/[JDBC Specification - Version 4.2]
76
- [[[jdbc]]] https://download.oracle.com/otndocs/jcp/jdbc-4_3-mrel3-spec/[JDBC Specification - Version 4.3]

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Since version 5.2, Hibernate allows overriding the global JDBC batch size given
4646
[[batch-session-jdbc-batch-size-example]]
4747
.Hibernate specific JDBC batch size configuration on a per `Session` basis
4848
====
49-
[source, JAVA, indent=0]
49+
[source, java, indent=0]
5050
----
5151
include::{example-dir-doc-batch}/BatchTests.java[tags=batch-session-jdbc-batch-size-example]
5252
----
@@ -60,7 +60,7 @@ The following example shows an anti-pattern for batch inserts.
6060
[[batch-session-batch-example]]
6161
.Naive way to insert 100 000 entities with Hibernate
6262
====
63-
[source, JAVA, indent=0]
63+
[source, java, indent=0]
6464
----
6565
include::{example-dir-doc-batch}/BatchTests.java[tags=batch-session-batch-example]
6666
----
@@ -88,7 +88,7 @@ When you make new objects persistent, employ methods `flush()` and `clear()` to
8888
[[batch-session-batch-insert-example]]
8989
.Flushing and clearing the `Session`
9090
====
91-
[source, JAVA, indent=0]
91+
[source, java, indent=0]
9292
----
9393
include::{example-dir-doc-batch}/BatchTests.java[tags=batch-session-batch-insert-example]
9494
----
@@ -103,7 +103,7 @@ In addition, use method `scroll()` to take advantage of server-side cursors for
103103
[[batch-session-scroll-example]]
104104
.Using `scroll()`
105105
====
106-
[source, JAVA, indent=0]
106+
[source, java, indent=0]
107107
----
108108
include::{example-dir-doc-batch}/BatchTests.java[tags=batch-session-scroll-example]
109109
----
@@ -149,7 +149,7 @@ IMPORTANT: Due to the lack of a first-level cache, stateless sessions are vulner
149149
[[batch-stateless-session-example]]
150150
.Using a `StatelessSession`
151151
====
152-
[source, JAVA, indent=0]
152+
[source, java, indent=0]
153153
----
154154
include::{example-dir-doc-batch}/BatchTests.java[tags=batch-stateless-session-example]
155155
----
@@ -205,7 +205,7 @@ You can use sub-queries in the `WHERE` clause, and the sub-queries themselves ca
205205
[[batch-bulk-jpql-update-example]]
206206
.Executing a JPQL `UPDATE`, using the `Query.executeUpdate()`
207207
====
208-
[source, JAVA, indent=0]
208+
[source, java, indent=0]
209209
----
210210
include::{example-dir-doc-batch}/BatchTests.java[tags=batch-bulk-jpql-update-example]
211211
----
@@ -214,7 +214,7 @@ include::{example-dir-doc-batch}/BatchTests.java[tags=batch-bulk-jpql-update-exa
214214
[[batch-bulk-hql-update-example]]
215215
.Executing an HQL `UPDATE`, using the `Query.executeUpdate()`
216216
====
217-
[source, JAVA, indent=0]
217+
[source, java, indent=0]
218218
----
219219
include::{example-dir-doc-batch}/BatchTests.java[tags=batch-bulk-hql-update-example]
220220
----
@@ -226,7 +226,7 @@ You can use a versioned update to force Hibernate to reset the version or timest
226226
[[batch-bulk-hql-update-version-example]]
227227
.Updating the version of timestamp
228228
====
229-
[source, JAVA, indent=0]
229+
[source, java, indent=0]
230230
----
231231
include::{example-dir-doc-batch}/BatchTests.java[tags=batch-bulk-hql-update-version-example]
232232
----
@@ -242,7 +242,7 @@ This feature is only available in HQL since it's not standardized by Jakarta Per
242242
[[batch-bulk-jpql-delete-example]]
243243
.A JPQL `DELETE` statement
244244
====
245-
[source, JAVA, indent=0]
245+
[source, java, indent=0]
246246
----
247247
include::{example-dir-doc-batch}/BatchTests.java[tags=batch-bulk-jpql-delete-example]
248248
----
@@ -251,7 +251,7 @@ include::{example-dir-doc-batch}/BatchTests.java[tags=batch-bulk-jpql-delete-exa
251251
[[batch-bulk-hql-delete-example]]
252252
.An HQL `DELETE` statement
253253
====
254-
[source, JAVA, indent=0]
254+
[source, java, indent=0]
255255
----
256256
include::{example-dir-doc-batch}/BatchTests.java[tags=batch-bulk-hql-delete-example]
257257
----
@@ -309,7 +309,7 @@ in which case the seed value defined by the `org.hibernate.type.descriptor.java.
309309
[[batch-bulk-hql-insert-example]]
310310
.HQL INSERT statement
311311
====
312-
[source, JAVA, indent=0]
312+
[source, java, indent=0]
313313
----
314314
include::{example-dir-doc-batch}/BatchTests.java[tags=batch-bulk-hql-insert-example]
315315
----
@@ -344,7 +344,7 @@ The `Person` entity is the base class of this entity inheritance model, and is m
344344
[[batch-bulk-hql-temp-table-base-class-example]]
345345
.Bulk mutation base class entity
346346
====
347-
[source, JAVA, indent=0]
347+
[source, java, indent=0]
348348
----
349349
include::{example-dir-bulkid}/AbstractMutationStrategyCompositeIdTest.java[tags=batch-bulk-hql-temp-table-base-class-example]
350350
----
@@ -355,7 +355,7 @@ Both the `Doctor` and `Engineer` entity classes extend the `Person` base class:
355355
[[batch-bulk-hql-temp-table-sub-classes-example]]
356356
.Bulk mutation subclass entities
357357
====
358-
[source, JAVA, indent=0]
358+
[source, java, indent=0]
359359
----
360360
include::{example-dir-bulkid}/AbstractMutationStrategyIdTest.java[tags=batch-bulk-hql-temp-table-sub-classes-example]
361361
----
@@ -369,7 +369,7 @@ Now, when you try to execute a bulk entity delete query:
369369
[[batch-bulk-hql-temp-table-delete-query-example]]
370370
.Bulk mutation delete query example
371371
====
372-
[source, JAVA, indent=0]
372+
[source, java, indent=0]
373373
----
374374
include::{example-dir-bulkid}/AbstractMutationStrategyCompositeIdTest.java[tags=batch-bulk-hql-temp-table-delete-query-example]
375375
----

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ We can inject the `EntityManagerFactory` -
6868
[[bootstrap-jpa-compliant-PersistenceUnit-configurable-example]]
6969
.Injecting a specific `EntityManagerFactory`
7070
====
71-
[source, JAVA, indent=0]
71+
[source, java, indent=0]
7272
----
7373
include::{example-dir-boot}/BootstrapTest.java[tags=bootstrap-jpa-compliant-PersistenceUnit-configurable-example]
7474
----
@@ -79,7 +79,7 @@ Because there is only one `<persistence-unit/>` defined, we can also omit the na
7979
[[bootstrap-jpa-compliant-PersistenceUnit-example]]
8080
.Injecting the default `EntityManagerFactory`
8181
====
82-
[source, JAVA, indent=0]
82+
[source, java, indent=0]
8383
----
8484
include::{example-dir-boot}/BootstrapTest.java[tags=bootstrap-jpa-compliant-PersistenceUnit-example]
8585
----
@@ -104,7 +104,7 @@ and either -
104104
[[example-bootstrap-jpa-compliant-EntityManagerFactory]]
105105
.Application bootstrapped `EntityManagerFactory`
106106
====
107-
[source, JAVA, indent=0]
107+
[source, java, indent=0]
108108
----
109109
include::{example-dir-boot}/BootstrapTest.java[tags=bootstrap-jpa-compliant-EntityManagerFactory-example]
110110
----
@@ -118,7 +118,7 @@ Jakarta Persistence 3.2 also introduced a new way for applications to build the
118118
[[example-bootstrap-standard-PersistenceConfiguration]]
119119
.Using PersistenceConfiguration
120120
====
121-
[source, JAVA, indent=0]
121+
[source, java, indent=0]
122122
----
123123
include::{example-dir-boot-jpa}/PersistenceConfigurationTests.java[tags=example-bootstrap-standard-PersistenceConfiguration]
124124
----
@@ -130,7 +130,7 @@ which exposes additional conveniences.
130130
[[example-bootstrap-standard-HibernatePersistenceConfiguration]]
131131
.Using HibernatePersistenceConfiguration
132132
====
133-
[source, JAVA, indent=0]
133+
[source, java, indent=0]
134134
----
135135
include::{example-dir-boot-jpa}/PersistenceConfigurationTests.java[tags=example-bootstrap-standard-HibernatePersistenceConfiguration]
136136
----
@@ -254,7 +254,7 @@ If you wish to alter how the `BootstrapServiceRegistry` is built, that is contro
254254
[[example-bootstrap-native-BootstrapServiceRegistry]]
255255
.Controlling `BootstrapServiceRegistry` building
256256
====
257-
[source, JAVA, indent=0]
257+
[source, java, indent=0]
258258
----
259259
include::{example-dir-boot}/BootstrapTest.java[tags=example-bootstrap-native-BootstrapServiceRegistry]
260260
----
@@ -266,7 +266,7 @@ You will almost always need to configure this registry, which is done through `o
266266
[[example-bootstrap-native-StandardServiceRegistryBuilder]]
267267
.Building a `BootstrapServiceRegistryBuilder`
268268
====
269-
[source, JAVA, indent=0]
269+
[source, java, indent=0]
270270
----
271271
include::{example-dir-boot}/BootstrapTest.java[tags=example-bootstrap-native-StandardServiceRegistryBuilder]
272272
----
@@ -289,7 +289,7 @@ This mapping information might be in the form of XML, annotations or both.
289289
[[example-bootstrap-native-MetadataSources]]
290290
.Building a `MetadataSources`
291291
====
292-
[source, JAVA, indent=0]
292+
[source, java, indent=0]
293293
----
294294
include::{example-dir-boot}/BootstrapTest.java[tags=example-bootstrap-native-MetadataSources]
295295
----
@@ -300,7 +300,7 @@ Also, all methods on `MetadataSources` offer fluent-style call chaining -
300300
[[bootstrap-native-metadata-source-example]]
301301
.Configuring a `MetadataSources` with method chaining
302302
====
303-
[source, JAVA, indent=0]
303+
[source, java, indent=0]
304304
----
305305
include::{example-dir-boot}/BootstrapTest.java[tags=example-bootstrap-native-MetadataSources-chained]
306306
----
@@ -315,7 +315,7 @@ If you have specified everything as settings, or you are ok with the default beh
315315
[[example-bootstrap-native-Metadata-no-builder]]
316316
.Using `MetadataSources#buildMetadata`
317317
====
318-
[source, JAVA, indent=0]
318+
[source, java, indent=0]
319319
----
320320
include::{example-dir-boot}/BootstrapTest.java[tags=example-bootstrap-native-Metadata-no-builder]
321321
----
@@ -327,7 +327,7 @@ Optionally, we can obtain a `MetadataBuilder` from `MetadataSources` which can b
327327
[[example-bootstrap-native-MetadataBuilder]]
328328
.Using `MetadataBuilder`
329329
====
330-
[source, JAVA, indent=0]
330+
[source, java, indent=0]
331331
----
332332
include::{example-dir-boot}/BootstrapTest.java[tags=example-bootstrap-native-Metadata-using-builder]
333333
----
@@ -355,7 +355,7 @@ link:{doc-javadoc-url}/org/hibernate/boot/Metadata.html#buildSessionFactory--[`M
355355
[[example-bootstrap-native-SessionFactory-no-builder]]
356356
.Using `SessionFactoryBuilder`
357357
====
358-
[source, JAVA, indent=0]
358+
[source, java, indent=0]
359359
----
360360
include::{example-dir-boot}/BootstrapTest.java[tags=example-bootstrap-native-SessionFactory-no-builder]
361361
----
@@ -366,7 +366,7 @@ Or a `SessionFactoryBuilder`, obtained from `Metadata`, may be used to configure
366366
[[example-bootstrap-native-SessionFactoryBuilder]]
367367
.Using `SessionFactoryBuilder`
368368
====
369-
[source, JAVA, indent=0]
369+
[source, java, indent=0]
370370
----
371371
include::{example-dir-boot}/BootstrapTest.java[tags=example-bootstrap-native-SessionFactory-using-builder]
372372
----
@@ -380,7 +380,7 @@ A common use case for `Integrator`, for example, is to hook in custom event list
380380
[[example-bootstrap-event-listener-registration]]
381381
.Configuring an event listener
382382
====
383-
[source, JAVA, indent=0]
383+
[source, java, indent=0]
384384
----
385385
include::{example-dir-boot}/BootstrapTest.java[tags=bootstrap-event-listener-registration-example]
386386
----

0 commit comments

Comments
 (0)