Interface DatabaseObjectFactory

  • All Known Implementing Classes:
    ExasolObjectFactory

    public interface DatabaseObjectFactory
    Interface for database object factories.

    The concrete implementation depends on the feature set and dialect of the database that you want to create objects for.

    • Method Detail

      • createConnectionDefinition

        ConnectionDefinition createConnectionDefinition​(String name,
                                                        String to)
        Create a connection without credentials.
        Parameters:
        name - name of the connection
        to - target the connection points to
        Returns:
        new ConnectionDefinition instance
      • createConnectionDefinition

        ConnectionDefinition createConnectionDefinition​(String name,
                                                        String target,
                                                        String userName,
                                                        String password)
        Create a connection without credentials.
        Parameters:
        name - name of the connection
        target - target the connection points to
        userName - user as which to connect
        password - password or password-like credential
        Returns:
        new ConnectionDefinition instance
      • createSchema

        Schema createSchema​(String name)
        Create a new database schema.
        Parameters:
        name - name of the schema
        Returns:
        new Schema instance.
      • 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 TDDB 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 TDDB 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
      • createVirtualSchemaBuilder

        VirtualSchema.Builder createVirtualSchemaBuilder​(String name)
        Create a builder for a Virtual Schema.
        Parameters:
        name - name of the Virtual Schema
        Returns:
        builder