Class Size

  • All Implemented Interfaces:

    public class Size
    extends java.lang.Object
    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
    • Constructor Detail

      • Size

        public Size()
      • Size

        public Size​(int precision,
                    int scale,
                    long length,
                    Size.LobMultiplier lobMultiplier)
        Complete constructor.
        precision - numeric precision
        scale - numeric scale
        length - type length
        lobMultiplier - LOB length multiplier
    • Method Detail

      • precision

        public static Size precision​(int precision)
      • precision

        public static Size precision​(int precision,
                                     int scale)
      • length

        public static Size length​(long length)
      • getPrecision

        public int getPrecision()
      • getScale

        public int getScale()
      • getLength

        public long getLength()
      • initialize

        public void initialize​(Size size)
      • setPrecision

        public void setPrecision​(int precision)
      • setScale

        public void setScale​(int scale)
      • setLength

        public void setLength​(long length)