Package org.dbunit.ext.hsqldb

Examples of org.dbunit.ext.hsqldb.HsqldbDataTypeFactory


            IDatabaseConnection connection = new DatabaseConnection(DriverManager.getConnection(provider.getUrl(), username, password));
            DatabaseConfig config = connection.getConfig();
            if (provider.getUrl().startsWith("jdbc:h2")) {
                config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new H2DataTypeFactory());
            } else if (provider.getUrl().startsWith("jdbc:hsql")) {
                config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new HsqldbDataTypeFactory());
            } else if (provider.getUrl().startsWith("jdbc:mysql")) {
                config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new MySqlDataTypeFactory());
            }

            FlatXmlDataSetBuilder builder = new FlatXmlDataSetBuilder();
View Full Code Here


  @Override
  public void configure(IDatabaseConnection connection) {
    DatabaseConfig config = connection.getConfig();

    config.setProperty(DBUnit.DATATYPE_FACTORY, new HsqldbDataTypeFactory());

    config.setProperty(DBUnit.QUALIFIED_TABLE_NAMES, true);
  }
View Full Code Here

  @Override
  public void configure(IDatabaseConnection connection) {
    DatabaseConfig config = connection.getConfig();

    config.setProperty(DBUnit.DATATYPE_FACTORY, new HsqldbDataTypeFactory());

    config.setProperty(DBUnit.QUALIFIED_TABLE_NAMES, true);
  }
View Full Code Here

        conn = new DatabaseDataSourceConnection(dataSource);

        DatabaseConfig config = conn.getConfig();


       config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new HsqldbDataTypeFactory());
        // set auto commit to false to aviod the data to live over the test suite
        conn.getConnection().setAutoCommit(false);
    }
View Full Code Here

    private void openConnection() throws Exception {
        connection = new DatabaseConnection(datasource.getConnection());
        if (database == Database.hsql) {
            DatabaseConfig config = connection.getConfig();
            config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY,
                    new HsqldbDataTypeFactory());
        }
    }
View Full Code Here

  protected IDatabaseConnection getConnection() throws Exception {
    JdbcDatabaseTester dbTester = new JdbcDatabaseTester(DRIVER, URL, USER, PASSWORD);
    dbTester.setDataSet(getDataSet());
    IDatabaseConnection connection = dbTester.getConnection();
    DatabaseConfig memConfig = connection.getConfig();
    memConfig.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new HsqldbDataTypeFactory());
    return connection;
  }
View Full Code Here

  @Override
  public IDatabaseConnection getConnection() throws Exception {

    IDatabaseConnection conn = super.getConnection();

    DefaultDataTypeFactory datatypeFactory = new HsqldbDataTypeFactory();
    conn.getConfig().setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY,
        datatypeFactory);
    return conn;
  }
View Full Code Here

            if (connection == null) {
                connection = new DatabaseConnection(datasource.getConnection());
                if (database == Database.hsql) {
                    DatabaseConfig config = connection.getConfig();
                    config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY,
                            new HsqldbDataTypeFactory());
                }
                em.flush();
            }
        } finally {
            userTransaction.commit();
View Full Code Here

    private void openConnection() throws Exception {
        connection = new DatabaseConnection(datasource.getConnection());
        if (database == Database.hsql) {
            DatabaseConfig config = connection.getConfig();
            config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY,
                    new HsqldbDataTypeFactory());
        }
    }
View Full Code Here

TOP

Related Classes of org.dbunit.ext.hsqldb.HsqldbDataTypeFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.