Skip to content

Commit 8fdf86e

Browse files
quaffbeikov
authored andcommitted
HHH-17951 Deprecate unused Size.LobMultiplier
1 parent eb760db commit 8fdf86e

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

hibernate-core/src/main/java/org/hibernate/engine/jdbc/Size.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
* @author Steve Ebersole
2121
*/
2222
public class Size implements Serializable {
23+
24+
@Deprecated( forRemoval = true )
2325
public enum LobMultiplier {
2426
NONE( 1 ),
2527
K( NONE.factor * 1024 ),
@@ -60,21 +62,31 @@ public Size() {
6062
* @param scale numeric scale
6163
* @param length type length
6264
* @param lobMultiplier LOB length multiplier
65+
* @deprecated in favor of {@link Size#Size(Integer, Integer, Long)}
6366
*/
67+
@Deprecated( forRemoval = true )
6468
public Size(Integer precision, Integer scale, Long length, LobMultiplier lobMultiplier) {
6569
this.precision = precision;
6670
this.scale = scale;
6771
this.length = length;
6872
this.lobMultiplier = lobMultiplier;
6973
}
7074

75+
/**
76+
* @deprecated in favor of {@link Size#Size(Integer, Integer, Long)}
77+
*/
78+
@Deprecated( forRemoval = true )
7179
public Size(Integer precision, Integer scale, Integer length, LobMultiplier lobMultiplier) {
7280
this.precision = precision;
7381
this.scale = scale;
7482
this.length = length == null ? null : length.longValue();
7583
this.lobMultiplier = lobMultiplier;
7684
}
7785

86+
public Size(Integer precision, Integer scale, Long length) {
87+
this( precision, scale, length, Size.LobMultiplier.NONE );
88+
}
89+
7890
public static Size nil() {
7991
return new Size();
8092
}
@@ -111,6 +123,7 @@ public Integer getArrayLength() {
111123
return arrayLength;
112124
}
113125

126+
@Deprecated( forRemoval = true )
114127
public LobMultiplier getLobMultiplier() {
115128
return lobMultiplier;
116129
}
@@ -141,6 +154,7 @@ public Size setArrayLength(Integer arrayLength) {
141154
return this;
142155
}
143156

157+
@Deprecated( forRemoval = true )
144158
public Size setLobMultiplier(LobMultiplier lobMultiplier) {
145159
this.lobMultiplier = lobMultiplier;
146160
return this;

hibernate-core/src/main/java/org/hibernate/type/AbstractType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public abstract class AbstractType implements Type {
2626
protected static final Size LEGACY_DICTATED_SIZE = new Size();
2727

2828
@Deprecated(forRemoval = true)
29-
protected static final Size LEGACY_DEFAULT_SIZE = new Size( 19, 2, 255L, Size.LobMultiplier.NONE ); // to match legacy behavior
29+
protected static final Size LEGACY_DEFAULT_SIZE = new Size( 19, 2, 255L ); // to match legacy behavior
3030

3131
@Override
3232
public boolean isAssociationType() {

0 commit comments

Comments
 (0)