public class TableSynonym extends SchemaObjectBase
comment, database, trace
AGGREGATE, 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, isHidden
getChildren, getComment, getDatabase, getId, getModificationId, getName, initDbObjectBase, invalidate, isTemporary, isValid, setComment, setModified, setObjectName, setTemporary, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getChildren, getComment, getDatabase, getId, getName, isTemporary, setComment, setTemporary
public TableSynonym(CreateSynonymData data)
public Table getSynonymFor()
public void updateData(CreateSynonymData data)
data
- the new datapublic int getType()
DbObject
public java.lang.String getCreateSQLForCopy(Table table, java.lang.String quotedName)
DbObject
table
- the new tablequotedName
- the quoted namepublic void rename(java.lang.String newName)
DbObject
rename
in interface DbObject
rename
in class DbObjectBase
newName
- the new namepublic void removeChildrenAndResources(Session session)
DbObjectBase
removeChildrenAndResources
in interface DbObject
removeChildrenAndResources
in class DbObjectBase
session
- the sessionpublic java.lang.String getCreateSQL()
DbObjectBase
getCreateSQL
in interface DbObject
getCreateSQL
in class DbObjectBase
public java.lang.String getDropSQL()
DbObjectBase
getDropSQL
in interface DbObject
getDropSQL
in class DbObjectBase
public void checkRename()
DbObjectBase
checkRename
in interface DbObject
checkRename
in class DbObjectBase
public java.lang.String getSynonymForName()
public Schema getSynonymForSchema()
public boolean isInvalid()
public void updateSynonymFor()