Class DbFk.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • foreignTable

        @Deprecated
        public DbFk.Builder foreignTable​(String referencedTable)
        Deprecated.
        a "foreign key" is actually composed from the local columns of the table where it is defined (the child table); this name is wrong and will eventually be removed ─ use referencedTable(String) instead.
        Sets the name of the referenced table (parent table).
        Parameters:
        referencedTable - The referenced table name.
        Returns:
        This builder.
      • referencedTable

        public DbFk.Builder referencedTable​(String referencedTable)
        Sets the name of the referenced table (parent table).
        Parameters:
        referencedTable - The referenced table name.
        Returns:
        This builder.
      • addColumn

        public DbFk.Builder addColumn​(String... columns)
        Adds local columns (from the child table, where the foreign key is defined) to match the ones from the referenced table (parent table). These columns will compose the foreign key.
        Parameters:
        columns - The columns.
        Returns:
        This builder.
      • addColumns

        public DbFk.Builder addColumns​(Collection<String> columns)
        Adds local columns (from the child table, where the foreign key is defined) to match the ones from the referenced table (parent table). These columns will compose the foreign key.
        Parameters:
        columns - The columns.
        Returns:
        This builder.
      • addForeignColumn

        @Deprecated
        public DbFk.Builder addForeignColumn​(String... columns)
        Deprecated.
        a "foreign key" is actually composed from the local columns of the table where it is defined (the child table); this name is wrong and will eventually be removed ─ use addReferencedColumn(String...) instead.
        Adds columns from the referenced table (parent table) to match the local ones.
        Parameters:
        columns - The columns.
        Returns:
        This builder.
      • addForeignColumns

        @Deprecated
        public DbFk.Builder addForeignColumns​(Collection<String> columns)
        Deprecated.
        a "foreign key" is actually composed from the local columns of the table where it is defined (the child table); this name is wrong and will eventually be removed ─ use addReferencedColumns(Collection) instead.
        Adds columns from the referenced table (parent table) to match the local ones.
        Parameters:
        columns - The columns.
        Returns:
        This builder.
      • addReferencedColumn

        public DbFk.Builder addReferencedColumn​(String... columns)
        Adds columns from the referenced table (parent table) to match the local ones.
        Parameters:
        columns - The columns.
        Returns:
        This builder.
      • addReferencedColumns

        public DbFk.Builder addReferencedColumns​(Collection<String> columns)
        Adds columns from the referenced table (parent table) to match the local ones.
        Parameters:
        columns - The columns.
        Returns:
        This builder.
      • build

        public DbFk build()
        Description copied from interface: Builder
        Builds the final immutable instance.
        Specified by:
        build in interface Builder<DbFk>
        Returns:
        The final immutable instance.