Class ColumnDefBuilder

  • Direct Known Subclasses:
    RowType.Builder, RowTypeBuilder

    public class ColumnDefBuilder
    extends Object
    Builder pattern to make it easy to add column definitions to an object (e.g. table, type etc)
    • Constructor Detail

      • ColumnDefBuilder

        public ColumnDefBuilder()
    • Method Detail

      • checkColumnAlreadyExists

        public void checkColumnAlreadyExists​(ColumnDef cd,
                                             String columnName)
      • builder

        public static ColumnDefBuilder builder()
        Factory function to create a new instance of this builder
        Returns:
      • addVarcharColumn

        public ColumnDefBuilder addVarcharColumn​(String columnName,
                                                 int size,
                                                 boolean nullable)
      • addCharColumn

        public ColumnDefBuilder addCharColumn​(String columnName,
                                              int size,
                                              boolean nullable)
        Add char (fixed-width) column
        Parameters:
        columnName -
        size -
        nullable -
        Returns:
      • addBlobColumn

        public ColumnDefBuilder addBlobColumn​(String columnName,
                                              long size,
                                              int inlineSize,
                                              boolean nullable)
      • checkColumns

        protected void checkColumns​(String[] columns)
        Check each of the columns in the given array are valid column names
        Parameters:
        columns -
      • checkColumns

        protected void checkColumns​(Collection<String> columns)
        Check each of the columns in the given array are valid column names
        Parameters:
        columns -
      • buildColumns

        public List<ColumnBase> buildColumns()
        Create the columns for the table based on the definitions that have been added
        Returns: