Package org.dbunit.dataset.datatype

Examples of org.dbunit.dataset.datatype.DefaultDataTypeFactory


    protected void editConfig(DatabaseConfig config) {

        if (database.equals(Database.hsql)) {
            // DBUnit/HSQL bugfix
            // http://www.carbonfive.com/community/archives/2005/07/dbunit_hsql_and.html
            config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new DefaultDataTypeFactory() {
                public DataType createDataType(int sqlType, String sqlTypeName)
                  throws DataTypeException {
                   if (sqlType == Types.BOOLEAN) {
                      return DataType.BOOLEAN;
                    }
View Full Code Here


    protected void editConfig(DatabaseConfig config)
    {
        if (database.equals(HSQL)) {
            // DBUnit/HSQL bugfix
            // http://www.carbonfive.com/community/archives/2005/07/dbunit_hsql_and.html
            config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new DefaultDataTypeFactory()
            {
               @Override
                public DataType createDataType(int sqlType, String sqlTypeName)
                  throws DataTypeException
                  {
View Full Code Here

  public DbDataUtil(JuEmUtil emUtil) {
    this.emUtil = emUtil;
    this.connection = null;

    // Initialize
    DefaultDataTypeFactory dataTypeFactory = null;
    IMetadataHandler metadataHandler = new DefaultMetadataHandler();
    switch (this.emUtil.getDbType()) {
    case DERBY:
      dataTypeFactory = new DefaultDataTypeFactory();
      break;
    case H2:
      dataTypeFactory = new H2DataTypeFactory();
      break;
    case MYSQL:
View Full Code Here

  public DbDataUtil(JuEmUtil emUtil) {
    this.emUtil = emUtil;
    this.connection = null;

    // Initialize
    DefaultDataTypeFactory dataTypeFactory = null;
    IMetadataHandler metadataHandler = new DefaultMetadataHandler();
    switch (this.emUtil.getDbType()) {
    case DERBY:
      dataTypeFactory = new DefaultDataTypeFactory();
      break;
    case H2:
      dataTypeFactory = new H2DataTypeFactory();
      break;
    case MYSQL:
View Full Code Here

  public DbDataUtil(JuConnUtil connUtil, String schema) {
    this.connUtil = connUtil;
    this.schemaName = schema;

    // Initialize
    DefaultDataTypeFactory dataTypeFactory = null;
    IMetadataHandler metadataHandler = new DefaultMetadataHandler();
    switch (this.connUtil.getDbType()) {
    case DERBY:
      dataTypeFactory = new DefaultDataTypeFactory();
      break;
    case H2:
      dataTypeFactory = new H2DataTypeFactory();
      break;
    case MYSQL:
View Full Code Here

      try
      {
         DataSource dataSource = dataSourceInstance.get();
         DatabaseConnection databaseConnection = new DatabaseConnection(dataSource.getConnection());
         databaseConnection.getConfig().setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY,
               new DefaultDataTypeFactory());
         databaseConnectionProducer.set(databaseConnection);
      }
      catch (Exception e)
      {
         throw new DBUnitInitializationException("Unable to initialize database connection for dbunit module.", e);
View Full Code Here

   {
      if (database.equals(HSQL))
      {
         // DBUnit/HSQL bugfix
         // http://www.carbonfive.com/community/archives/2005/07/dbunit_hsql_and.html
         config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new DefaultDataTypeFactory()
         {
            @Override
            public DataType createDataType(int sqlType, String sqlTypeName)
                  throws DataTypeException
            {
View Full Code Here

   {
      if (database.equals(HSQL))
      {
         // DBUnit/HSQL bugfix
         // http://www.carbonfive.com/community/archives/2005/07/dbunit_hsql_and.html
         config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new DefaultDataTypeFactory()
         {
            @Override
            public DataType createDataType(int sqlType, String sqlTypeName)
                  throws DataTypeException
            {
View Full Code Here

         final String schema = dbUnitConfigurationInstance.get().getSchema();
         final DatabaseConnection databaseConnection = createDatabaseConnection(dataSource, schema);
         databaseConnectionProducer.set(databaseConnection);

         final DatabaseConfig dbUnitConfig = databaseConnection.getConfig();
         dbUnitConfig.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new DefaultDataTypeFactory());

         final Map<String, Object> properties = new DBUnitConfigurationPropertyMapper().map(dbUnitConfigurationInstance.get());
         for (Entry<String, Object> property : properties.entrySet())
         {
            dbUnitConfig.setProperty(property.getKey(), property.getValue());
View Full Code Here

         }

         databaseConnectionProducer.set(databaseConnection);

         final DatabaseConfig dbUnitConfig = databaseConnection.getConfig();
         dbUnitConfig.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new DefaultDataTypeFactory());

         final Map<String, Object> properties = new DBUnitConfigurationPropertyMapper().map(dbUnitConfigurationInstance.get());
         for (Entry<String, Object> property : properties.entrySet())
         {
            dbUnitConfig.setProperty(property.getKey(), property.getValue());
View Full Code Here

TOP

Related Classes of org.dbunit.dataset.datatype.DefaultDataTypeFactory

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.