Search in sources :

Example 56 with DatabaseConnection

use of org.pentaho.database.model.DatabaseConnection in project data-access by pentaho.

the class TestDataSourceResource method createConnectionObject.

private static IDatabaseConnection createConnectionObject() {
    IDatabaseConnection connection = new DatabaseConnection();
    connection.setAccessType(DatabaseAccessType.NATIVE);
    // connection.setDriverClass("org.hsqldb.jdbcDriver");
    // connection.setUrl("jdbc:hsqldb:hsql://localhost:9001/sampledata");
    connection.setUsername("pentaho_user");
    connection.setPassword("password");
    connection.setName(CONNECTION_NAME);
    return connection;
}
Also used : IDatabaseConnection(org.pentaho.database.model.IDatabaseConnection) DatabaseConnection(org.pentaho.database.model.DatabaseConnection) IDatabaseConnection(org.pentaho.database.model.IDatabaseConnection)

Aggregations

DatabaseConnection (org.pentaho.database.model.DatabaseConnection)56 IDatabaseConnection (org.pentaho.database.model.IDatabaseConnection)48 Test (org.junit.Test)36 HashMap (java.util.HashMap)10 IDatabaseDialectService (org.pentaho.database.service.IDatabaseDialectService)7 DatabaseType (org.pentaho.database.model.DatabaseType)6 DatabaseDialectService (org.pentaho.database.service.DatabaseDialectService)6 DatabaseTypeHelper (org.pentaho.database.util.DatabaseTypeHelper)6 ArrayList (java.util.ArrayList)5 Matchers.containsString (org.hamcrest.Matchers.containsString)5 IDatabaseType (org.pentaho.database.model.IDatabaseType)5 DBDatasourceServiceException (org.pentaho.platform.api.data.DBDatasourceServiceException)5 ConnectionServiceException (org.pentaho.platform.dataaccess.datasource.wizard.service.ConnectionServiceException)5 Response (javax.ws.rs.core.Response)4 List (java.util.List)3 LinkedList (java.util.LinkedList)2 Mockito.anyString (org.mockito.Mockito.anyString)2 DatabaseAccessType (org.pentaho.database.model.DatabaseAccessType)2 PartitionDatabaseMeta (org.pentaho.database.model.PartitionDatabaseMeta)2 Category (org.pentaho.metadata.model.Category)2