File tree Expand file tree Collapse file tree 3 files changed +25
-15
lines changed
hibernate-core/src/main/java/org/hibernate/type/descriptor/jdbc Expand file tree Collapse file tree 3 files changed +25
-15
lines changed Original file line number Diff line number Diff line change 1414public class LongVarbinaryJdbcType extends VarbinaryJdbcType {
1515 public static final LongVarbinaryJdbcType INSTANCE = new LongVarbinaryJdbcType ();
1616
17- private final int jdbcTypeCode ;
17+ private final int defaultSqlTypeCode ;
1818
1919 public LongVarbinaryJdbcType () {
20- this (Types .LONGVARBINARY );
20+ this ( Types .LONGVARBINARY );
2121 }
2222
23- public LongVarbinaryJdbcType (int jdbcTypeCode ) {
24- this .jdbcTypeCode = jdbcTypeCode ;
23+ public LongVarbinaryJdbcType (int defaultSqlTypeCode ) {
24+ this .defaultSqlTypeCode = defaultSqlTypeCode ;
25+ }
26+
27+ @ Override
28+ public int getDefaultSqlTypeCode () {
29+ return defaultSqlTypeCode ;
2530 }
2631
2732 @ Override
@@ -31,6 +36,6 @@ public String toString() {
3136
3237 @ Override
3338 public int getJdbcTypeCode () {
34- return jdbcTypeCode ;
39+ return Types . LONGVARBINARY ;
3540 }
3641}
Original file line number Diff line number Diff line change 44 */
55package org .hibernate .type .descriptor .jdbc ;
66
7- import java .sql .Types ;
8-
97import org .hibernate .type .SqlTypes ;
108import org .hibernate .type .descriptor .java .JavaType ;
119import org .hibernate .type .descriptor .jdbc .spi .JdbcTypeRegistry ;
1210import org .hibernate .type .spi .TypeConfiguration ;
1311
12+ import java .sql .Types ;
13+
1414/**
1515 * Descriptor for {@link Types#LONGVARCHAR LONGVARCHAR} handling.
1616 *
1919public class LongVarcharJdbcType extends VarcharJdbcType {
2020 public static final LongVarcharJdbcType INSTANCE = new LongVarcharJdbcType ();
2121
22- private final int jdbcTypeCode ;
22+ private final int defaultSqlTypeCode ;
2323
2424 public LongVarcharJdbcType () {
25- this (Types .LONGVARCHAR );
25+ this ( Types .LONGVARCHAR );
2626 }
2727
28- public LongVarcharJdbcType (int jdbcTypeCode ) {
29- this .jdbcTypeCode = jdbcTypeCode ;
28+ public LongVarcharJdbcType (int defaultSqlTypeCode ) {
29+ this .defaultSqlTypeCode = defaultSqlTypeCode ;
3030 }
3131
3232 @ Override
@@ -36,7 +36,12 @@ public String toString() {
3636
3737 @ Override
3838 public int getJdbcTypeCode () {
39- return jdbcTypeCode ;
39+ return Types .LONGVARCHAR ;
40+ }
41+
42+ @ Override
43+ public int getDefaultSqlTypeCode () {
44+ return defaultSqlTypeCode ;
4045 }
4146
4247 @ Override
Original file line number Diff line number Diff line change @@ -85,12 +85,12 @@ public static void prime(BaselineTarget target) {
8585 target .addDescriptor ( BinaryJdbcType .INSTANCE );
8686 target .addDescriptor ( VarbinaryJdbcType .INSTANCE );
8787 target .addDescriptor ( LongVarbinaryJdbcType .INSTANCE );
88- target .addDescriptor ( new LongVarbinaryJdbcType (SqlTypes .LONG32VARBINARY ) );
88+ target .addDescriptor ( new LongVarbinaryJdbcType ( SqlTypes .LONG32VARBINARY ) );
8989
9090 target .addDescriptor ( CharJdbcType .INSTANCE );
9191 target .addDescriptor ( VarcharJdbcType .INSTANCE );
9292 target .addDescriptor ( LongVarcharJdbcType .INSTANCE );
93- target .addDescriptor ( new LongVarcharJdbcType (SqlTypes .LONG32VARCHAR ) );
93+ target .addDescriptor ( new LongVarcharJdbcType ( SqlTypes .LONG32VARCHAR ) );
9494
9595 target .addDescriptor ( BlobJdbcType .DEFAULT );
9696 target .addDescriptor ( ClobJdbcType .DEFAULT );
@@ -101,7 +101,7 @@ public static void prime(BaselineTarget target) {
101101 target .addDescriptor ( Types .NVARCHAR , VarcharJdbcType .INSTANCE );
102102 target .addDescriptor ( Types .LONGNVARCHAR , LongVarcharJdbcType .INSTANCE );
103103 target .addDescriptor ( Types .NCLOB , ClobJdbcType .DEFAULT );
104- target .addDescriptor ( new LongVarcharJdbcType (SqlTypes .LONG32NVARCHAR ) );
104+ target .addDescriptor ( new LongVarcharJdbcType ( SqlTypes .LONG32NVARCHAR ) );
105105
106106 target .addDescriptor ( RowIdJdbcType .INSTANCE );
107107 }
You can’t perform that action at this time.
0 commit comments