public class TableSynonym extends SchemaObjectBase
comment, database, traceAGGREGATE, COMMENT, CONSTANT, CONSTRAINT, FUNCTION_ALIAS, INDEX, RIGHT, ROLE, SCHEMA, SEQUENCE, SETTING, SYNONYM, TABLE_OR_VIEW, TRIGGER, USER, USER_DATATYPE| Constructor and Description |
|---|
TableSynonym(CreateSynonymData data) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkRename()
Check if this object can be renamed.
|
java.lang.String |
getCreateSQL()
Build a SQL statement to re-create this object.
|
java.lang.String |
getCreateSQLForCopy(Table table,
java.lang.String quotedName)
Build a SQL statement to re-create the object, or to create a copy of the
object with a different name or referencing a different table
|
java.lang.String |
getDropSQL()
Build a SQL statement to drop this object.
|
Table |
getSynonymFor() |
java.lang.String |
getSynonymForName() |
Schema |
getSynonymForSchema() |
int |
getType()
Get the object type.
|
boolean |
isInvalid() |
void |
removeChildrenAndResources(Session session)
Remove all dependent objects and free all resources (files, blocks in
files) of this object.
|
void |
rename(java.lang.String newName)
Rename the object.
|
void |
updateData(CreateSynonymData data)
Set (update) the data.
|
void |
updateSynonymFor()
Update the table that this is a synonym for, to know about this synonym.
|
getSchema, getSQL, initSchemaObjectBase, isHiddengetChildren, getComment, getDatabase, getId, getModificationId, getName, initDbObjectBase, invalidate, isTemporary, isValid, setComment, setModified, setObjectName, setTemporary, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetChildren, getComment, getDatabase, getId, getName, isTemporary, setComment, setTemporarypublic TableSynonym(CreateSynonymData data)
public Table getSynonymFor()
public void updateData(CreateSynonymData data)
data - the new datapublic int getType()
DbObjectpublic java.lang.String getCreateSQLForCopy(Table table, java.lang.String quotedName)
DbObjecttable - the new tablequotedName - the quoted namepublic void rename(java.lang.String newName)
DbObjectrename in interface DbObjectrename in class DbObjectBasenewName - the new namepublic void removeChildrenAndResources(Session session)
DbObjectBaseremoveChildrenAndResources in interface DbObjectremoveChildrenAndResources in class DbObjectBasesession - the sessionpublic java.lang.String getCreateSQL()
DbObjectBasegetCreateSQL in interface DbObjectgetCreateSQL in class DbObjectBasepublic java.lang.String getDropSQL()
DbObjectBasegetDropSQL in interface DbObjectgetDropSQL in class DbObjectBasepublic void checkRename()
DbObjectBasecheckRename in interface DbObjectcheckRename in class DbObjectBasepublic java.lang.String getSynonymForName()
public Schema getSynonymForSchema()
public boolean isInvalid()
public void updateSynonymFor()