Class TableModel<T extends TableModel<?>>

java.lang.Object
io.github.torand.fastersql.model.Table
io.github.torand.fastersql.model.TableModel<T>
Type Parameters:
T - the concrete table model class with columns.
All Implemented Interfaces:
Relation, Sql

public abstract class TableModel<T extends TableModel<?>> extends Table
Models a database table.
  • Constructor Details

    • TableModel

      protected TableModel(String name, String alias, TableModel.TableModelFactory<T> instanceFactory)
      Creates a representation (model) of a database table.
      Parameters:
      name - the table name.
      alias - the table alias.
      instanceFactory - the table model instance factory.
  • Method Details

    • column

      public Column column(String name)
      Creates a model of a column belonging to this table.
      Parameters:
      name - the column name.
      Returns:
      the column model.
    • as

      public T as(String alias)
      Description copied from interface: Relation
      Specifies the table alias name of this relation.
      Specified by:
      as in interface Relation
      Overrides:
      as in class Table
      Parameters:
      alias - the table alias name.
      Returns:
      the modified relation.