public final class User extends RightOwner
AGGREGATE, comment, COMMENT, CONSTANT, CONSTRAINT, database, DOMAIN, FUNCTION_ALIAS, INDEX, RIGHT, ROLE, SCHEMA, SEQUENCE, SETTING, SYNONYM, TABLE_OR_VIEW, trace, TRIGGER, USERADD_PLAN_INFORMATION, DEFAULT_SQL_FLAGS, NO_CASTS, QUOTE_ONLY_WHEN_REQUIRED, REPLACE_LOBS_FOR_TRACE, TRACE_SQL_FLAGS| 限定符和类型 | 方法和说明 |
|---|---|
void |
checkAdmin()
Checks if this user has admin rights.
|
void |
checkSchemaAdmin()
Checks if this user has schema admin rights for every schema.
|
void |
checkSchemaOwner(Schema schema)
Checks if this user has schema owner rights for the specified schema.
|
void |
checkTableRight(Table table,
int rightMask)
Checks that this user has the given rights for the specified table.
|
ArrayList<DbObject> |
getChildren()
Get the list of dependent children (for tables, this includes indexes and
so on).
|
String |
getCreateSQL()
Construct the CREATE ...
|
String |
getCreateSQL(boolean password)
Get the CREATE SQL statement for this object.
|
int |
getType()
Get the object type.
|
boolean |
hasTableRight(Table table,
int rightMask)
See if this user has the given rights for this database object.
|
boolean |
isAdmin() |
void |
removeChildrenAndResources(SessionLocal session)
Delete all dependent children objects and resources of this object.
|
void |
setAdmin(boolean admin) |
void |
setSaltAndHash(byte[] salt,
byte[] hash)
Set the salt and hash of the password for this user.
|
void |
setUserPasswordHash(byte[] userPasswordHash)
Set the user name password hash.
|
checkOwnsNoSchemas, getRightForObject, getRightForRole, grantRight, grantRole, isRoleGranted, rename, revokeTemporaryRightsOnRolescheckRename, getComment, getCreateSQLForCopy, getCreateSQLForMeta, getDatabase, getDropSQL, getId, getModificationId, getName, getSQL, getSQL, invalidate, isTemporary, isValid, setComment, setModified, setObjectName, setTemporary, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetTraceSQLpublic void setAdmin(boolean admin)
public boolean isAdmin()
public void setSaltAndHash(byte[] salt,
byte[] hash)
salt - the salthash - the password hashpublic void setUserPasswordHash(byte[] userPasswordHash)
userPasswordHash - the user name password hashpublic String getCreateSQL()
DbObjectgetCreateSQL 在类中 DbObjectpublic String getCreateSQL(boolean password)
password - true if the password (actually the salt and hash) should
be returnedpublic void checkAdmin()
DbException - if this user is not an adminpublic void checkSchemaAdmin()
DbException - if this user is not a schema adminpublic void checkSchemaOwner(Schema schema)
schema - the schemaDbException - if this user is not a schema ownerpublic void checkTableRight(Table table, int rightMask)
table - the tablerightMask - the rights requiredDbException - if this user does not have the required rightspublic boolean hasTableRight(Table table, int rightMask)
table - the database object, or null for schema-only checkrightMask - the rights requiredpublic int getType()
DbObjectpublic ArrayList<DbObject> getChildren()
DbObjectgetChildren 在类中 DbObjectnullpublic void removeChildrenAndResources(SessionLocal session)
DbObjectremoveChildrenAndResources 在类中 DbObjectsession - the sessionCopyright © 2022. All rights reserved.