HHH-18312 Suggested style changes

This commit is contained in:
Vladimír Kuruc 2024-07-03 12:12:51 +02:00 committed by Christian Beikov
parent 711dffa7e3
commit 1f1b86a085
4 changed files with 32 additions and 32 deletions

View File

@ -120,7 +120,7 @@ public class JsonAsStringJdbcType extends JsonJdbcType implements AdjustableJdbc
protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options)
throws SQLException {
final String json = ( (JsonAsStringJdbcType) getJdbcType() ).toString( value, getJavaType(), options );
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
st.setNString( index, json );
}
else {
@ -132,7 +132,7 @@ public class JsonAsStringJdbcType extends JsonJdbcType implements AdjustableJdbc
protected void doBind(CallableStatement st, X value, String name, WrapperOptions options)
throws SQLException {
final String json = ( (JsonAsStringJdbcType) getJdbcType() ).toString( value, getJavaType(), options );
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
st.setNString( name, json );
}
else {
@ -152,7 +152,7 @@ public class JsonAsStringJdbcType extends JsonJdbcType implements AdjustableJdbc
return new BasicExtractor<>( javaType, this ) {
@Override
protected X doExtract(ResultSet rs, int paramIndex, WrapperOptions options) throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
return fromString( rs.getNString( paramIndex ), getJavaType(), options );
}
else {
@ -163,7 +163,7 @@ public class JsonAsStringJdbcType extends JsonJdbcType implements AdjustableJdbc
@Override
protected X doExtract(CallableStatement statement, int index, WrapperOptions options)
throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
return fromString( statement.getNString( index ), getJavaType(), options );
}
else {
@ -174,7 +174,7 @@ public class JsonAsStringJdbcType extends JsonJdbcType implements AdjustableJdbc
@Override
protected X doExtract(CallableStatement statement, String name, WrapperOptions options)
throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
return fromString( statement.getNString( name ), getJavaType(), options );
}
else {

View File

@ -46,7 +46,7 @@ public abstract class NClobJdbcType implements JdbcType {
return new BasicExtractor<>( javaType, this ) {
@Override
protected X doExtract(ResultSet rs, int paramIndex, WrapperOptions options) throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
return javaType.wrap( rs.getNClob( paramIndex ), options );
}
else {
@ -57,7 +57,7 @@ public abstract class NClobJdbcType implements JdbcType {
@Override
protected X doExtract(CallableStatement statement, int index, WrapperOptions options)
throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
return javaType.wrap( statement.getNClob( index ), options );
}
else {
@ -68,7 +68,7 @@ public abstract class NClobJdbcType implements JdbcType {
@Override
protected X doExtract(CallableStatement statement, String name, WrapperOptions options)
throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
return javaType.wrap( statement.getNClob( name ), options );
}
else {
@ -145,7 +145,7 @@ public abstract class NClobJdbcType implements JdbcType {
@Override
protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options)
throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
st.setNString( index, javaType.unwrap( value, String.class, options ) );
}
else {
@ -156,7 +156,7 @@ public abstract class NClobJdbcType implements JdbcType {
@Override
protected void doBind(CallableStatement st, X value, String name, WrapperOptions options)
throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
st.setNString( name, javaType.unwrap( value, String.class, options ) );
}
else {
@ -170,7 +170,7 @@ public abstract class NClobJdbcType implements JdbcType {
return new BasicExtractor<>( javaType, this ) {
@Override
protected X doExtract(ResultSet rs, int paramIndex, WrapperOptions options) throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
return javaType.wrap( rs.getNString( paramIndex ), options );
}
else {
@ -181,7 +181,7 @@ public abstract class NClobJdbcType implements JdbcType {
@Override
protected X doExtract(CallableStatement statement, int index, WrapperOptions options)
throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
return javaType.wrap( statement.getNString( index ), options );
}
else {
@ -192,7 +192,7 @@ public abstract class NClobJdbcType implements JdbcType {
@Override
protected X doExtract(CallableStatement statement, String name, WrapperOptions options)
throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
return javaType.wrap( statement.getNString( name ), options );
}
else {
@ -220,7 +220,7 @@ public abstract class NClobJdbcType implements JdbcType {
@Override
protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options)
throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
st.setNClob( index, javaType.unwrap( value, NClob.class, options ) );
}
else {
@ -231,7 +231,7 @@ public abstract class NClobJdbcType implements JdbcType {
@Override
protected void doBind(CallableStatement st, X value, String name, WrapperOptions options)
throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
st.setNClob( name, javaType.unwrap( value, NClob.class, options ) );
}
else {
@ -260,7 +260,7 @@ public abstract class NClobJdbcType implements JdbcType {
protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options)
throws SQLException {
final CharacterStream characterStream = javaType.unwrap( value, CharacterStream.class, options );
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
st.setNCharacterStream( index, characterStream.asReader(), characterStream.getLength() );
}
else {
@ -272,7 +272,7 @@ public abstract class NClobJdbcType implements JdbcType {
protected void doBind(CallableStatement st, X value, String name, WrapperOptions options)
throws SQLException {
final CharacterStream characterStream = javaType.unwrap( value, CharacterStream.class, options );
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
st.setNCharacterStream( name, characterStream.asReader(), characterStream.getLength() );
}
else {
@ -300,7 +300,7 @@ public abstract class NClobJdbcType implements JdbcType {
@Override
protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options)
throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
st.setNString( index, javaType.unwrap( value, String.class, options ) );
}
else {
@ -311,7 +311,7 @@ public abstract class NClobJdbcType implements JdbcType {
@Override
protected void doBind(CallableStatement st, X value, String name, WrapperOptions options)
throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
st.setNString( name, javaType.unwrap( value, String.class, options ) );
}
else {
@ -326,7 +326,7 @@ public abstract class NClobJdbcType implements JdbcType {
return new BasicExtractor<>( javaType, this ) {
@Override
protected X doExtract(ResultSet rs, int paramIndex, WrapperOptions options) throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
return javaType.wrap( rs.getNString( paramIndex ), options );
}
else {
@ -337,7 +337,7 @@ public abstract class NClobJdbcType implements JdbcType {
@Override
protected X doExtract(CallableStatement statement, int index, WrapperOptions options)
throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
return javaType.wrap( statement.getNString( index ), options );
}
else {
@ -348,7 +348,7 @@ public abstract class NClobJdbcType implements JdbcType {
@Override
protected X doExtract(CallableStatement statement, String name, WrapperOptions options)
throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
return javaType.wrap( statement.getNString( name ), options );
}
else {

View File

@ -106,7 +106,7 @@ public class NVarcharJdbcType implements AdjustableJdbcType {
return new BasicBinder<>( javaType, this ) {
@Override
protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
st.setNString( index, javaType.unwrap( value, String.class, options ) );
}
else {
@ -117,7 +117,7 @@ public class NVarcharJdbcType implements AdjustableJdbcType {
@Override
protected void doBind(CallableStatement st, X value, String name, WrapperOptions options)
throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
st.setNString( name, javaType.unwrap( value, String.class, options ) );
}
else {
@ -132,7 +132,7 @@ public class NVarcharJdbcType implements AdjustableJdbcType {
return new BasicExtractor<>( javaType, this ) {
@Override
protected X doExtract(ResultSet rs, int paramIndex, WrapperOptions options) throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
return javaType.wrap( rs.getNString( paramIndex ), options );
}
else {
@ -142,7 +142,7 @@ public class NVarcharJdbcType implements AdjustableJdbcType {
@Override
protected X doExtract(CallableStatement statement, int index, WrapperOptions options) throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
return javaType.wrap( statement.getNString( index ), options );
}
else {
@ -152,7 +152,7 @@ public class NVarcharJdbcType implements AdjustableJdbcType {
@Override
protected X doExtract(CallableStatement statement, String name, WrapperOptions options) throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
return javaType.wrap( statement.getNString( name ), options );
}
else {

View File

@ -130,7 +130,7 @@ public class XmlAsStringJdbcType extends XmlJdbcType implements AdjustableJdbcTy
getJavaType(),
options
);
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
st.setNString( index, xml );
}
else {
@ -146,7 +146,7 @@ public class XmlAsStringJdbcType extends XmlJdbcType implements AdjustableJdbcTy
getJavaType(),
options
);
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
st.setNString( name, xml );
}
else {
@ -189,7 +189,7 @@ public class XmlAsStringJdbcType extends XmlJdbcType implements AdjustableJdbcTy
@Override
protected X doExtract(ResultSet rs, int paramIndex, WrapperOptions options) throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
return getObject( rs.getNString( paramIndex ), options );
}
else {
@ -200,7 +200,7 @@ public class XmlAsStringJdbcType extends XmlJdbcType implements AdjustableJdbcTy
@Override
protected X doExtract(CallableStatement statement, int index, WrapperOptions options)
throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
return getObject( statement.getNString( index ), options );
}
else {
@ -211,7 +211,7 @@ public class XmlAsStringJdbcType extends XmlJdbcType implements AdjustableJdbcTy
@Override
protected X doExtract(CallableStatement statement, String name, WrapperOptions options)
throws SQLException {
if (options.getDialect().supportsNationalizedMethods()) {
if ( options.getDialect().supportsNationalizedMethods() ) {
return getObject( statement.getNString( name ), options );
}
else {