Package com.exasol.dbbuilder
Class ExasolObjectFactory
- java.lang.Object
-
- com.exasol.dbbuilder.ExasolObjectFactory
-
- All Implemented Interfaces:
DatabaseObjectFactory
public final class ExasolObjectFactory extends Object implements DatabaseObjectFactory
Factory for a top-level database object.
-
-
Constructor Summary
Constructors Constructor Description ExasolObjectFactory(Connection connection)Create a newExasolObjectFactoryinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectionDefinitioncreateConnectionDefinition(String name, String to)Create a connection without credentials.ConnectionDefinitioncreateConnectionDefinition(String name, String to, String userName, String password)Create a connection without credentials.UsercreateLoginUser(String name)Create user that can log into the database with a default password.UsercreateLoginUser(String name, String password)Create user that can log into the database.SchemacreateSchema(String name)Create a new database schema.UsercreateUser(String name)/** Create a new database user with a default password.UsercreateUser(String name, String password)Create a new database user.VirtualSchema.BuildercreateVirtualSchemaBuilder(String name)Create a builder for a Virtual Schema.
-
-
-
Constructor Detail
-
ExasolObjectFactory
public ExasolObjectFactory(Connection connection)
Create a newExasolObjectFactoryinstance.- Parameters:
connection- JDBC connection
-
-
Method Detail
-
createConnectionDefinition
public ConnectionDefinition createConnectionDefinition(String name, String to)
Description copied from interface:DatabaseObjectFactoryCreate a connection without credentials.- Specified by:
createConnectionDefinitionin interfaceDatabaseObjectFactory- Parameters:
name- name of the connectionto- target the connection points to- Returns:
- new
ConnectionDefinitioninstance
-
createConnectionDefinition
public ConnectionDefinition createConnectionDefinition(String name, String to, String userName, String password)
Description copied from interface:DatabaseObjectFactoryCreate a connection without credentials.- Specified by:
createConnectionDefinitionin interfaceDatabaseObjectFactory- Parameters:
name- name of the connectionto- target the connection points touserName- user as which to connectpassword- password or password-like credential- Returns:
- new
ConnectionDefinitioninstance
-
createSchema
public Schema createSchema(String name)
Description copied from interface:DatabaseObjectFactoryCreate a new database schema.- Specified by:
createSchemain interfaceDatabaseObjectFactory- Parameters:
name- name of the schema- Returns:
- new
Schemainstance.
-
createUser
public User createUser(String name)
Description copied from interface:DatabaseObjectFactory/** 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!
- Specified by:
createUserin interfaceDatabaseObjectFactory- Parameters:
name- user name- Returns:
- new
Userinstance
-
createUser
public User createUser(String name, String password)
Description copied from interface:DatabaseObjectFactoryCreate a new database user.- Specified by:
createUserin interfaceDatabaseObjectFactory- Parameters:
name- user namepassword- login password- Returns:
- new
Userinstance
-
createLoginUser
public User createLoginUser(String name)
Description copied from interface:DatabaseObjectFactoryCreate 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!
- Specified by:
createLoginUserin interfaceDatabaseObjectFactory- Parameters:
name- user name- Returns:
- new
Userinstance
-
createLoginUser
public User createLoginUser(String name, String password)
Description copied from interface:DatabaseObjectFactoryCreate user that can log into the database.- Specified by:
createLoginUserin interfaceDatabaseObjectFactory- Parameters:
name- user namepassword- login password- Returns:
- new
Userinstance
-
createVirtualSchemaBuilder
public VirtualSchema.Builder createVirtualSchemaBuilder(String name)
Description copied from interface:DatabaseObjectFactoryCreate a builder for a Virtual Schema.- Specified by:
createVirtualSchemaBuilderin interfaceDatabaseObjectFactory- Parameters:
name- name of the Virtual Schema- Returns:
- builder
-
-