public class Table extends Object implements IReplicable<Table>, IMergeable<Table>, IResetableExtended
| Constructor and Description |
|---|
Table() |
| Modifier and Type | Method and Description |
|---|---|
Table |
add(Column column)
Add a column.
|
Table |
copy()
A clone of the object.
|
protected String |
createAlias(String prefix,
String suffix)
Get an alias with prefix and suffix.
|
String |
getAlias()
Get the alias.
|
Column |
getAlias(String alias)
Get a column by its alias.
|
Map<String,Column> |
getAliasToColumns()
Get the alias mapping.
|
List<Column> |
getColumns()
Get the columns.
|
List<Column> |
getKeys()
Get the columns which are keys.
|
String |
getName()
Get the name.
|
Column |
getName(String name)
Get the column by its name.
|
Map<String,Column> |
getNamesToColumns()
Get the name mapping.
|
Schema |
getParent()
Get the schema.
|
List<Column> |
getReferences()
Get the columns which are references.
|
List<Column> |
getVirtual()
Get the columns which are references.
|
void |
initialize(IContext context) |
void |
merge(Table other)
Merge two objects.
|
Table |
setAlias(String alias)
Set table alias.
|
void |
setAliasToColumns(Map<String,Column> aliasToColumns)
Set the alias mapping.
|
Table |
setColumns(List<Column> columns)
Set the columns.
|
Table |
setName(String name)
Set the name.
|
void |
setNamesToColumns(Map<String,Column> namesToColumns)
Set the name mapping.
|
Table |
setParent(Schema parent)
Set the schema.
|
public Schema getParent()
public Table setParent(Schema parent)
parent - The schema.public String getAlias()
public Table setAlias(String alias)
alias - The alias.public String getName()
public Table setName(String name)
name - The name.public Table setColumns(List<Column> columns)
columns - The columns.public Table add(Column column) throws SchemaException
column - A column.SchemaException - On repetition errors.protected String createAlias(String prefix, String suffix)
prefix - A prefix.suffix - A suffix.public Column getAlias(String alias)
alias - The alias.public Column getName(String name)
name - The name.public Map<String,Column> getAliasToColumns()
public void setAliasToColumns(Map<String,Column> aliasToColumns)
aliasToColumns - A new mapping.public Map<String,Column> getNamesToColumns()
public void setNamesToColumns(Map<String,Column> namesToColumns)
namesToColumns - A new mapping.public List<Column> getReferences()
public List<Column> getVirtual()
public Table copy() throws ReplicableException
IReplicablecopy in interface IReplicable<Table>ReplicableException - On replication errors.public void merge(Table other) throws MergeableException
IMergeablemerge in interface IMergeable<Table>other - The object to be merged.MergeableException - On merge error.public void initialize(IContext context)
initialize in interface IResetableExtendedCopyright © 2017. All rights reserved.