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 class LongVarbinaryJdbcType extends VarbinaryJdbcType {
|
||||||
public static final LongVarbinaryJdbcType INSTANCE = new LongVarbinaryJdbcType();
|
public static final LongVarbinaryJdbcType INSTANCE = new LongVarbinaryJdbcType();
|
||||||
|
|
||||||
private final int jdbcTypeCode;
|
private final int defaultSqlTypeCode;
|
||||||
|
|
||||||
public LongVarbinaryJdbcType() {
|
public LongVarbinaryJdbcType() {
|
||||||
this( Types.LONGVARBINARY );
|
this( Types.LONGVARBINARY );
|
||||||
}
|
}
|
||||||
|
|
||||||
public LongVarbinaryJdbcType(int jdbcTypeCode) {
|
public LongVarbinaryJdbcType(int defaultSqlTypeCode) {
|
||||||
this.jdbcTypeCode = jdbcTypeCode;
|
this.defaultSqlTypeCode = defaultSqlTypeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getDefaultSqlTypeCode() {
|
||||||
|
return defaultSqlTypeCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -31,6 +36,6 @@ public class LongVarbinaryJdbcType extends VarbinaryJdbcType {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getJdbcTypeCode() {
|
public int getJdbcTypeCode() {
|
||||||
return jdbcTypeCode;
|
return Types.LONGVARBINARY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.type.descriptor.jdbc;
|
package org.hibernate.type.descriptor.jdbc;
|
||||||
|
|
||||||
import java.sql.Types;
|
|
||||||
|
|
||||||
import org.hibernate.type.SqlTypes;
|
import org.hibernate.type.SqlTypes;
|
||||||
import org.hibernate.type.descriptor.java.JavaType;
|
import org.hibernate.type.descriptor.java.JavaType;
|
||||||
import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeRegistry;
|
import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeRegistry;
|
||||||
import org.hibernate.type.spi.TypeConfiguration;
|
import org.hibernate.type.spi.TypeConfiguration;
|
||||||
|
|
||||||
|
import java.sql.Types;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Descriptor for {@link Types#LONGVARCHAR LONGVARCHAR} handling.
|
* Descriptor for {@link Types#LONGVARCHAR LONGVARCHAR} handling.
|
||||||
*
|
*
|
||||||
|
@ -19,14 +19,14 @@ import org.hibernate.type.spi.TypeConfiguration;
|
||||||
public class LongVarcharJdbcType extends VarcharJdbcType {
|
public class LongVarcharJdbcType extends VarcharJdbcType {
|
||||||
public static final LongVarcharJdbcType INSTANCE = new LongVarcharJdbcType();
|
public static final LongVarcharJdbcType INSTANCE = new LongVarcharJdbcType();
|
||||||
|
|
||||||
private final int jdbcTypeCode;
|
private final int defaultSqlTypeCode;
|
||||||
|
|
||||||
public LongVarcharJdbcType() {
|
public LongVarcharJdbcType() {
|
||||||
this( Types.LONGVARCHAR );
|
this( Types.LONGVARCHAR );
|
||||||
}
|
}
|
||||||
|
|
||||||
public LongVarcharJdbcType(int jdbcTypeCode) {
|
public LongVarcharJdbcType(int defaultSqlTypeCode) {
|
||||||
this.jdbcTypeCode = jdbcTypeCode;
|
this.defaultSqlTypeCode = defaultSqlTypeCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -36,7 +36,12 @@ public class LongVarcharJdbcType extends VarcharJdbcType {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getJdbcTypeCode() {
|
public int getJdbcTypeCode() {
|
||||||
return jdbcTypeCode;
|
return Types.LONGVARCHAR;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getDefaultSqlTypeCode() {
|
||||||
|
return defaultSqlTypeCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue