ValueNode searchClause)
throws StandardException
{
AndNode thisAnd;
AndNode topAnd;
JBitSet newJBitSet;
Predicate newPred;
BooleanConstantNode trueNode = null;
if (searchClause != null)
{
topAnd = (AndNode) searchClause;
searchClause = null;
trueNode = (BooleanConstantNode) getNodeFactory().getNode(
C_NodeTypes.BOOLEAN_CONSTANT_NODE,
Boolean.TRUE,
getContextManager());
while (topAnd.getRightOperand() instanceof AndNode)
{
/* Break out the next top AndNode */
thisAnd = topAnd;
topAnd = (AndNode) topAnd.getRightOperand();
thisAnd.setRightOperand(null);
/* Set the rightOperand to true */
thisAnd.setRightOperand(trueNode);
/* Add the top AndNode to the PredicateList */
newJBitSet = new JBitSet(numTables);
newPred = (Predicate) getNodeFactory().getNode(
C_NodeTypes.PREDICATE,
thisAnd,
newJBitSet,
getContextManager());
addPredicate(newPred);
}
/* Add the last top AndNode to the PredicateList */
newJBitSet = new JBitSet(numTables);
newPred = (Predicate) getNodeFactory().getNode(
C_NodeTypes.PREDICATE,
topAnd,
newJBitSet,
getContextManager());