HHH-18153 Checkstyle fixes

This commit is contained in:
Vladimír Kuruc 2024-05-23 10:27:28 +02:00 committed by Christian Beikov
parent a3f8addd51
commit 0c9fa65d22
1 changed files with 9 additions and 7 deletions

View File

@ -19,7 +19,7 @@ import org.hibernate.mapping.UniqueKey;
*/ */
public class InformixUniqueDelegate extends SkipNullableUniqueDelegate { public class InformixUniqueDelegate extends SkipNullableUniqueDelegate {
public InformixUniqueDelegate( Dialect dialect ) { public InformixUniqueDelegate(Dialect dialect) {
super( dialect ); super( dialect );
} }
@ -27,7 +27,7 @@ public class InformixUniqueDelegate extends SkipNullableUniqueDelegate {
protected void appendUniqueConstraint(StringBuilder fragment, UniqueKey uniqueKey) { protected void appendUniqueConstraint(StringBuilder fragment, UniqueKey uniqueKey) {
if ( !uniqueKey.hasNullableColumn() ) { if ( !uniqueKey.hasNullableColumn() ) {
fragment.append( ", " ); fragment.append( ", " );
fragment.append( uniqueConstraintSql(uniqueKey) ); fragment.append( uniqueConstraintSql( uniqueKey ) );
if ( uniqueKey.isNameExplicit() ) { if ( uniqueKey.isNameExplicit() ) {
fragment.append( " constraint " ).append( uniqueKey.getName() ); fragment.append( " constraint " ).append( uniqueKey.getName() );
} }
@ -35,11 +35,13 @@ public class InformixUniqueDelegate extends SkipNullableUniqueDelegate {
} }
@Override @Override
public String getAlterTableToAddUniqueKeyCommand(UniqueKey uniqueKey, Metadata metadata, public String getAlterTableToAddUniqueKeyCommand(
UniqueKey uniqueKey, Metadata metadata,
SqlStringGenerationContext context) { SqlStringGenerationContext context) {
if (uniqueKey.hasNullableColumn() || !context.isMigration()){ if ( uniqueKey.hasNullableColumn() || !context.isMigration() ) {
return ""; return "";
} else { }
else {
final String tableName = context.format( uniqueKey.getTable().getQualifiedTableName() ); final String tableName = context.format( uniqueKey.getTable().getQualifiedTableName() );
final String constraintName = dialect.quote( uniqueKey.getName() ); final String constraintName = dialect.quote( uniqueKey.getName() );
return dialect.getAlterTableString( tableName ) return dialect.getAlterTableString( tableName )