# User

Represents a user object.

Methods
void | checkAdmin() Check if this user has admin rights.
void | checkAdmin() Check if this user has admin rights. An exception is thrown if he does not have them. Throws: DbException - if this user is not an admin
void | checkOwnsNoSchemas() Check that this user does not own any schema.
void | checkOwnsNoSchemas() Check that this user does not own any schema. An exception is thrown if he owns one or more schemas. Throws: DbException - if this user owns a schema
void | checkRename()
void | checkRename()
void | checkRight(Table table, int rightMask) Checks that this user has the given rights for this database object.
void | checkRight(Table table, int rightMask) Checks that this user has the given rights for this database object. Parameters: table - the database object rightMask - the rights required Throws: DbException - if this user does not have the required rights
void | checkSchemaAdmin() Check if this user has schema admin rights.
void | checkSchemaAdmin() Check if this user has schema admin rights. An exception is thrown if he does not have them. Throws: DbException - if this user is not a schema admin
ArrayList | getChildren()
ArrayList | getChildren()
String | getCreateSQL()
String | getCreateSQL()
String | getCreateSQL(boolean password) Get the CREATE SQL statement for this object.
String | getCreateSQL(boolean password) Get the CREATE SQL statement for this object. Parameters: password - true if the password (actually the salt and hash) should be returned Returns: the SQL statement
String | getCreateSQLForCopy(Table table, String quotedName)
String | getCreateSQLForCopy(Table table, String quotedName)
String | getDropSQL()
String | getDropSQL()
int | getType()
int | getType()
boolean | hasRight(Table table, int rightMask) See if this user has the given rights for this database object.
boolean | hasRight(Table table, int rightMask) See if this user has the given rights for this database object. Parameters: table - the database object, or null for schema-only check rightMask - the rights required Returns: true if the user has the rights
boolean | isAdmin()
boolean | isAdmin()
void | removeChildrenAndResources(Session session)
void | removeChildrenAndResources(Session session)
void | setAdmin(boolean admin)
void | setAdmin(boolean admin)
void | setSaltAndHash(byte[] salt, byte[] hash) Set the salt and hash of the password for this user.
void | setSaltAndHash(byte[] salt, byte[] hash) Set the salt and hash of the password for this user. Parameters: salt - the salt hash - the password hash
void | setUserPasswordHash(byte[] userPasswordHash) Set the user name password hash.
void | setUserPasswordHash(byte[] userPasswordHash) Set the user name password hash. A random salt is generated as well. The parameter is filled with zeros after use. Parameters: userPasswordHash - the user name password hash