org.hibernate.metamodel.relational
Class Size
java.lang.Object
org.hibernate.metamodel.relational.Size
- All Implemented Interfaces:
- Serializable
public class Size
- extends Object
- implements Serializable
Models size restrictions/requirements on a column's datatype.
IMPL 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
definitions, by standard, are allowed a "multiplier" consisting of 'K' (Kb), 'M' (Mb) or 'G' (Gb).
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_LENGTH
public static final int DEFAULT_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
Size
public Size()
Size
public Size(int precision,
int scale,
long length,
Size.LobMultiplier lobMultiplier)
- Complete constructor.
- Parameters:
precision
- numeric precisionscale
- numeric scalelength
- type lengthlobMultiplier
- LOB length multiplier
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 int getPrecision()
getScale
public int getScale()
getLength
public long getLength()
getLobMultiplier
public Size.LobMultiplier getLobMultiplier()
initialize
public void initialize(Size size)
setPrecision
public void setPrecision(int precision)
setScale
public void setScale(int scale)
setLength
public void setLength(long length)
setLobMultiplier
public void setLobMultiplier(Size.LobMultiplier lobMultiplier)
Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.