| java.lang.Object org.hsqldb.User
User | public class User (Code) | | A User Object holds the name, password for a
particular database user.
Enhanced in successive versions of HSQLDB.
author: Thomas Mueller (Hypersonic SQL Group) version: 1.8.0 since: Hypersonic SQL |
Method Summary | |
void | check(HsqlName dbobject, int rights) Checks if any of the rights represented by the rights
argument have been granted on the specified database object. | void | check(String dbobject) | void | checkAdmin() Checks that this User object is for a user with the
database administrator role. | void | checkPassword(String test) Checks if this object's password attibute equals
specified argument, else throws. | String | getAlterUserDDL() Returns the ALTER USER DDL character sequence that preserves the
this user's current password value and mode. | public String | getConnectStatement() | String | getCreateUserDDL() returns the DDL string
sequence that creates this user. | HashSet | getGrantedClassNames(boolean andToPublic) Retrieves the distinct set of Java Class FQNs
for which this User object has been
granted ALL (the Class execution privilege). | Grantee | getGrantee() Retrieves the Grantee object for this User. | HsqlName | getInitialSchema() | String | getName() | IntValueHashMap | getRights() Retrieves the map object that represents the rights that have been
granted on database objects. | boolean | isAccessible(HsqlName dbobject, int rights) Returns true if any of the rights represented by the
rights argument has been granted on the database object identified
by the dbobject argument. | boolean | isAccessible(String dbobject) Returns true if any right at all has been granted to this User object
on the database object identified by the dbobject argument. | boolean | isAccessible(HsqlName dbobject) | boolean | isAdmin() Returns true if this User object is for a user with the
database administrator role. | boolean | isPublic() | boolean | isSys() Returns true if this User object is for a user with the
database administrator role. | String[] | listGrantedTablePrivileges(HsqlName name) Retrieves a string[] whose elements are the names, of the rights
explicitly granted with the GRANT command to this User
object on the Table object identified by the
name argument. | void | setGrantee(Grantee inGrantee) Sets the Grantee object for this User. | void | setInitialSchema(HsqlName schema) This class does not have access to the SchemaManager, therefore
caller should verify that the given schemaName exists.
Parameters: schemaName - Name of an existing schema. | void | setPassword(String password) |
check | void check(HsqlName dbobject, int rights) throws HsqlException(Code) | | Checks if any of the rights represented by the rights
argument have been granted on the specified database object.
This is done by checking that a mapping exists in the rights map
from the dbobject argument for at least one of the rights
contained in the rights argument. Otherwise, it throws.
|
checkAdmin | void checkAdmin() throws HsqlException(Code) | | Checks that this User object is for a user with the
database administrator role. Otherwise it throws.
|
checkPassword | void checkPassword(String test) throws HsqlException(Code) | | Checks if this object's password attibute equals
specified argument, else throws.
|
getAlterUserDDL | String getAlterUserDDL()(Code) | | Returns the ALTER USER DDL character sequence that preserves the
this user's current password value and mode.
the DDL |
getConnectStatement | public String getConnectStatement()(Code) | | Retrieves the redo log character sequence for connecting
this user
the redo log character sequence for connectingthis user |
getCreateUserDDL | String getCreateUserDDL()(Code) | | returns the DDL string
sequence that creates this user.
|
getGrantedClassNames | HashSet getGrantedClassNames(boolean andToPublic) throws HsqlException(Code) | | Retrieves the distinct set of Java Class FQNs
for which this User object has been
granted ALL (the Class execution privilege).
Parameters: andToPublic - if true , then the set includes thenames of classes accessible to this User objectthrough grants to its PUBLIC User object attribute, else only direct grants are inlcuded. the distinct set of Java Class FQNs for which thisthis User object has been grantedALL . |
getGrantee | Grantee getGrantee()(Code) | | Retrieves the Grantee object for this User.
|
getInitialSchema | HsqlName getInitialSchema()(Code) | | Returns the initial schema for the user
|
getRights | IntValueHashMap getRights()(Code) | | Retrieves the map object that represents the rights that have been
granted on database objects.
The map has keys and values with the following interpretation:
- The keys are generally (but not limited to) objects having
an attribute or value equal to the name of an actual database
object.
- Specifically, the keys act as database object identifiers.
- The values are always Integer objects, each formed by combining
a set of flags, one for each of the access rights defined in
UserManager: {SELECT, INSERT, UPDATE and DELETE}.
|
isAccessible | boolean isAccessible(HsqlName dbobject, int rights) throws HsqlException(Code) | | Returns true if any of the rights represented by the
rights argument has been granted on the database object identified
by the dbobject argument.
This is done by checking that a mapping exists in the rights map
from the dbobject argument for at least one of the rights
contained in the rights argument.
|
isAccessible | boolean isAccessible(String dbobject) throws HsqlException(Code) | | Returns true if any right at all has been granted to this User object
on the database object identified by the dbobject argument.
|
isAdmin | boolean isAdmin()(Code) | | Returns true if this User object is for a user with the
database administrator role.
|
isPublic | boolean isPublic()(Code) | | Returns true if this User object represents the PUBLIC user
|
isSys | boolean isSys()(Code) | | Returns true if this User object is for a user with the
database administrator role.
|
listGrantedTablePrivileges | String[] listGrantedTablePrivileges(HsqlName name)(Code) | | Retrieves a string[] whose elements are the names, of the rights
explicitly granted with the GRANT command to this User
object on the Table object identified by the
name argument.
array of Strings naming the rights granted to thisUser object on the Table objectidentified by the name argument. Parameters: name - a Table object identifier |
setGrantee | void setGrantee(Grantee inGrantee) throws HsqlException(Code) | | Sets the Grantee object for this User.
This is done in the constructor for all users except the special
users SYSTEM and PUBLIC, which have to be set up before the
Managers are initialized.
|
setInitialSchema | void setInitialSchema(HsqlName schema)(Code) | | This class does not have access to the SchemaManager, therefore
caller should verify that the given schemaName exists.
Parameters: schemaName - Name of an existing schema. Null value allowed,which means use the DB default session schema. |
|
|