public abstract class DbObjectBase extends java.lang.Object implements DbObject
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.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, SYNONYM, 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.
|
java.util.ArrayList<DbObject> |
getChildren()
Get the list of dependent children (for tables, this includes indexes and
so on).
|
java.lang.String |
getComment()
Get the current comment of this object.
|
abstract java.lang.String |
getCreateSQL()
Build a SQL statement to re-create this object.
|
Database |
getDatabase()
Get the database.
|
abstract java.lang.String |
getDropSQL()
Build a SQL statement to drop this object.
|
int |
getId()
Get the unique object id.
|
long |
getModificationId() |
java.lang.String |
getName()
Get the name.
|
java.lang.String |
getSQL()
Get the SQL name of this object (may be quoted).
|
protected void |
initDbObjectBase(Database db,
int objectId,
java.lang.String name,
int traceModuleId)
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).
|
boolean |
isValid() |
abstract 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 |
setComment(java.lang.String comment)
Change the comment of this object.
|
void |
setModified()
Tell the object that is was modified.
|
protected void |
setObjectName(java.lang.String name) |
void |
setTemporary(boolean temporary)
Tell this object that it is temporary or not.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCreateSQLForCopy, getTypeprotected Database database
protected Trace trace
protected java.lang.String comment
protected void initDbObjectBase(Database db, int objectId, java.lang.String name, int traceModuleId)
db - the databaseobjectId - the object idname - the nametraceModuleId - the trace module idpublic abstract java.lang.String getCreateSQL()
getCreateSQL in interface DbObjectpublic abstract java.lang.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(java.lang.String name)
public java.lang.String getSQL()
DbObjectpublic java.util.ArrayList<DbObject> getChildren()
DbObjectgetChildren in interface DbObjectpublic Database getDatabase()
DbObjectgetDatabase in interface DbObjectpublic int getId()
DbObjectpublic java.lang.String getName()
DbObjectprotected void invalidate()
public final boolean isValid()
public void rename(java.lang.String newName)
DbObjectpublic boolean isTemporary()
DbObjectisTemporary in interface DbObjectpublic void setTemporary(boolean temporary)
DbObjectsetTemporary in interface DbObjecttemporary - the new valuepublic void setComment(java.lang.String comment)
DbObjectsetComment in interface DbObjectcomment - the new comment, or null for no commentpublic java.lang.String getComment()
DbObjectgetComment in interface DbObjectpublic java.lang.String toString()
toString in class java.lang.Object