A database object such as a table, an index, or a user.
Methods |
|
DbObject(Database db, int objectId, String name, int traceModuleId)
Initialize some attributes of this object.
|
|
DbObject(Database db, int objectId, String name, int traceModuleId)
Initialize some attributes of this object.
Parameters:
db - the database
objectId - the object id
name - the name
traceModuleId - the trace module id
|
void |
checkRename()
Check if renaming is allowed.
|
void |
checkRename()
Check if renaming is allowed. Does nothing when allowed.
|
ArrayList |
getChildren()
Get the list of dependent children (for tables, this includes indexes and
so on).
|
ArrayList |
getChildren()
Get the list of dependent children (for tables, this includes indexes and
so on).
Returns:
the list of children, or {@code null}
|
String |
()
Get the current comment of this object.
|
String |
()
Get the current comment of this object.
Returns:
the comment, or null if not set
|
String |
getCreateSQL()
Construct the CREATE ...
|
String |
getCreateSQL()
Construct the CREATE ... SQL statement for this object.
Returns:
the SQL statement
|
String |
getCreateSQLForCopy(Table table, 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
|
String |
getCreateSQLForCopy(Table table, 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
Parameters:
table - the new table
quotedName - the quoted name
Returns:
the SQL statement
|
String |
getCreateSQLForMeta()
Construct the CREATE ...
|
String |
getCreateSQLForMeta()
Construct the CREATE ... SQL statement for this object for meta table.
Returns:
the SQL statement
|
Database |
getDatabase()
Get the database.
|
Database |
getDatabase()
Get the database.
Returns:
the database
|
String |
getDropSQL()
Construct a DROP ...
|
String |
getDropSQL()
Construct a DROP ... SQL statement for this object.
Returns:
the SQL statement
|
int |
getId()
Get the unique object id.
|
int |
getId()
Get the unique object id.
Returns:
the object id
|
long |
getModificationId()
|
long |
getModificationId()
|
String |
getName()
Get the name.
|
String |
getName()
Get the name.
Returns:
the name
|
String |
getSQL(int sqlFlags)
|
String |
getSQL(int sqlFlags)
|
StringBuilder |
getSQL(StringBuilder builder, int sqlFlags)
|
StringBuilder |
getSQL(StringBuilder builder, int sqlFlags)
|
int |
getType()
Get the object type.
|
int |
getType()
Get the object type.
Returns:
the object type
|
void |
invalidate()
Set the main attributes to null to make sure the object is no longer
used.
|
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 |
isTemporary()
Check if this object is temporary (for example, a temporary table).
Returns:
true if is temporary
|
boolean |
isValid()
|
boolean |
isValid()
|
void |
removeChildrenAndResources(SessionLocal session)
Delete all dependent children objects and resources of this object.
|
void |
removeChildrenAndResources(SessionLocal session)
Delete all dependent children objects and resources of this object.
Parameters:
session - the session
|
void |
rename(String newName)
Rename the object.
|
void |
rename(String newName)
Rename the object.
Parameters:
newName - the new name
|
void |
(String comment)
Change the comment of this object.
|
void |
(String comment)
Change the comment of this object.
Parameters:
comment - the new comment, or null for no comment
|
void |
setModified()
Tell the object that is was modified.
|
void |
setModified()
Tell the object that is was modified.
|
void |
setObjectName(String name)
|
void |
setObjectName(String name)
|
void |
setTemporary(boolean temporary)
Tell this object that it is temporary or not.
|
void |
setTemporary(boolean temporary)
Tell this object that it is temporary or not.
Parameters:
temporary - the new value
|
String |
toString()
|
String |
toString()
|