HHH-18446 Added default SQL type code to LongVarbinaryJdbcType abd LongVarcharJdbcType
This commit is contained in:
parent
b5b195740b
commit
bdc0070d97
|
@ -14,14 +14,19 @@ import java.sql.Types;
|
|||
public class LongVarbinaryJdbcType extends VarbinaryJdbcType {
|
||||
public static final LongVarbinaryJdbcType INSTANCE = new LongVarbinaryJdbcType();
|
||||
|
||||
private final int jdbcTypeCode;
|
||||
private final int defaultSqlTypeCode;
|
||||
|
||||
public LongVarbinaryJdbcType() {
|
||||
this( Types.LONGVARBINARY );
|
||||
}
|
||||
|
||||
public LongVarbinaryJdbcType(int jdbcTypeCode) {
|
||||
this.jdbcTypeCode = jdbcTypeCode;
|
||||
public LongVarbinaryJdbcType(int defaultSqlTypeCode) {
|
||||
this.defaultSqlTypeCode = defaultSqlTypeCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDefaultSqlTypeCode() {
|
||||
return defaultSqlTypeCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -31,6 +36,6 @@ public class LongVarbinaryJdbcType extends VarbinaryJdbcType {
|
|||
|
||||
@Override
|
||||
public int getJdbcTypeCode() {
|
||||
return jdbcTypeCode;
|
||||
return Types.LONGVARBINARY;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
*/
|
||||
package org.hibernate.type.descriptor.jdbc;
|
||||
|
||||
import java.sql.Types;
|
||||
|
||||
import org.hibernate.type.SqlTypes;
|
||||
import org.hibernate.type.descriptor.java.JavaType;
|
||||
import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeRegistry;
|
||||
import org.hibernate.type.spi.TypeConfiguration;
|
||||
|
||||
import java.sql.Types;
|
||||
|
||||
/**
|
||||
* Descriptor for {@link Types#LONGVARCHAR LONGVARCHAR} handling.
|
||||
*
|
||||
|
@ -19,14 +19,14 @@ import org.hibernate.type.spi.TypeConfiguration;
|
|||
public class LongVarcharJdbcType extends VarcharJdbcType {
|
||||
public static final LongVarcharJdbcType INSTANCE = new LongVarcharJdbcType();
|
||||
|
||||
private final int jdbcTypeCode;
|
||||
private final int defaultSqlTypeCode;
|
||||
|
||||
public LongVarcharJdbcType() {
|
||||
this( Types.LONGVARCHAR );
|
||||
}
|
||||
|
||||
public LongVarcharJdbcType(int jdbcTypeCode) {
|
||||
this.jdbcTypeCode = jdbcTypeCode;
|
||||
public LongVarcharJdbcType(int defaultSqlTypeCode) {
|
||||
this.defaultSqlTypeCode = defaultSqlTypeCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -36,7 +36,12 @@ public class LongVarcharJdbcType extends VarcharJdbcType {
|
|||
|
||||
@Override
|
||||
public int getJdbcTypeCode() {
|
||||
return jdbcTypeCode;
|
||||
return Types.LONGVARCHAR;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDefaultSqlTypeCode() {
|
||||
return defaultSqlTypeCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue