org.rhq.helpers.perftest.support.dbunit
Class EntityRelationshipFilter

java.lang.Object
  extended by org.dbunit.dataset.filter.SequenceTableFilter
      extended by org.dbunit.database.DatabaseSequenceFilter
          extended by org.rhq.helpers.perftest.support.dbunit.EntityRelationshipFilter
All Implemented Interfaces:
org.dbunit.dataset.filter.ITableFilter, org.dbunit.dataset.filter.ITableFilterSimple

public class EntityRelationshipFilter
extends org.dbunit.database.DatabaseSequenceFilter

This is an implementation of ITableFilter interface acts as a proxy between the EntityDependencyGraph and the dbUnit.

This filter is able to produce a table iterator that traverses the tables in the correct order so that foreign key constraints are obeyed during insertion of data.

It is also able to filter the data from the tables corresponding to the entities by only allowing entities (and the underlying table rows) of certain primary key values to be included.

Author:
Lukas Krejci

Constructor Summary
EntityRelationshipFilter(org.dbunit.database.IDatabaseConnection connection, Map<Class<?>,Set<ColumnValues>> allowedPks, DependencyInclusionResolver inclusionResolver)
           
 
Method Summary
 org.dbunit.dataset.ITableIterator iterator(org.dbunit.dataset.IDataSet dataSet, boolean reversed)
           
 
Methods inherited from class org.dbunit.dataset.filter.SequenceTableFilter
accept, getTableNames, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EntityRelationshipFilter

public EntityRelationshipFilter(org.dbunit.database.IDatabaseConnection connection,
                                Map<Class<?>,Set<ColumnValues>> allowedPks,
                                DependencyInclusionResolver inclusionResolver)
                         throws org.dbunit.dataset.DataSetException,
                                SQLException
Throws:
org.dbunit.dataset.DataSetException
SQLException
Method Detail

iterator

public org.dbunit.dataset.ITableIterator iterator(org.dbunit.dataset.IDataSet dataSet,
                                                  boolean reversed)
                                           throws org.dbunit.dataset.DataSetException
Specified by:
iterator in interface org.dbunit.dataset.filter.ITableFilter
Overrides:
iterator in class org.dbunit.dataset.filter.SequenceTableFilter
Throws:
org.dbunit.dataset.DataSetException


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.