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 |
()
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 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()
Get the SQL name of this object (may be quoted).
|
String |
getSQL()
Get the SQL name of this object (may be quoted).
Returns:
the SQL name
|
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 |
(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 |
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
|
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.
USER_DATATYPE
= 12
This object is a user data type (domain).
COMMENT
= 13
This object is a comment.
AGGREGATE
= 14
This object is a user-defined aggregate function.
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.