Interface DatabaseObjectFactory

    • Method Detail

      • createUser

        User createUser​(String 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 TDBJ is made. Never use something like this in production code!

        Parameters:
        name - user name
        Returns:
        new User instance
      • createUser

        User createUser​(String name,
                        String password)
        Create a new database user.
        Parameters:
        name - user name
        password - login password
        Returns:
        new User instance
      • createLoginUser

        User createLoginUser​(String name)
        Create user that can log into the database 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 TDBJ is made. Never use something like this in production code!

        Parameters:
        name - user name
        Returns:
        new User instance
      • createLoginUser

        User createLoginUser​(String name,
                             String password)
        Create user that can log into the database.
        Parameters:
        name - user name
        password - login password
        Returns:
        new User instance
      • executeSqlFile

        void executeSqlFile​(Path... sqlFiles)
        Execute the contents of one or more SQL script files. Each file may contain multiple SQL statements, separated with ;.
        Parameters:
        sqlFiles - paths to the script files
      • createSchema

        Schema createSchema​(String name)
        Create a new database schema.
        Parameters:
        name - name of the schema
        Returns:
        new Schema