Skip to content

Commit e4cba2c

Browse files
NathanQingyangXunathan.xugavinking
authored
improve some Javadocs in sql package (hibernate#9228)
* improve some Javadocs in sql package --------- Co-authored-by: nathan.xu <[email protected]> Co-authored-by: Gavin King <[email protected]>
1 parent ff99ddb commit e4cba2c

12 files changed

+21
-23
lines changed

hibernate-core/src/main/java/org/hibernate/sql/ForUpdateFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import org.hibernate.internal.util.StringHelper;
1515

1616
/**
17-
* A SQL {FOR UPDATE} clause.
17+
* A SQL {@code FOR UPDATE} clause.
1818
*
1919
* @author Gavin King
2020
*/

hibernate-core/src/main/java/org/hibernate/sql/Template.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
* should be written in the native SQL dialect of the target database,
2424
* with the following special exceptions:
2525
* <ul>
26-
* <li>any backtick-quoted identifiers, for example {@code `hello`},
26+
* <li>any backtick-quoted identifier, for example {@code `hello`},
2727
* is interpreted as a quoted identifier and re-quoted using the
2828
* {@linkplain Dialect#quote native quoted identifier syntax} of
2929
* the database, and</li>
3030
* <li>the literal identifiers {@code true} and {@code false} are
31-
* interpreted are literal boolean values, and replaced with
31+
* interpreted as literal boolean values, and replaced with
3232
* {@linkplain Dialect#toBooleanValueString dialect-specific
3333
* literal values}.
3434
* </li>

hibernate-core/src/main/java/org/hibernate/sql/ast/Clause.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ public enum Clause {
3939
SET_EXPRESSION,
4040

4141
/**
42-
* Not used in 5.x. Intended for use in 6+ as indicator
43-
* of processing predicates (where clause) that occur in a
44-
* delete
42+
* Used as indicator of processing predicates (where clause)
43+
* that occur in a delete
4544
*/
4645
DELETE,
4746
MERGE,
@@ -64,9 +63,6 @@ public enum Clause {
6463
CONFLICT,
6564
CALL,
6665

67-
/**
68-
* Again, not used in 5.x. Used in 6+
69-
*/
7066
IRRELEVANT
7167

7268
}

hibernate-core/src/main/java/org/hibernate/sql/ast/SqlAstJoinType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public enum SqlAstJoinType {
2424
RIGHT( "right " ),
2525

2626
/**
27-
* Represents a cross join (aka a cartesian product).
27+
* Represents a cross join (that is, a Cartesian product).
2828
*/
2929
CROSS( "cross " ),
3030

hibernate-core/src/main/java/org/hibernate/sql/ast/SqlAstTranslator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ public interface SqlAstTranslator<T extends JdbcOperation> extends SqlAstWalker
5757
Stack<Clause> getCurrentClauseStack();
5858

5959
/**
60-
* Not the best spot for this. Its the table names collected while walking the SQL AST.
61-
* Its ok here because the translator is consider a one-time-use. It just needs to be called
60+
* Not the best spot for this. Returns the table names collected while walking the SQL AST.
61+
* It's ok here because the translator is consider a one-time-use. It just needs to be called
6262
* after translation.
6363
*
6464
* A better option is probably to have "translation" objects that expose the affected table-names.

hibernate-core/src/main/java/org/hibernate/sql/ast/spi/AbstractSqlAstTranslator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ public abstract class AbstractSqlAstTranslator<T extends JdbcOperation> implemen
246246

247247
/**
248248
* When emulating the recursive WITH clause subclauses SEARCH and CYCLE,
249-
* we need to build a string path and some database like MySQL require that
249+
* we need to build a string path and some databases like MySQL require that
250250
* we cast the expression to a char with certain size.
251251
* To estimate the size, we need to assume a certain max recursion depth.
252252
*/

hibernate-core/src/main/java/org/hibernate/sql/ast/spi/SqlAstCreationContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
/**
1212
* The "context" in which creation of SQL AST occurs. Provides
13-
* access to generally needed when creating SQL AST nodes
13+
* access to stuff generally needed when creating SQL AST nodes
1414
*
1515
* @author Steve Ebersole
1616
*/

hibernate-core/src/main/java/org/hibernate/sql/exec/spi/JdbcLockStrategy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
public enum JdbcLockStrategy {
1313

1414
/**
15-
* Use a dialect specific check to determine how to apply locks.
15+
* Use a dialect-specific check to determine how to apply locks.
1616
*/
1717
AUTO,
1818
/**

hibernate-core/src/main/java/org/hibernate/sql/exec/spi/JdbcOperationQueryAnonBlock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
/**
1010
* An anonymous call block (sometimes called an anonymous procedure) to be executed
11-
* on the database. The format of this various by database, but it is essentially an
11+
* on the database. The format of this varies by database, but it is essentially an
1212
* unnamed procedure without OUT, INOUT or REF_CURSOR type parameters
1313
*
1414
* @author Steve Ebersole

hibernate-core/src/main/java/org/hibernate/sql/results/internal/NavigablePathMapToInitializer.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@
1515

1616
/**
1717
* This is in all practical terms a {@code Map<NavigablePath, Initializer>}
18-
* but wrapping an HashMap so to keep the client code readable as we need
18+
* but wrapping a {@code HashMap} to keep the client code readable as we need
1919
* to:
20-
* a) have a way to log all initializers
21-
* b) prevent type pollution from happening on Initializer retrieval
20+
* <ul>
21+
* <li>have a way to log all initializers</li>
22+
* <li>prevent type pollution from happening on Initializer retrieval</li>
23+
* </ul>
2224
* I also consider it good practice to only expose the minimal set of
2325
* operations the client actually needs.
2426
*/

0 commit comments

Comments
 (0)