public interface DbObject
Modifier and Type | Field and Description |
---|---|
static int |
AGGREGATE
This object is a user-defined aggregate function.
|
static int |
COMMENT
This object is a comment.
|
static int |
CONSTANT
This object is a constant.
|
static int |
CONSTRAINT
This object is a constraint (check constraint, unique constraint, or
referential constraint).
|
static int |
FUNCTION_ALIAS
This object is an alias for a Java function.
|
static int |
INDEX
This object is an index.
|
static int |
RIGHT
This object is a right.
|
static int |
ROLE
This object is a role.
|
static int |
SCHEMA
This object is a schema.
|
static int |
SEQUENCE
This object is a sequence.
|
static int |
SETTING
This object is a setting.
|
static int |
TABLE_OR_VIEW
The object is of the type table or view.
|
static int |
TRIGGER
This object is a trigger.
|
static int |
USER
This object is a user.
|
static int |
USER_DATATYPE
This object is a user data type (domain).
|
Modifier and Type | Method and Description |
---|---|
void |
checkRename()
Check if renaming is allowed.
|
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.
|
String |
getCreateSQL()
Construct the original CREATE ...
|
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
|
Database |
getDatabase()
Get the database.
|
String |
getDropSQL()
Construct a DROP ...
|
int |
getId()
Get the unique object id.
|
String |
getName()
Get the name.
|
String |
getSQL()
Get the SQL name of this object (may be quoted).
|
int |
getType()
Get the object type.
|
boolean |
isTemporary()
Check if this object is temporary (for example, a temporary table).
|
void |
removeChildrenAndResources(Session session)
Delete all dependent children objects and resources of this object.
|
void |
rename(String newName)
Rename the object.
|
void |
setComment(String comment)
Change the comment of this object.
|
void |
setTemporary(boolean temporary)
Tell this object that it is temporary or not.
|
static final int TABLE_OR_VIEW
static final int INDEX
static final int USER
static final int SEQUENCE
static final int TRIGGER
static final int CONSTRAINT
static final int SETTING
static final int ROLE
static final int RIGHT
static final int FUNCTION_ALIAS
static final int SCHEMA
static final int CONSTANT
static final int USER_DATATYPE
static final int COMMENT
static final int AGGREGATE
String getSQL()
ArrayList<DbObject> getChildren()
Database getDatabase()
int getId()
String getName()
String getCreateSQLForCopy(Table table, String quotedName)
table
- the new tablequotedName
- the quoted nameString getCreateSQL()
String getDropSQL()
int getType()
void removeChildrenAndResources(Session session)
session
- the sessionvoid checkRename()
void rename(String newName)
newName
- the new nameboolean isTemporary()
void setTemporary(boolean temporary)
temporary
- the new valuevoid setComment(String comment)
comment
- the new comment, or null for no commentString getComment()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.