public class PrimaryKeyFilter extends AbstractTableFilter
Modifier and Type | Class and Description |
---|---|
static class |
PrimaryKeyFilter.PkTableMap
Map that associates a table with a set of primary key objects.
|
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
Constructor and Description |
---|
PrimaryKeyFilter(IDatabaseConnection connection,
PrimaryKeyFilter.PkTableMap allowedPKs,
boolean reverseDependency)
Default constructor, it takes as input a map with desired rows in a final
dataset; the filter will ensure that the rows necessary by these initial rows
are also allowed (and so on...).
|
Modifier and Type | Method and Description |
---|---|
void |
edgeAdded(ForeignKeyRelationshipEdge edge) |
boolean |
isValidName(String tableName)
Returns
true if specified table is allowed by this filter. |
ITableIterator |
iterator(IDataSet dataSet,
boolean reversed)
Returns iterator of tables allowed by this filter from the specified dataset.
|
void |
nodeAdded(Object node) |
String |
toString() |
accept, getTableNames
public PrimaryKeyFilter(IDatabaseConnection connection, PrimaryKeyFilter.PkTableMap allowedPKs, boolean reverseDependency)
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)reverseDependency
- flag indicating if the rows that depend on a row should
also be allowed by the filterpublic void nodeAdded(Object node)
public void edgeAdded(ForeignKeyRelationshipEdge edge)
public boolean isValidName(String tableName) throws DataSetException
AbstractTableFilter
true
if specified table is allowed by this filter.
This legacy method, now replaced by accept, still exist for compatibily
with older environmentisValidName
in class AbstractTableFilter
DataSetException
AbstractTableFilter
public ITableIterator iterator(IDataSet dataSet, boolean reversed) throws DataSetException
ITableFilter
iterator
in interface ITableFilter
iterator
in class AbstractTableFilter
dataSet
- the filtered datasetDataSetException
Copyright © 2002–2015. All rights reserved.