# DbObject A database object such as a table, an index, or a user.
Methods
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
String | getComment() Get the current comment of this object.
String | getComment() Get the current comment of this object. Returns: the comment, or null if not set
String | getCreateSQL() Construct the original CREATE ...
String | getCreateSQL() Construct the original 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
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
String | getName() Get the name.
String | getName() Get the name. Returns: the name
String | getSQL(boolean alwaysQuote) Get the SQL name of this object (may be quoted).
String | getSQL(boolean alwaysQuote) Get the SQL name of this object (may be quoted). Parameters: alwaysQuote - quote all identifiers Returns: the SQL name
StringBuilder | getSQL(StringBuilder builder, boolean alwaysQuote) Appends the SQL name of this object (may be quoted) to the specified builder.
StringBuilder | getSQL(StringBuilder builder, boolean alwaysQuote) Appends the SQL name of this object (may be quoted) to the specified builder. Parameters: builder - string builder alwaysQuote - quote all identifiers Returns: the specified string builder
int | getType() Get the object type.
int | getType() Get the object type. Returns: the object type
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
void | removeChildrenAndResources(Session session) Delete all dependent children objects and resources of this object.
void | removeChildrenAndResources(Session 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 | setComment(String comment) Change the comment of this object.
void | setComment(String comment) Change the comment of this object. Parameters: comment - the new comment, or null for no comment
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
Fields
static int | AGGREGATE = 14
static int | COMMENT = 13
static int | CONSTANT = 11
static int | CONSTRAINT = 5
static int | DOMAIN = 12
static int | FUNCTION_ALIAS = 9
static int | INDEX = 1
static int | RIGHT = 8
static int | ROLE = 7
static int | SCHEMA = 10
static int | SEQUENCE = 3
static int | SETTING = 6
static int | SYNONYM = 15
static int | TABLE_OR_VIEW = 0
static int | TRIGGER = 4
static int | USER = 2
#### TABLE_OR_VIEW = 0 The object is of the type table or view. #### INDEX = 1 This object is an index. #### SCHEMA = 10 This object is a schema. #### CONSTANT = 11 This object is a constant. #### DOMAIN = 12 This object is a domain. #### COMMENT = 13 This object is a comment. #### AGGREGATE = 14 This object is a user-defined aggregate function. #### SYNONYM = 15 This object is a synonym. #### USER = 2 This object is a user. #### SEQUENCE = 3 This object is a sequence. #### TRIGGER = 4 This object is a trigger. #### CONSTRAINT = 5 This object is a constraint (check constraint, unique constraint, or referential constraint). #### SETTING = 6 This object is a setting. #### ROLE = 7 This object is a role. #### RIGHT = 8 This object is a right. #### FUNCTION_ALIAS = 9 This object is an alias for a Java function.