Package org.dbunit.dataset

Examples of org.dbunit.dataset.NoSuchTableException


                     DatabaseConfig config = connection.getConfig();
                     IMetadataHandler metadataHandler = (IMetadataHandler) config.getProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER);
                     DatabaseMetaData databaseMetaData = jdbcConnection.getMetaData();
                     if(!metadataHandler.tableExists(databaseMetaData, schemaName, plainTableName))
                     {
                         throw new NoSuchTableException("Did not find table '" + plainTableName + "' in schema '" + schemaName + "'");
                     }
                 }
                 catch (SQLException e)
                 {
                     throw new DataSetException("Exception while validation existence of table '" + plainTableName + "'", e);
View Full Code Here


        // Verify if table exist in the database
        if (!_tableMap.containsTable(tableName))
        {
            logger.error("Table '{}' not found in tableMap={}", tableName,
                    _tableMap);
            throw new NoSuchTableException(tableName);
        }

        // Try to find cached metadata
        ITableMetaData metaData = (ITableMetaData)_tableMap.get(tableName);
        if (metaData != null)
View Full Code Here

            IMetadataHandler metadataHandler = (IMetadataHandler)
                    this.connection.getConfig().getProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER);
            // Validate if the table exists
            if(!metadataHandler.tableExists(metaData, schema, tableName))
            {
                throw new NoSuchTableException("The table '"+tableName+"' does not exist in schema '"+schema+"'");
            }

            switch (type) {
            case IMPORT:
                rs = metaData.getImportedKeys(null, schema, tableName);
View Full Code Here

        {
            String tableName = names[i];
            ITable table = (ITable)_tableMap.get(tableName);
            if (table == null)
            {
                throw new NoSuchTableException(tableName);
            }

            tables[i] = table;
        }
View Full Code Here

        {
            ITable table = (ITable)_tableMap.get(tableName);
            return table.getTableMetaData();
        }

        throw new NoSuchTableException(tableName);
    }
View Full Code Here

        if (_tableMap.containsTable(tableName))
        {
            return (ITable)_tableMap.get(tableName);
        }

        throw new NoSuchTableException(tableName);
    }
View Full Code Here

TOP

Related Classes of org.dbunit.dataset.NoSuchTableException

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.