Polishing.

Added `@author` tags.
Undo the change in behaviour of getReference(IdentifierProcessing).

See #1110
Original pull request #1458
This commit is contained in:
Jens Schauder
2023-03-23 10:45:04 +01:00
parent 18eda61f15
commit 58a67ceb2a
15 changed files with 33 additions and 18 deletions

View File

@@ -32,6 +32,7 @@ import org.springframework.lang.Nullable;
* not support id generation for batch operations, this implementation falls back to performing the inserts serially.
*
* @author Chirag Tailor
* @author Kurt Niemi
* @since 2.4
*/
class IdGeneratingBatchInsertStrategy implements BatchInsertStrategy {

View File

@@ -33,6 +33,7 @@ import org.springframework.lang.Nullable;
* An {@link InsertStrategy} that expects an id to be generated from the insert.
*
* @author Chirag Tailor
* @author Kurt Niemi
* @since 2.4
*/
class IdGeneratingInsertStrategy implements InsertStrategy {
@@ -84,8 +85,7 @@ class IdGeneratingInsertStrategy implements InsertStrategy {
}
private String[] getKeyColumnNames() {
return Optional.ofNullable(idColumn)
.map(idColumn -> new String[] { idColumn.getReference() })
return Optional.ofNullable(idColumn).map(idColumn -> new String[] { idColumn.getReference() })
.orElse(new String[0]);
}
}

View File

@@ -25,6 +25,7 @@ import org.springframework.data.relational.core.sql.IdentifierProcessing;
* the value in the resultset under which other entities refer back to it.
*
* @author Jens Schauder
* @author Kurt Niemi
* @since 2.0
*/
class JdbcBackReferencePropertyValueProvider implements PropertyValueProvider<RelationalPersistentProperty> {
@@ -49,8 +50,7 @@ class JdbcBackReferencePropertyValueProvider implements PropertyValueProvider<Re
@Override
public <T> T getPropertyValue(RelationalPersistentProperty property) {
return (T) resultSet
.getObject(basePath.extendBy(property).getReverseColumnNameAlias().getReference());
return (T) resultSet.getObject(basePath.extendBy(property).getReverseColumnNameAlias().getReference());
}
public JdbcBackReferencePropertyValueProvider extendBy(RelationalPersistentProperty property) {

View File

@@ -24,6 +24,7 @@ import org.springframework.data.relational.core.sql.IdentifierProcessing;
* {@link PropertyValueProvider} obtaining values from a {@link ResultSetAccessor}.
*
* @author Jens Schauder
* @author Kurt Niemi
* @since 2.0
*/
class JdbcPropertyValueProvider implements PropertyValueProvider<RelationalPersistentProperty> {

View File

@@ -57,6 +57,7 @@ import org.springframework.util.Assert;
* @author Diego Krupitza
* @author Hari Ohm Prasath
* @author Viktor Ardelean
* @author Kurt Niemi
*/
class SqlGenerator {

View File

@@ -30,6 +30,7 @@ import org.springframework.jdbc.core.namedparam.AbstractSqlParameterSource;
* {@link SqlIdentifier} instead of {@link String} for names.
*
* @author Jens Schauder
* @author Kurt Niemi
* @since 2.0
*/
class SqlIdentifierParameterSource extends AbstractSqlParameterSource {