Examples of PostgresqlDataTypeFactory


Examples of org.dbunit.ext.postgresql.PostgresqlDataTypeFactory

        String name = connection.getConnection().getMetaData().getDatabaseProductName().toLowerCase();
        int major = connection.getConnection().getMetaData().getDatabaseMajorVersion();
        IDataTypeFactory type = null;

        if (name.contains("postgres")) {
            type = new PostgresqlDataTypeFactory();
        } else if (name.contains("oracle")) {
            if (major >= 10) {
                type = new Oracle10DataTypeFactory();
            } else {
                type = new OracleDataTypeFactory();
View Full Code Here

Examples of org.dbunit.ext.postgresql.PostgresqlDataTypeFactory

        String name = connection.getConnection().getMetaData().getDatabaseProductName().toLowerCase();
        int major = connection.getConnection().getMetaData().getDatabaseMajorVersion();
        IDataTypeFactory type = null;

        if (name.contains("postgres")) {
            type = new PostgresqlDataTypeFactory();
        } else if (name.contains("oracle")) {
            if (major >= 10) {
                type = new Oracle10DataTypeFactory();
            } else {
                type = new OracleDataTypeFactory();
View Full Code Here

Examples of org.dbunit.ext.postgresql.PostgresqlDataTypeFactory

  @Override
  public IDatabaseConnection create() {
    try {
      IDatabaseConnection dbUnitConn = new DatabaseConnection(getConnection());
      dbUnitConn.getConfig().setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new PostgresqlDataTypeFactory());
      return dbUnitConn;
    } catch (DatabaseUnitException e) {
      throw new IllegalStateException(
          "It's not possible to create a PostgreSql DbUnit connection: "
              + e.getMessage(), e);
View Full Code Here

Examples of org.dbunit.ext.postgresql.PostgresqlDataTypeFactory

      dbUnitCon = new DatabaseConnection(con);
    } catch (DatabaseUnitException e) {
      System.out.println(e);
    }
    dbUnitCon.getConfig().setProperty(DatabaseConfig.FEATURE_BATCHED_STATEMENTS, Boolean.TRUE);
    dbUnitCon.getConfig().setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new PostgresqlDataTypeFactory());
    IDataSet dataSet = null;
    try {
      dataSet = new XmlDataSet(new FileInputStream("data/load.xml"));
    } catch (IOException e) {
      System.out.println(e);
View Full Code Here

Examples of org.dbunit.ext.postgresql.PostgresqlDataTypeFactory

  @Override
  protected IDatabaseConnection getDbUnitConnection()
      throws DatabaseUnitException, SQLException {
    IDatabaseConnection dbconn = new DatabaseConnection(getConnection());
    dbconn.getConfig().setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new PostgresqlDataTypeFactory());
    return dbconn;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.