Skip to content

Commit 9570f11

Browse files
committed
User Guide grammatical corrections
1 parent da5aae7 commit 9570f11

37 files changed

+165
-161
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ hide the power of SQL from you and guarantees that your investment in
3838
relational technology and knowledge is as valid as always.
3939

4040
Hibernate may not be the best solution for data-centric applications
41-
that only use stored-procedures to implement the business logic in the
41+
that only use stored procedures to implement the business logic in the
4242
database, it is most useful with object-oriented domain models and
4343
business logic in the Java-based middle-tier. However, Hibernate can
4444
certainly help you to remove or encapsulate vendor-specific SQL code and

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Should generally only configure this or `hibernate.connection.acquisition_mode`,
109109
|`hibernate.c3p0.max_statements` | 5 | Maximum size of C3P0 statement cache. Refers to http://www.mchange.com/projects/c3p0/#maxStatements[c3p0 `maxStatements` setting].
110110
|`hibernate.c3p0.acquire_increment` | 2 | Number of connections acquired at a time when there's no connection available in the pool. Refers to http://www.mchange.com/projects/c3p0/#acquireIncrement[c3p0 `acquireIncrement` setting].
111111
|`hibernate.c3p0.idle_test_period` | 5 | Idle time before a C3P0 pooled connection is validated. Refers to http://www.mchange.com/projects/c3p0/#idleConnectionTestPeriod[c3p0 `idleConnectionTestPeriod` setting].
112-
|`hibernate.c3p0` | | A setting prefix used to indicate additional c3p0 properties that need to be passed ot the underlying c3p0 connection pool.
112+
|`hibernate.c3p0` | | A setting prefix used to indicate additional c3p0 properties that need to be passed to the underlying c3p0 connection pool.
113113
|===================================================================================================================================================================================================================================
114114

115115
[[configurations-mapping]]
@@ -155,7 +155,7 @@ However, some JPA providers do need the discriminator for handling joined inheri
155155
However, we want to make sure that legacy applications continue to work as well, which puts us in a bind in terms of how to handle _implicit_ discriminator mappings.
156156
The solution is to assume that the absence of discriminator metadata means to follow the legacy behavior _unless_ this setting is enabled.
157157

158-
With this setting enabled, Hibernate will interpret the absence of discriminator metadata as an indication to use the JPA defined defaults for these absent annotations.
158+
With this setting enabled, Hibernate will interpret the absence of discriminator metadata as an indication to use the JPA-defined defaults for these absent annotations.
159159

160160
See Hibernate Jira issue https://hibernate.atlassian.net/browse/HHH-6911[HHH-6911] for additional background info.
161161

@@ -173,7 +173,7 @@ See Hibernate Jira issue https://hibernate.atlassian.net/browse/HHH-6911[HHH-691
173173
|`hibernate.implicit_naming_strategy` |`default` (default value), `jpa`, `legacy-jpa`, `legacy-hbm`, `component-path` a|
174174

175175
Used to specify the `org.hibernate.boot.model.naming.ImplicitNamingStrategy` class to use.
176-
The following short-names are defined for this setting:
176+
The following short names are defined for this setting:
177177

178178
`default`:: Uses the `org.hibernate.boot.model.naming.ImplicitNamingStrategyJpaCompliantImpl`
179179
`jpa`:: Uses the `org.hibernate.boot.model.naming.ImplicitNamingStrategyJpaCompliantImpl`
@@ -272,7 +272,7 @@ The maximum number of entries including:
272272

273273
maintained by `org.hibernate.engine.query.spi.QueryPlanCache`.
274274

275-
|`hibernate.query.plan_parameter_metadata_max_size` | `128` (default value) | The maximum number of strong references associated to `ParameterMetadata` maintained by `org.hibernate.engine.query.spi.QueryPlanCache`.
275+
|`hibernate.query.plan_parameter_metadata_max_size` | `128` (default value) | The maximum number of strong references associated with `ParameterMetadata` maintained by `org.hibernate.engine.query.spi.QueryPlanCache`.
276276
|`hibernate.order_by.default_null_ordering` |`none`, `first` or `last` |Defines precedence of null values in `ORDER BY` clause. Defaults to `none` which varies between RDBMS implementation.
277277
|`hibernate.discriminator.force_in_select` |`true` or `false` (default value) | For entities which do not explicitly say, should we force discriminators into SQL selects?
278278
|`hibernate.query.substitutions` | `true=1,false=0` |A comma-separated list of token substitutions to use when translating a Hibernate query to SQL.
@@ -371,7 +371,7 @@ In reality, you shouldn't probably enable this setting anyway.
371371

372372
A setting to control whether to `org.hibernate.engine.internal
373373
.StatisticalLoggingSessionEventListener` is enabled on all `Sessions` (unless explicitly disabled for a given `Session`).
374-
The default value of this setting is determined by the value for `hibernate.generate_statistics`, meaning that if collection of statistics is enabled logging of Session metrics is enabled by default too.
374+
The default value of this setting is determined by the value for `hibernate.generate_statistics`, meaning that if statistics are enabled, then logging of Session metrics is enabled by default too.
375375

376376
|===================================================================================================================================================================================================================================
377377

@@ -507,7 +507,7 @@ In such cases, a value for this setting _must_ be specified.
507507

508508
The value of this setting is expected to match the value returned by `java.sql.DatabaseMetaData#getDatabaseProductName()` for the target database.
509509

510-
Additionally specifying `javax.persistence.database-major-version` and/or `javax.persistence.database-minor-version` may be required to understand exactly how to generate the required schema commands.
510+
Additionally, specifying `javax.persistence.database-major-version` and/or `javax.persistence.database-minor-version` may be required to understand exactly how to generate the required schema commands.
511511

512512
|`javax.persistence.database-major-version` | |
513513

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ while ( iter.hasNext() ) {
167167
}
168168
----
169169

170-
Additionally you may manipulate the result set using a left outer join:
170+
Additionally, you may manipulate the result set using a left outer join:
171171

172172
[source]
173173
----

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ The default value of `undefined` indicates that Hibernate uses the identifier pr
4444
Database-based timestamps incur an overhead because Hibernate needs to query the database each time to determine the incremental next value.
4545
However, database-derived timestamps are safer to use in a clustered environment.
4646
Not all database dialects are known to support the retrieval of the database's current timestamp.
47-
Others may also be unsafe for locking, because of lack of precision.
47+
Others may also be unsafe for locking because of lack of precision.
4848
|generated |Whether the timestamp property value is generated by the database. Optional, defaults to `never`.
4949
|=======================================================================

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ You cannot use stored procedures with Hibernate unless you follow some procedure
218218
If they do not follow those rules they are not usable with Hibernate.
219219
If you still want to use these procedures you have to execute them via `session.doWork()`.
220220

221-
The rules are different for each database, since database vendors have different stored procedure semantics/syntax.
221+
The rules are different for each database since database vendors have different stored procedure semantics/syntax.
222222

223223
Stored procedure queries cannot be paged with `setFirstResult()/setMaxResults()`.
224224

documentation/src/main/asciidoc/userguide/chapters/architecture/Architecture.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Session (`org.hibernate.Session`):: A single-threaded, short-lived object concep
2525
In JPA nomenclature, the `Session` is represented by an `EntityManager`.
2626
+
2727
Behind the scenes, the Hibernate `Session` wraps a JDBC `java.sql.Connection` and acts as a factory for `org.hibernate.Transaction` instances.
28-
It maintains a generally "repeatable read" persistence context (first level cache) of the application's domain model.
28+
It maintains a generally "repeatable read" persistence context (first level cache) of the application domain model.
2929

3030
Transaction (`org.hibernate.Transaction`):: A single-threaded, short-lived object used by the application to demarcate individual physical transaction boundaries.
31-
`EntityTransaction` is the JPA equivalent and both act as an abstraction API to isolate the application from the underling transaction system in use (JDBC or JTA).
31+
`EntityTransaction` is the JPA equivalent and both act as an abstraction API to isolate the application from the underlying transaction system in use (JDBC or JTA).

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The following settings control this behavior.
1717
`hibernate.jdbc.batch_versioned_data`::
1818
Some JDBC drivers return incorrect row counts when a batch is executed.
1919
If your JDBC driver falls into this category this setting should be set to `false`.
20-
Otherwise it is safe to enable this which will allow Hibernate to still batch the DML for versioned entities and still use the returned row counts for optimistic lock checks.
20+
Otherwise, it is safe to enable this which will allow Hibernate to still batch the DML for versioned entities and still use the returned row counts for optimistic lock checks.
2121
Since 5.0, it defaults to true. Previously (versions 3.x and 4.x), it used to be false.
2222

2323
`hibernate.jdbc.batch.builder`::
@@ -48,14 +48,14 @@ include::{sourcedir}/BatchTest.java[tags=batch-session-batch-example]
4848
----
4949
====
5050

51-
There are several problems associated to this example:
51+
There are several problems associated with this example:
5252

5353
. Hibernate caches all the newly inserted `Customer` instances in the session-level c1ache, so, when the transaction ends, 100 000 entities are managed by the persistence context.
5454
If the maximum memory allocated to the JVM is rather low, this example could fails with an `OutOfMemoryException`.
5555
The Java 1.8 JVM allocated either 1/4 of available RAM or 1Gb, which can easily accommodate 100 000 objects on the heap.
5656
. long-running transactions can deplete a connection pool so other transactions don't get a chance to proceed.
5757
. JDBC batching is not enabled by default, so every insert statement requires a database roundtrip.
58-
To enable JDBC batching, set the property `hibernate.jdbc.batch_size` to an integer between 10 and 50.
58+
To enable JDBC batching, set the `hibernate.jdbc.batch_size` property to an integer between 10 and 50.
5959

6060
[NOTE]
6161
====

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The process is very different for each.
1010
====
1111
This chapter will not focus on all the possibilities of bootstrapping.
1212
Those will be covered in each specific more-relevant chapters later on.
13-
Instead we focus here on the API calls needed to perform the bootstrapping.
13+
Instead, we focus here on the API calls needed to perform the bootstrapping.
1414
====
1515

1616
[TIP]
@@ -30,13 +30,13 @@ For a discussion of the legacy bootstrapping API, see <<appendices/Legacy_Bootst
3030

3131
The first step in native bootstrapping is the building of a `ServiceRegistry` holding the services Hibernate will need during bootstrapping and at run time.
3232

33-
Actually we are concerned with building 2 different ServiceRegistries.
33+
Actually, we are concerned with building 2 different ServiceRegistries.
3434
First is the `org.hibernate.boot.registry.BootstrapServiceRegistry`.
3535
The `BootstrapServiceRegistry` is intended to hold services that Hibernate needs at both bootstrap and run time.
3636
This boils down to 3 services:
3737

3838
`org.hibernate.boot.registry.classloading.spi.ClassLoaderService`:: which controls how Hibernate interacts with `ClassLoader`s
39-
`org.hibernate.integrator.spi.IntegratorService`:: which controls the management ands discovery of `org.hibernate.integrator.spi.Integrator` instances.
39+
`org.hibernate.integrator.spi.IntegratorService`:: which controls the management and discovery of `org.hibernate.integrator.spi.Integrator` instances.
4040
`org.hibernate.boot.registry.selector.spi.StrategySelector`:: which control how Hibernate resolves implementations of various strategy contracts.
4141
This is a very powerful service, but a full discussion of it is beyond the scope of this guide.
4242

@@ -106,7 +106,7 @@ include::{sourcedir}/BootstrapTest.java[tags=bootstrap-event-listener-registrati
106106
[[bootstrap-native-metadata]]
107107
==== Building the Metadata
108108

109-
The second step in native bootstrapping is the building of a `org.hibernate.boot.Metadata` object containing the parsed representations of an application's domain model and its mapping to a database.
109+
The second step in native bootstrapping is the building of a `org.hibernate.boot.Metadata` object containing the parsed representations of an application domain model and its mapping to a database.
110110
The first thing we obviously need to build a parsed representation is the source information to be parsed (annotated classes, `hbm.xml` files, `orm.xml` files).
111111
This is the purpose of `org.hibernate.boot.MetadataSources`:
112112

@@ -240,4 +240,4 @@ include::{sourcedir}/BootstrapTest.java[tags=bootstrap-native-EntityManagerFacto
240240
----
241241
====
242242

243-
The `integrationSettings` allows the application develoepr to customize the bootstrapping process by specifying different `hibernate.integrator_provider` or `hibernate.strategy_registration_provider` integration providers.
243+
The `integrationSettings` allows the application developer to customize the bootstrapping process by specifying different `hibernate.integrator_provider` or `hibernate.strategy_registration_provider` integration providers.

0 commit comments

Comments
 (0)