boolean hasIdentityColumn = hasIdentityColumn(table.getTableMetaData());
ITableMetaData databaseMetaData = databaseDataSet.getTableMetaData(tableNames[i]);  boolean hasIdentityColumn = hasIdentityColumn(databaseMetaData);
    public void execute(IDatabaseConnection connection, IDataSet dataSet)            throws DatabaseUnitException, SQLException    {        Connection jdbcConnection = connection.getConnection();        Statement statement = jdbcConnection.createStatement();        try        {            // INSERT_IDENTITY need to be enabled/disabled inside the            // same transaction            if (jdbcConnection.getAutoCommit() == false)            {                throw new ExclusiveTransactionException();            }            jdbcConnection.setAutoCommit(false);            // Execute decorated operation one table at a time            String[] tableNames = dataSet.getTableNames();            for (int i = 0; i < tableNames.length; i++)            {                ITable table = dataSet.getTable(tableNames[i]);                String tableName = DataSetUtils.getQualifiedName(                        connection.getSchema(), tableNames[i]);                // enable identity insert                boolean hasIdentityColumn = hasIdentityColumn(table.getTableMetaData());                if (hasIdentityColumn)                {                    StringBuffer sqlBuffer = new StringBuffer(128);                    sqlBuffer.append("SET IDENTITY_INSERT ");                    sqlBuffer.append(tableName);                    sqlBuffer.append(" ON");                    statement.execute(sqlBuffer.toString());                }                try                {                    _operation.execute(connection, new DefaultDataSet(table));                }                finally                {                    // disable identity insert                    if (hasIdentityColumn)                    {                        StringBuffer sqlBuffer = new StringBuffer(128);                        sqlBuffer.append("SET IDENTITY_INSERT ");                        sqlBuffer.append(tableName);                        sqlBuffer.append(" OFF");                        statement.execute(sqlBuffer.toString());                        jdbcConnection.commit();                    }                }            }        }        finally        {            jdbcConnection.setAutoCommit(true);            statement.close();        }    }