org.dbunit.database.search
Class ImportedKeysSearchCallbackFilteredByPKs
java.lang.Object
org.dbunit.util.search.AbstractNodesFilterSearchCallback
org.dbunit.database.search.AbstractMetaDataBasedSearchCallback
org.dbunit.database.search.ImportedKeysSearchCallback
org.dbunit.database.search.ImportedKeysSearchCallbackFilteredByPKs
- All Implemented Interfaces:
- ISearchCallback
public class ImportedKeysSearchCallbackFilteredByPKs
- extends ImportedKeysSearchCallback
Extension of the ImportedKeysSearchCallback, where each new edge is added to a
PrimaryKeyFilter.
- Since:
- Sep 9, 2005
- Version:
- $Revision: 554 $
- Author:
- Felipe Leme
Method Summary |
ITableFilter |
getFilter()
Get the primary key filter associated with the call back |
protected IEdge |
newEdge(java.sql.ResultSet rs,
int type,
java.lang.String from,
java.lang.String to,
java.lang.String fkColumn,
java.lang.String pkColumn)
This method can be overwritten by the sub-classes if they need to decorate
the edge (for instance, providing an Edge that contains the primary and
foreign keys used). |
void |
nodeAdded(java.lang.Object node)
Do nothing... |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImportedKeysSearchCallbackFilteredByPKs
public ImportedKeysSearchCallbackFilteredByPKs(IDatabaseConnection connection,
java.util.Map allowedPKs)
- Default constructor.
- Parameters:
connection
- database connectionallowedPKs
- map of allowed rows, based on the primary keys (key is the name
of a table; value is a Set with allowed primary keys for that table)
getFilter
public ITableFilter getFilter()
- Get the primary key filter associated with the call back
- Returns:
- primary key filter associated with the call back
nodeAdded
public void nodeAdded(java.lang.Object node)
throws SearchException
- Description copied from class:
AbstractNodesFilterSearchCallback
- Do nothing...
- Specified by:
nodeAdded
in interface ISearchCallback
- Overrides:
nodeAdded
in class AbstractNodesFilterSearchCallback
- Parameters:
node
- node that has been added.
- Throws:
SearchException
newEdge
protected IEdge newEdge(java.sql.ResultSet rs,
int type,
java.lang.String from,
java.lang.String to,
java.lang.String fkColumn,
java.lang.String pkColumn)
throws SearchException
- Description copied from class:
AbstractMetaDataBasedSearchCallback
- This method can be overwritten by the sub-classes if they need to decorate
the edge (for instance, providing an Edge that contains the primary and
foreign keys used).
- Overrides:
newEdge
in class AbstractMetaDataBasedSearchCallback
- Parameters:
rs
- database meta-data result settype
- type of relationship (IMPORT or EXPORT)from
- name of the table representing the 'from' nodeto
- name of the table representing the 'to' nodefkColumn
- name of the foreign key columnpkColumn
- name of the primary key column
- Returns:
- edge representing the relationship between the 2 tables, according to
the type
- Throws:
SearchException
- not thrown in this method (but might on sub-classes)
Copyright © 2002-2010. All Rights Reserved.