public abstract class DbObjectBase extends Object implements DbObject
| Modifier and Type | Field and Description |
|---|---|
protected String |
comment
The comment (if set).
|
protected Database |
database
The database.
|
protected Trace |
trace
The trace module.
|
AGGREGATE, COMMENT, CONSTANT, CONSTRAINT, FUNCTION_ALIAS, INDEX, RIGHT, ROLE, SCHEMA, SEQUENCE, SETTING, TABLE_OR_VIEW, TRIGGER, USER, USER_DATATYPE| Constructor and Description |
|---|
DbObjectBase() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
checkRename()
Check if this object can be renamed.
|
ArrayList<DbObject> |
getChildren()
Get the list of dependent children (for tables, this includes indexes and
so on).
|
String |
getComment()
Get the current comment of this object.
|
abstract String |
getCreateSQL()
Build a SQL statement to re-create this object.
|
Database |
getDatabase()
Get the database.
|
abstract String |
getDropSQL()
Build a SQL statement to drop this object.
|
int |
getId()
Get the unique object id.
|
long |
getModificationId() |
String |
getName()
Get the name.
|
String |
getSQL()
Get the SQL name of this object (may be quoted).
|
protected void |
initDbObjectBase(Database db,
int objectId,
String name,
String traceModule)
Initialize some attributes of this object.
|
protected void |
invalidate()
Set the main attributes to null to make sure the object is no longer
used.
|
boolean |
isTemporary()
Check if this object is temporary (for example, a temporary table).
|
abstract void |
removeChildrenAndResources(Session session)
Remove all dependent objects and free all resources (files, blocks in
files) of this object.
|
void |
rename(String newName)
Rename the object.
|
void |
setComment(String comment)
Change the comment of this object.
|
void |
setModified()
Tell the object that is was modified.
|
protected void |
setObjectName(String name) |
void |
setTemporary(boolean temporary)
Tell this object that it is temporary or not.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCreateSQLForCopy, getTypeprotected Database database
protected Trace trace
protected String comment
protected void initDbObjectBase(Database db, int objectId, String name, String traceModule)
db - the databaseobjectId - the object idname - the nametraceModule - the trace module namepublic abstract String getCreateSQL()
getCreateSQL in interface DbObjectpublic abstract String getDropSQL()
getDropSQL in interface DbObjectpublic abstract void removeChildrenAndResources(Session session)
removeChildrenAndResources in interface DbObjectsession - the sessionpublic abstract void checkRename()
checkRename in interface DbObjectpublic void setModified()
public long getModificationId()
protected void setObjectName(String name)
public String getSQL()
DbObjectpublic ArrayList<DbObject> getChildren()
DbObjectgetChildren in interface DbObjectpublic Database getDatabase()
DbObjectgetDatabase in interface DbObjectpublic int getId()
DbObjectprotected void invalidate()
public void rename(String newName)
DbObjectpublic boolean isTemporary()
DbObjectisTemporary in interface DbObjectpublic void setTemporary(boolean temporary)
DbObjectsetTemporary in interface DbObjecttemporary - the new valuepublic void setComment(String comment)
DbObjectsetComment in interface DbObjectcomment - the new comment, or null for no commentpublic String getComment()
DbObjectgetComment in interface DbObjectCopyright © 2012 JBoss by Red Hat. All Rights Reserved.