Package io.github.torand.fastersql.model
Class Table<ENTITY extends Table<?>>
java.lang.Object
io.github.torand.fastersql.model.Table<ENTITY>
- Type Parameters:
ENTITY
- the concrete table class with columns.
Models a database table.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Table
(String name, TableFactory<ENTITY> tableFactory) Creates a representation (model) of a database table.protected
Table
(String name, String alias, TableFactory<ENTITY> tableFactory) Creates a representation (model) of a database table. -
Method Summary
Modifier and TypeMethodDescriptionalias()
Gets the table alias specified for this relation.Gets the column aliases referenced by this fragment.Specifies the table alias name of this relation.Creates a model of a column belonging to this table.Gets the columns referenced by this fragment.name()
Gets the table name.Gets the statement parameters introduced by this fragment.Formats object as an SQL fragment.
-
Constructor Details
-
Table
Creates a representation (model) of a database table.- Parameters:
name
- the table name.tableFactory
- the instance factory.
-
Table
Creates a representation (model) of a database table.- Parameters:
name
- the table name.alias
- the table alias.tableFactory
- the instance factory.
-
-
Method Details
-
column
Creates a model of a column belonging to this table.- Parameters:
name
- the column name.- Returns:
- the column model.
-
name
Gets the table name.- Returns:
- the table name.
-
sql
Description copied from interface:Sql
Formats object as an SQL fragment. -
params
Description copied from interface:Sql
Gets the statement parameters introduced by this fragment. -
columnRefs
Description copied from interface:Sql
Gets the columns referenced by this fragment. For validation purposes.- Specified by:
columnRefs
in interfaceSql
- Returns:
- the columns referenced by this fragment.
-
aliasRefs
Description copied from interface:Sql
Gets the column aliases referenced by this fragment. For validation purposes. -
as
Description copied from interface:Relation
Specifies the table alias name of this relation. -
alias
Description copied from interface:Relation
Gets the table alias specified for this relation.
-