andOperator.getRightOperand() instanceof BooleanConstantNode &&
( ((BooleanConstantNode) andOperator.getRightOperand()).isBooleanTrue() )
)
{ return makeRestriction( andOperator.getLeftOperand(), columnNameMap ); }
Restriction leftRestriction = makeRestriction( andOperator.getLeftOperand(), columnNameMap );
Restriction rightRestriction = makeRestriction( andOperator.getRightOperand(), columnNameMap );
if ( (leftRestriction == null) || (rightRestriction == null) ) { return null; }
return new Restriction.AND( leftRestriction, rightRestriction );
}
else if ( clause instanceof OrNode )
{
OrNode orOperator = (OrNode) clause;
// strip off trailing vacuous FALSE constant if present
if (
orOperator.getRightOperand() instanceof BooleanConstantNode &&
( ((BooleanConstantNode) orOperator.getRightOperand()).isBooleanFalse() )
)
{ return makeRestriction( orOperator.getLeftOperand(), columnNameMap ); }
Restriction leftRestriction = makeRestriction( orOperator.getLeftOperand(), columnNameMap );
Restriction rightRestriction = makeRestriction( orOperator.getRightOperand(), columnNameMap );
if ( (leftRestriction == null) || (rightRestriction == null) ) { return null; }
return new Restriction.OR( leftRestriction, rightRestriction );
}