org.dbunit.operation
Class InsertOperation

java.lang.Object
  extended by org.dbunit.operation.DatabaseOperation
      extended by org.dbunit.operation.AbstractOperation
          extended by org.dbunit.operation.AbstractBatchOperation
              extended by org.dbunit.operation.InsertOperation

public class InsertOperation
extends AbstractBatchOperation

Inserts the dataset contents into the database. This operation assumes that table data does not exist in the database and fails if this is not the case. To prevent problems with foreign keys, tables must be sequenced appropriately in dataset.

Since:
Feb 18, 2002
Version:
$Revision: 727 $
Author:
Manuel Laflamme

Field Summary
 
Fields inherited from class org.dbunit.operation.AbstractBatchOperation
_reverseRowOrder
 
Fields inherited from class org.dbunit.operation.DatabaseOperation
CLEAN_INSERT, DELETE, DELETE_ALL, INSERT, NONE, REFRESH, TRUNCATE_TABLE, UPDATE
 
Method Summary
protected  boolean equalsIgnoreMapping(BitSet ignoreMapping, ITable table, int row)
          Returns false if the specified table row have a different ignore mapping than the specified mapping.
protected  BitSet getIgnoreMapping(ITable table, int row)
          Returns mapping of columns to ignore by this operation.
 OperationData getOperationData(ITableMetaData metaData, BitSet ignoreMapping, IDatabaseConnection connection)
           
 
Methods inherited from class org.dbunit.operation.AbstractBatchOperation
execute, iterator, toString
 
Methods inherited from class org.dbunit.operation.AbstractOperation
getQualifiedName
 
Methods inherited from class org.dbunit.operation.DatabaseOperation
CLOSE_CONNECTION, TRANSACTION
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getOperationData

public OperationData getOperationData(ITableMetaData metaData,
                                      BitSet ignoreMapping,
                                      IDatabaseConnection connection)
                               throws DataSetException
Throws:
DataSetException

getIgnoreMapping

protected BitSet getIgnoreMapping(ITable table,
                                  int row)
                           throws DataSetException
Description copied from class: AbstractBatchOperation
Returns mapping of columns to ignore by this operation. Each bit set represent a column to ignore.

Throws:
DataSetException

equalsIgnoreMapping

protected boolean equalsIgnoreMapping(BitSet ignoreMapping,
                                      ITable table,
                                      int row)
                               throws DataSetException
Description copied from class: AbstractBatchOperation
Returns false if the specified table row have a different ignore mapping than the specified mapping.

Throws:
DataSetException


Copyright © 2002-2012. All Rights Reserved.