public class TableMetaDataImpl extends Object implements TableMetaData
ColumnMetaData
TableMetaData.TableRole
Constructor and Description |
---|
TableMetaDataImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addColumn(ColumnMetaData column)
Adds normal column.
|
void |
addPrimaryKey(ColumnMetaData column)
Adds primary key column.
|
Map<String,ColumnMetaData> |
getColumns()
Returns map of column meta data, keyed by the column label (the alias if provided in the query, otherwise the name).
|
String |
getDatabaseName()
Returns database name.
|
List<ColumnMetaData> |
getPrimaryKeys()
Returns ordered list of columns that are primary keys.
|
String |
getQualifiedTableName()
Returns fully qualified table name in database-specific form for use in SQL statements.
|
String |
getRowAlias()
Returns row alias.
|
String |
getRowSetAlias()
Returns row set alias.
|
String |
getTableAlias()
Deprecated.
As of 0.8.11 use
getRowAlias() |
String |
getTableName()
Returns table name.
|
TableMetaData.TableRole |
getTableRole()
Returns role of table in the SQL Resource.
|
boolean |
isChild()
Returns true if the SQL Resource role is child.
|
boolean |
isParent()
Returns true if the SQL Resource role is parent.
|
void |
setAliases(String alias,
String rowAlias,
String rowSetAlias)
Sets all the row and row set aliases.
|
void |
setAttributes(String tableName,
String qualifedTableName,
String databaseName,
TableMetaData.TableRole tableRole)
Sets attributes.
|
void |
setTableAlias(String tableAlias)
Deprecated.
As of 0.8.11 use
setAliases(String, String, String) |
public void addColumn(ColumnMetaData column)
TableMetaData
addColumn
in interface TableMetaData
public void addPrimaryKey(ColumnMetaData column)
TableMetaData
addPrimaryKey
in interface TableMetaData
public Map<String,ColumnMetaData> getColumns()
TableMetaData
getColumns
in interface TableMetaData
public String getDatabaseName()
TableMetaData
getDatabaseName
in interface TableMetaData
public List<ColumnMetaData> getPrimaryKeys()
TableMetaData
getPrimaryKeys
in interface TableMetaData
public String getQualifiedTableName()
TableMetaData
database.table
, for example sakila.film
. PostgreSQL uses the form
database.schema.table
, for example sakila.public.film
.getQualifiedTableName
in interface TableMetaData
public String getRowAlias()
TableMetaData
getRowAlias
in interface TableMetaData
public String getRowSetAlias()
TableMetaData
getRowSetAlias
in interface TableMetaData
@Deprecated public String getTableAlias()
getRowAlias()
getTableAlias
in interface TableMetaData
public String getTableName()
TableMetaData
getTableName
in interface TableMetaData
public TableMetaData.TableRole getTableRole()
TableMetaData
getTableRole
in interface TableMetaData
public boolean isChild()
TableMetaData
isChild
in interface TableMetaData
public boolean isParent()
TableMetaData
isParent
in interface TableMetaData
public void setAttributes(String tableName, String qualifedTableName, String databaseName, TableMetaData.TableRole tableRole)
TableMetaData
setAttributes
in interface TableMetaData
public void setAliases(String alias, String rowAlias, String rowSetAlias)
TableMetaData
setAliases
in interface TableMetaData
@Deprecated public void setTableAlias(String tableAlias)
setAliases(String, String, String)
TableMetaData
setTableAlias
in interface TableMetaData
Copyright © 2011-2018 restSQL Project Contributors