Package org.hibernate.engine.jdbc
Class Size
- java.lang.Object
-
- org.hibernate.engine.jdbc.Size
-
- All Implemented Interfaces:
Serializable
public class Size extends Object implements Serializable
Models size restrictions/requirements on a column's datatype.- See Also:
- Serialized Form
- 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
Nested Classes Modifier and Type Class Description static classSize.LobMultiplierDeprecated, for removal: This API element is subject to removal in a future version.
-
Field Summary
Fields Modifier and Type Field Description static longDEFAULT_LENGTHstatic longDEFAULT_LOB_LENGTHstatic intDEFAULT_PRECISIONstatic intDEFAULT_SCALEstatic longLONG_LENGTH
-
Constructor Summary
Constructors Constructor Description Size()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(Integer precision, Integer scale, Long length)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
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description IntegergetArrayLength()LonggetLength()Size.LobMultipliergetLobMultiplier()Deprecated, for removal: This API element is subject to removal in a future version.IntegergetPrecision()IntegergetScale()voidinitialize(Size size)static Sizelength(long length)static Sizelength(long length, Size.LobMultiplier lobMultiplier)static Sizenil()static Sizeprecision(int precision)static Sizeprecision(int precision, int scale)SizesetArrayLength(Integer arrayLength)SizesetLength(Long length)SizesetLobMultiplier(Size.LobMultiplier lobMultiplier)Deprecated, for removal: This API element is subject to removal in a future version.SizesetPrecision(Integer precision)SizesetScale(Integer scale)
-
-
-
Field Detail
-
DEFAULT_LENGTH
public static final long DEFAULT_LENGTH
- See Also:
- Constant Field Values
-
LONG_LENGTH
public static final long LONG_LENGTH
- See Also:
- Constant Field Values
-
DEFAULT_LOB_LENGTH
public static final long DEFAULT_LOB_LENGTH
- See Also:
- Constant Field Values
-
DEFAULT_PRECISION
public static final int DEFAULT_PRECISION
- See Also:
- Constant Field Values
-
DEFAULT_SCALE
public static final int DEFAULT_SCALE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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)
-
-
Method Detail
-
nil
public static Size nil()
-
precision
public static Size precision(int precision)
-
precision
public static Size precision(int precision, int scale)
-
length
public static Size length(long length)
-
length
public static Size length(long length, Size.LobMultiplier lobMultiplier)
-
getPrecision
public Integer getPrecision()
-
getScale
public Integer getScale()
-
getLength
public Long getLength()
-
getArrayLength
public Integer getArrayLength()
-
getLobMultiplier
@Deprecated(forRemoval=true) public Size.LobMultiplier getLobMultiplier()
Deprecated, for removal: This API element is subject to removal in a future version.
-
initialize
public void initialize(Size size)
-
setLobMultiplier
@Deprecated(forRemoval=true) public Size setLobMultiplier(Size.LobMultiplier lobMultiplier)
Deprecated, for removal: This API element is subject to removal in a future version.
-
-