Class AbstractUser

    • Constructor Detail

      • AbstractUser

        public AbstractUser​(com.exasol.db.Identifier name)
        Create a new database user with a default password.

        This method creates a user with a password derived from the user name. Note that this is only acceptable in the scope of testing for which the TDDB is made. Never use something like this in production code!

        Parameters:
        name - user name
      • AbstractUser

        public AbstractUser​(com.exasol.db.Identifier name,
                            String password)
        Create a new database user.
        Parameters:
        name - user name
        password - login password
    • Method Detail

      • getPassword

        public String getPassword()
        Description copied from interface: User
        Get the user's password.
        Specified by:
        getPassword in interface User
        Returns:
        password
      • getGlobalPrivileges

        public Set<GlobalPrivilege> getGlobalPrivileges()
        Description copied from interface: User
        Get the systemPrivileges of the user.
        Specified by:
        getGlobalPrivileges in interface User
        Returns:
        system privileges
      • grant

        public User grant​(DatabaseObject object,
                          ObjectPrivilege... privileges)
        Description copied from interface: User
        Grant the user access to a database schema with the given privileges.
        Specified by:
        grant in interface User
        Parameters:
        object - database object
        privileges - privileges to grant the user
        Returns:
        User instance for fluent programming
      • grant

        public User grant​(GlobalPrivilege... privileges)
        Description copied from interface: User
        Grant system privileges to a user.
        Specified by:
        grant in interface User
        Parameters:
        privileges - system privileges
        Returns:
        User instance for fluent programming
      • drop

        public void drop()
        Description copied from interface: DatabaseObject
        Drop the database object and all contained objects.
        Specified by:
        drop in interface DatabaseObject