Skip to content

Commit c6c8d2c

Browse files
committed
fix some warnings and wrong info in the javadoc
and slightly improve some jdoc in Dialect also deprecate an unused method with incorrect jdoc
1 parent f4d17be commit c6c8d2c

17 files changed

+95
-73
lines changed

hibernate-core/src/main/java/org/hibernate/boot/archive/scan/package-info.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@
66
*/
77

88
/**
9-
* Support for scanning {@linkplain org.hibernate.boot.archive.spi.ArchiveDescriptor archives}
9+
* Support for {@linkplain org.hibernate.boot.archive.scan.spi.Scanner scanning}
10+
* {@linkplain org.hibernate.boot.archive.spi.ArchiveDescriptor archives}
1011
* to discover managed classes and named resources.
1112
*
13+
* @see org.hibernate.boot.archive.scan.spi.Scanner
1214
* @see org.hibernate.boot.archive.scan.spi.ScanResult
15+
* @see org.hibernate.boot.archive.spi.ArchiveDescriptor
1316
*
1417
* @author Steve Ebersole
1518
*/

hibernate-core/src/main/java/org/hibernate/boot/archive/scan/spi/package-info.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@
66
*/
77

88
/**
9-
* SPI for scanning {@linkplain org.hibernate.boot.archive.spi.ArchiveDescriptor archives}
9+
* SPI for {@linkplain org.hibernate.boot.archive.scan.spi.Scanner scanning}
10+
* {@linkplain org.hibernate.boot.archive.spi.ArchiveDescriptor archives}
1011
* to discover managed classes and named resources.
1112
*
1213
* @see org.hibernate.boot.archive.scan.spi.ScanResult
14+
* @see org.hibernate.boot.archive.scan.spi.Scanner
15+
* @see org.hibernate.boot.archive.spi
1316
*
1417
* @author Steve Ebersole
1518
*/

hibernate-core/src/main/java/org/hibernate/boot/archive/spi/package-info.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66
*/
77

88
/**
9-
* Defines an SPI for {@linkplain org.hibernate.boot.archive.scan scanning}
10-
* of {@linkplain org.hibernate.boot.archive.spi.ArchiveDescriptor archives}
11-
* for discovery of managed resources.
9+
* Defines a model for
10+
* {@linkplain org.hibernate.boot.archive.spi.ArchiveDescriptor archives}
11+
* which may be {@link org.hibernate.boot.archive.scan.spi scanned}
12+
* to discover managed classes and named resources.
13+
*
14+
* @see org.hibernate.boot.archive.spi.ArchiveDescriptor
15+
* @see org.hibernate.boot.archive.scan.spi
1216
*/
1317
package org.hibernate.boot.archive.spi;

hibernate-core/src/main/java/org/hibernate/boot/model/package-info.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* This package defines the boot-time metamodel, which is an interpretation
1010
* of the domain model (entity classes, embeddable classes, and attributes)
1111
* and the mapping of these "domain model parts" to the database. It is
12-
* {@linkplain org.hibernate.boot.model.process built incrementally} from
12+
* {@linkplain org.hibernate.boot.model.process.spi built incrementally} from
1313
* {@linkplain org.hibernate.annotations annotations} and XML-based mappings.
1414
* <p>
1515
* The interfaces {@link org.hibernate.boot.model.TypeContributor} and

hibernate-core/src/main/java/org/hibernate/boot/model/source/spi/PluralAttributeMapKeySource.java

+13-20
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,12 @@
77
package org.hibernate.boot.model.source.spi;
88

99
/**
10-
* Describes source information about the key of a persistent map. At high
11-
* level this is broken down further into 2 categories:<ul>
12-
* <li>{@link PluralAttributeMapKeySourceEntityAttribute}</li>
13-
* <li>
14-
* <ul>
15-
* <li>{@link PluralAttributeMapKeySourceBasic}</li>
16-
* <li>{@link PluralAttributeMapKeySourceEmbedded}</li>
17-
* <li>{@link PluralAttributeMapKeyManyToManySource}</li>
18-
* </ul>
19-
* </li>
20-
* </ul>
21-
* <p>
22-
* {@link PluralAttributeMapKeySourceEntityAttribute} is only relevant from
23-
* annotations when using {@link jakarta.persistence.MapKey}.
10+
* Describes source information about the key of a persistent map.
2411
*
2512
* @author Steve Ebersole
13+
*
14+
* @see PluralAttributeMapKeyManyToManySource
15+
* @see PluralAttributeMapKeyManyToAnySource
2616
*/
2717
public interface PluralAttributeMapKeySource extends PluralAttributeIndexSource {
2818
enum Nature {
@@ -35,14 +25,17 @@ enum Nature {
3525
Nature getMapKeyNature();
3626

3727
/**
38-
* Is this plural attribute index source for an attribute of the referenced entity
39-
* (relevant only for one-to-many and many-to-many associations)?
40-
*
28+
* Is this plural attribute index source for an attribute of the referenced
29+
* entity (relevant only for one-to-many and many-to-many associations)?
30+
* <p>
4131
* If this method returns {@code true}, then this object can safely
42-
* be cast to {@link PluralAttributeMapKeySourceEntityAttribute}.
32+
* be cast to {@link PluralAttributeMapKeyManyToManySource}.
33+
*
34+
* @return true, if this plural attribute index source for an attribute of
35+
* the referenced entity; false, otherwise.
4336
*
44-
* @return true, if this plural attribute index source for an attribute of the referenced
45-
* entity; false, otherwise.
37+
* @deprecated no longer used, so this should be removed
4638
*/
39+
@Deprecated(since = "6.4")
4740
boolean isReferencedEntityAttribute();
4841
}

hibernate-core/src/main/java/org/hibernate/cfg/QuerySettings.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public interface QuerySettings {
131131
* By default, this is set to false, i.e. native queries will be checked for ordinal placeholders.
132132
* <p>
133133
*
134-
* @see SessionFactoryOptions#getIgnoreNativeJdbcParameters()
134+
* @see SessionFactoryOptions#getNativeJdbcParametersIgnored()
135135
*/
136136
String NATIVE_IGNORE_JDBC_PARAMETERS = "hibernate.query.native.ignore_jdbc_parameters";
137137

hibernate-core/src/main/java/org/hibernate/collection/spi/CollectionInitializerProducer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public interface CollectionInitializerProducer {
4141
* @param collectionValueKeyAssembler allows creation of a
4242
* {@link org.hibernate.sql.results.graph.DomainResult} for
4343
* either side of the collection foreign key
44-
* @deprecated Use {@link #produceInitializer(NavigablePath, PluralAttributeMapping, FetchParentAccess, LockMode, DomainResult, DomainResult, AssemblerCreationState)} instead
44+
* @deprecated Use {@link #produceInitializer(NavigablePath, PluralAttributeMapping, FetchParentAccess, LockMode, DomainResult, DomainResult, boolean, AssemblerCreationState)} instead
4545
*/
4646
@Deprecated(forRemoval = true)
4747
CollectionInitializer produceInitializer(

hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java

+40-20
Original file line numberDiff line numberDiff line change
@@ -4732,27 +4732,36 @@ public int getMaxVarbinaryCapacity() {
47324732
}
47334733

47344734
/**
4735-
* The default length for a LOB column, if LOB columns have a length in
4736-
* this dialect.
4735+
* This is the default length for a generated column of type
4736+
* {@link SqlTypes#BLOB BLOB} or {@link SqlTypes#CLOB CLOB}
4737+
* mapped to {@link Blob} or {@link Clob}, if LOB columns
4738+
* have a length in this dialect.
47374739
*
47384740
* @return {@value Size#DEFAULT_LOB_LENGTH} by default
47394741
*
47404742
* @see Length#LOB_DEFAULT
4743+
* @see org.hibernate.type.descriptor.java.BlobJavaType
4744+
* @see org.hibernate.type.descriptor.java.ClobJavaType
47414745
*/
47424746
public long getDefaultLobLength() {
47434747
return Size.DEFAULT_LOB_LENGTH;
47444748
}
47454749

47464750
/**
4747-
* This is the default precision for a generated
4748-
* column mapped to a {@link java.math.BigInteger}
4749-
* or {@link java.math.BigDecimal}.
4751+
* This is the default precision for a generated column of
4752+
* exact numeric type {@link SqlTypes#DECIMAL DECIMAL} or
4753+
* {@link SqlTypes#NUMERIC NUMERIC} mapped to a
4754+
* {@link java.math.BigInteger} or
4755+
* {@link java.math.BigDecimal}.
47504756
* <p>
47514757
* Usually returns the maximum precision of the
47524758
* database, except when there is no such maximum
47534759
* precision, or the maximum precision is very high.
47544760
*
47554761
* @return the default precision, in decimal digits
4762+
*
4763+
* @see org.hibernate.type.descriptor.java.BigDecimalJavaType
4764+
* @see org.hibernate.type.descriptor.java.BigIntegerJavaType
47564765
*/
47574766
public int getDefaultDecimalPrecision() {
47584767
//this is the maximum for Oracle, SQL Server,
@@ -4762,14 +4771,20 @@ public int getDefaultDecimalPrecision() {
47624771
}
47634772

47644773
/**
4765-
* This is the default precision for a generated
4766-
* column mapped to a {@link Timestamp} or
4767-
* {@link java.time.LocalDateTime}.
4774+
* This is the default precision for a generated column of
4775+
* type {@link SqlTypes#TIMESTAMP TIMESTAMP} mapped to a
4776+
* {@link Timestamp} or {@link java.time.LocalDateTime}.
47684777
* <p>
47694778
* Usually 6 (microseconds) or 3 (milliseconds).
47704779
*
47714780
* @return the default precision, in decimal digits,
47724781
* of the fractional seconds field
4782+
*
4783+
* @see org.hibernate.type.descriptor.java.JdbcTimestampJavaType
4784+
* @see org.hibernate.type.descriptor.java.LocalDateTimeJavaType
4785+
* @see org.hibernate.type.descriptor.java.OffsetDateTimeJavaType
4786+
* @see org.hibernate.type.descriptor.java.ZonedDateTimeJavaType
4787+
* @see org.hibernate.type.descriptor.java.InstantJavaType
47734788
*/
47744789
public int getDefaultTimestampPrecision() {
47754790
//milliseconds or microseconds is the maximum
@@ -4779,6 +4794,23 @@ public int getDefaultTimestampPrecision() {
47794794
return 6; //microseconds!
47804795
}
47814796

4797+
/**
4798+
* This is the default scale for a generated column of type
4799+
* {@link SqlTypes#INTERVAL_SECOND INTERVAL SECOND} mapped
4800+
* to a {@link Duration}.
4801+
* <p>
4802+
* Usually 9 (nanoseconds) or 6 (microseconds).
4803+
*
4804+
* @return the default scale, in decimal digits,
4805+
* of the fractional seconds field
4806+
*
4807+
* @see org.hibernate.type.descriptor.java.DurationJavaType
4808+
*/
4809+
public int getDefaultIntervalSecondScale(){
4810+
// The default scale necessary is 9 i.e. nanosecond resolution
4811+
return 9;
4812+
}
4813+
47824814
/**
47834815
* Does this dialect round a temporal when converting from a precision higher to a lower one?
47844816
*
@@ -5477,16 +5509,4 @@ public FunctionalDependencyAnalysisSupport getFunctionalDependencyAnalysisSuppor
54775509
return FunctionalDependencyAnalysisSupportImpl.NONE;
54785510
}
54795511

5480-
/**
5481-
* Resolves the default scale for a {@link SqlTypes.INTERVAL_SECOND} type code for the given column
5482-
* <p>
5483-
* Usually 9 (nanosecond) or 6 (microseconds).
5484-
*
5485-
* @return the default scale, in decimal digits,
5486-
* of the fractional seconds field
5487-
*/
5488-
public int getDefaultIntervalSecondScale(){
5489-
// The default scale necessary is 9 i.e. nanosecond resolution
5490-
return 9;
5491-
}
54925512
}

hibernate-core/src/main/java/org/hibernate/dialect/function/SqlServerConvertTruncFunction.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
import org.hibernate.type.spi.TypeConfiguration;
2121

2222
/**
23-
* Custom {@link TruncFunction} for SQL Server versions < 16 which uses the custom {@link DateTruncConvertEmulation}
23+
* Custom {@link TruncFunction} for SQL Server versions before 16,
24+
* which uses the custom {@link DateTruncConvertEmulation}
2425
*
2526
* @author Marco Belladelli
2627
*/

hibernate-core/src/main/java/org/hibernate/dialect/identity/IdentityColumnSupport.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ default boolean hasIdentityInsertKeyword() {
132132
*
133133
* @return the dialect specific GetGeneratedKeys delegate
134134
*
135-
* @deprecated Use {@link #buildGetGeneratedKeysDelegate(EntityPersister, Dialect)} instead.
135+
* @deprecated Use {@link #buildGetGeneratedKeysDelegate(EntityPersister)} instead.
136136
*/
137137
@Deprecated( forRemoval = true, since = "6.5" )
138138
default GetGeneratedKeysDelegate buildGetGeneratedKeysDelegate(
@@ -142,12 +142,12 @@ default GetGeneratedKeysDelegate buildGetGeneratedKeysDelegate(
142142
}
143143

144144
/**
145-
* The Delegate for dealing with IDENTITY columns using JDBC3 getGeneratedKeys
145+
* The delegate for dealing with {@code IDENTITY} columns using
146+
* {@link java.sql.PreparedStatement#getGeneratedKeys}.
146147
*
147148
* @param persister The persister
148-
* @param dialect The dialect against which to generate the delegate
149149
*
150-
* @return the dialect specific GetGeneratedKeys delegate
150+
* @return the dialect-specific {@link GetGeneratedKeysDelegate}
151151
*/
152152
GetGeneratedKeysDelegate buildGetGeneratedKeysDelegate(EntityPersister persister);
153153
}

hibernate-core/src/main/java/org/hibernate/engine/jdbc/mutation/package-info.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
*/
77

88
/**
9-
* Package defining support for executing mutation SQL statements produced
10-
* by the {@linkplain org.hibernate.persister persister} for an entity or
11-
* collection.
9+
* Package defining support for executing mutation SQL statements produced by an
10+
* {@linkplain org.hibernate.persister.entity.EntityPersister entity persister} or
11+
* {@linkplain org.hibernate.persister.collection.CollectionPersister collection
12+
* persister}.
1213
* <p>
13-
* The {@link org.hibernate.engine.jdbc.mutation.MutationExecutor} is
14-
* usually called by the various SQL insert, update, and delete
14+
* The {@link org.hibernate.engine.jdbc.mutation.MutationExecutor} is usually
15+
* called by the various SQL insert, update, and delete
1516
* {@linkplain org.hibernate.persister.entity.mutation.AbstractMutationCoordinator
1617
* coordinators} defined in {@link org.hibernate.persister.entity.mutation}
1718
* and {@link org.hibernate.persister.collection.mutation}.

hibernate-core/src/main/java/org/hibernate/engine/jdbc/spi/ResultSetReturn.java

-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ public interface ResultSetReturn {
2626

2727
/**
2828
* Extract the {@link ResultSet} from the {@link PreparedStatement}.
29-
* <p>
30-
* If client passes {@link CallableStatement} reference, this method calls {@link #extract(CallableStatement)}
31-
* internally. Otherwise, {@link PreparedStatement#executeQuery()} is called.
3229
*
3330
* @param statement The {@link PreparedStatement} from which to extract the {@link ResultSet}
3431
*

hibernate-core/src/main/java/org/hibernate/engine/spi/SessionImplementor.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@
5151
* </li>
5252
* </ul>
5353
*
54-
* See also {@link org.hibernate.event.spi.EventSource} which extends this interface
55-
* provides a bridge to the event generation features of {@link org.hibernate.event}.
54+
* See also {@link org.hibernate.event.spi.EventSource} which extends this interface,
55+
* providing a bridge to the event generation features of {@link org.hibernate.event.spi
56+
* org.hibernate.event}.
5657
*
5758
* @author Gavin King
5859
* @author Steve Ebersole

hibernate-core/src/main/java/org/hibernate/jpa/package-info.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@
3434
* {@linkplain org.hibernate.jpa.boot.spi.Bootstrap bootstrap} the JPA
3535
* provider, and interfaces which may be implemented to contribute extensions
3636
* during of the bootstrap process.
37-
* <li>The package {@link org.hibernate.jpa.event} implements support for JPA
38-
* {@linkplain jakarta.persistence.EntityListeners event listeners}.
37+
* <li>The package {@link org.hibernate.jpa.event.spi org.hibernate.jpa.event}
38+
* implements support for JPA {@linkplain jakarta.persistence.EntityListeners
39+
* event listeners}.
3940
* <li>The package {@link org.hibernate.jpa.spi} provides SPIs for managing cases
4041
* where Hibernate intentionally violates the JPA specification by default
4142
* (something Hibernate only does when it has a really good reason to do so).

hibernate-core/src/main/java/org/hibernate/proxy/package-info.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
* They are not part of the public API of Hibernate, and are not meant to
1313
* be used directly by typical programs which use Hibernate for persistence.
1414
*
15-
* @see org.hibernate.collection
15+
* @see org.hibernate.collection.spi
1616
*/
1717
package org.hibernate.proxy;

hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/spi/SqmMultiTableInsertStrategy.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,17 @@
1111
import org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess;
1212
import org.hibernate.query.spi.DomainQueryExecutionContext;
1313
import org.hibernate.query.sqm.internal.DomainParameterXref;
14-
import org.hibernate.query.sqm.mutation.internal.SqmMutationStrategyHelper;
1514
import org.hibernate.query.sqm.tree.insert.SqmInsertStatement;
1615

1716
/**
1817
* Pluggable strategy for defining how insertion (`INSERT`) queries should be handled when the target
1918
* entity is mapped to multiple tables via secondary tables or certain inheritance strategies or uses an
2019
* identifier generator that uses an optimizer.
21-
*
20+
* <p>
2221
* {@link #prepare} and {@link #release} allow the strategy to perform any one time preparation and cleanup.
2322
*
24-
* @apiNote See {@link SqmMutationStrategyHelper#resolveStrategy} for standard resolution of the strategy to use
25-
* for each hierarchy
23+
* @apiNote See {@link SqmMultiTableMutationStrategyProvider#createInsertStrategy} for standard resolution
24+
* of the strategy to use for each hierarchy
2625
*
2726
* @author Steve Ebersole
2827
*/

hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/spi/SqmMultiTableMutationStrategy.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess;
1212
import org.hibernate.query.spi.DomainQueryExecutionContext;
1313
import org.hibernate.query.sqm.internal.DomainParameterXref;
14-
import org.hibernate.query.sqm.mutation.internal.SqmMutationStrategyHelper;
1514
import org.hibernate.query.sqm.tree.delete.SqmDeleteStatement;
1615
import org.hibernate.query.sqm.tree.update.SqmUpdateStatement;
1716

@@ -25,8 +24,8 @@
2524
* The methods {@link #prepare} and {@link #release} allow the strategy to perform any one time
2625
* preparation and cleanup.
2726
*
28-
* @apiNote See {@link SqmMutationStrategyHelper#resolveStrategy} for standard resolution of the
29-
* strategy to use for each hierarchy.
27+
* @apiNote See {@link SqmMultiTableMutationStrategyProvider#createMutationStrategy} for standard
28+
* resolution of the strategy to use for each hierarchy.
3029
*
3130
* @author Steve Ebersole
3231
*/

0 commit comments

Comments
 (0)