Package org.hibernate.engine.jdbc
Class Size
java.lang.Object
org.hibernate.engine.jdbc.Size
- All Implemented Interfaces:
Serializable
Models size restrictions/requirements on a column's datatype.
- See Also:
- Implementation Note:
- Since we do not necessarily know the datatype up front, and therefore do not necessarily know
whether length or precision/scale sizing is needed, we simply account for both here. Additionally, LOB
sizes, by standard, are allowed a "multiplier",
K
(Kb),M
(Mb) orG
(Gb).
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Deprecated, for removal: This API element is subject to removal in a future version. -
Field Summary
Modifier and TypeFieldDescriptionstatic final long
static final long
static final int
static final int
static final long
-
Constructor Summary
ConstructorDescriptionSize()
Size
(Integer precision, Integer scale, Integer length, Size.LobMultiplier lobMultiplier) Deprecated, for removal: This API element is subject to removal in a future version.Size
(Integer precision, Integer scale, Long length, Size.LobMultiplier lobMultiplier) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofSize(Integer, Integer, Long)
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.getScale()
void
initialize
(Size size) static Size
length
(long length) static Size
length
(long length, Size.LobMultiplier lobMultiplier) static Size
nil()
static Size
precision
(int precision) static Size
precision
(int precision, int scale) setArrayLength
(Integer arrayLength) setLobMultiplier
(Size.LobMultiplier lobMultiplier) Deprecated, for removal: This API element is subject to removal in a future version.setPrecision
(Integer precision)
-
Field Details
-
DEFAULT_LENGTH
public static final long DEFAULT_LENGTH- See Also:
-
LONG_LENGTH
public static final long LONG_LENGTH- See Also:
-
DEFAULT_LOB_LENGTH
public static final long DEFAULT_LOB_LENGTH- See Also:
-
DEFAULT_PRECISION
public static final int DEFAULT_PRECISION- See Also:
-
DEFAULT_SCALE
public static final int DEFAULT_SCALE- See Also:
-
-
Constructor Details
-
Size
public Size() -
Size
@Deprecated(forRemoval=true) public Size(Integer precision, Integer scale, Long length, Size.LobMultiplier lobMultiplier) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofSize(Integer, Integer, Long)
Complete constructor.- Parameters:
precision
- numeric precisionscale
- numeric scalelength
- type lengthlobMultiplier
- LOB length multiplier
-
Size
@Deprecated(forRemoval=true) public Size(Integer precision, Integer scale, Integer length, Size.LobMultiplier lobMultiplier) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofSize(Integer, Integer, Long)
-
Size
-
-
Method Details
-
nil
-
precision
-
precision
-
length
-
length
-
getPrecision
-
getScale
-
getLength
-
getArrayLength
-
getLobMultiplier
Deprecated, for removal: This API element is subject to removal in a future version. -
initialize
-
setPrecision
-
setScale
-
setLength
-
setArrayLength
-
setLobMultiplier
Deprecated, for removal: This API element is subject to removal in a future version.
-
Size(Integer, Integer, Long)