|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dbunit.util.search.AbstractNodesFilterSearchCallback
public abstract class AbstractNodesFilterSearchCallback
Super-class for ISearchCallback implementations that needs to filter which
nodes should be included or excluded from the search.
This class implements the searchNode()
based on its internal
mode, which could be ALLOW_MODE
, DENY_MODE
or
NO_MODE
:
NO_MODE
is the default mode and means searchNode()
always return trueALLOW_MODE
is set when setAllowedNodes()
is called
and it means searchNode()
will return true only if the node is
contained on the Set (or array) passed to setAllowedNodes()
DENY_MODE
is set when setDeniedNodes()
is called
and it means searchNode()
will return true only if the node is
not contained on the Set (or array) passed to setDeniedNodes()
Field Summary | |
---|---|
protected static int |
ALLOW_MODE
|
protected static int |
DENY_MODE
|
protected org.slf4j.Logger |
logger
|
protected static int |
NO_MODE
|
Constructor Summary | |
---|---|
AbstractNodesFilterSearchCallback()
Default constructor. |
Method Summary | |
---|---|
protected java.util.Set |
getFilteredNodes()
Get which modes are allowed/denied, depending on the operation mode. |
protected int |
getFilteringMode()
Get the operation mode |
void |
nodeAdded(java.lang.Object fromNode)
Do nothing... |
boolean |
searchNode(java.lang.Object node)
Decides if a node should be searched or not |
protected void |
setAllowedNodes(java.lang.Object[] filteredNodes)
Set which modes are allowed on the search. |
protected void |
setAllowedNodes(java.util.Set filteredNodes)
Set which modes are allowed on the search. |
protected void |
setDeniedNodes(java.lang.Object[] filteredNodes)
Set which modes are not allowed on the search. |
protected void |
setDeniedNodes(java.util.Set filteredNodes)
Set which modes are not allowed on the search. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.dbunit.util.search.ISearchCallback |
---|
getEdges |
Field Detail |
---|
protected final org.slf4j.Logger logger
protected static final int NO_MODE
protected static final int ALLOW_MODE
protected static final int DENY_MODE
Constructor Detail |
---|
public AbstractNodesFilterSearchCallback()
Method Detail |
---|
protected java.util.Set getFilteredNodes()
protected int getFilteringMode()
protected void setAllowedNodes(java.util.Set filteredNodes)
filteredNodes
- which modes are allowed on the search.protected void setAllowedNodes(java.lang.Object[] filteredNodes)
filteredNodes
- which modes are allowed on the search.protected void setDeniedNodes(java.util.Set filteredNodes)
filteredNodes
- which modes are not allowed on the search.protected void setDeniedNodes(java.lang.Object[] filteredNodes)
filteredNodes
- which modes are not allowed on the search.public void nodeAdded(java.lang.Object fromNode) throws SearchException
nodeAdded
in interface ISearchCallback
fromNode
- node that has been added.
SearchException
public boolean searchNode(java.lang.Object node) throws SearchException
ISearchCallback
searchNode
in interface ISearchCallback
node
- node to be filtered
SearchException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |