Class 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) or G (Gb).
    • Constructor Detail

      • Size

        public Size()
      • Size

        public Size​(Integer precision,
                    Integer scale,
                    Long length,
                    Size.LobMultiplier lobMultiplier)
        Complete constructor.
        Parameters:
        precision - numeric precision
        scale - numeric scale
        length - type length
        lobMultiplier - LOB length multiplier
    • 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)
      • getPrecision

        public Integer getPrecision()
      • getScale

        public Integer getScale()
      • getLength

        public Long getLength()
      • getArrayLength

        public Integer getArrayLength()
      • initialize

        public void initialize​(Size size)
      • setPrecision

        public Size setPrecision​(Integer precision)
      • setLength

        public Size setLength​(Long length)
      • setArrayLength

        public Size setArrayLength​(Integer arrayLength)