// strip off trailing vacuous constant if present
if ( andOperator.getRightOperand() instanceof BooleanConstantNode )
{ 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 constant if present
if ( orOperator.getRightOperand() instanceof BooleanConstantNode )
{ 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 );
}