1 22 23 package org.xquark.extractor.algebra; 24 25 import org.xquark.extractor.common.SqlWrapperException; 26 import org.xquark.extractor.sql.SqlExpression; 27 28 public final class BinOpCompare extends BinaryAtomicOp 29 { 30 31 private static final String RCSRevision = "$Revision: 1.3 $"; 32 private static final String RCSName = "$Name: $"; 33 34 protected int _operator; 35 36 42 43 public BinOpCompare(int operator, Expression leftOperand, Expression rightOperand) 44 { 45 super (leftOperand, rightOperand) ; 46 _operator = operator ; 47 } 48 public int getOperator () 49 { 50 return _operator; 51 } 52 public void setOperator (int oprtr) 53 { 54 _operator = oprtr; 55 } 56 57 public String pprint() 58 { 59 return getLeftOperand().pprint() + " " + Constants.COMPOPSSTRINGS[_operator] + " " + getRightOperand().pprint(); 60 } 61 62 public SqlExpression accept (GenSqlVisitor visitor) throws SqlWrapperException 63 { 64 return visitor.visit(this); 65 } 66 67 public void accept (AlgebraVisitor visitor) throws SqlWrapperException 68 { 69 visitor.visit(this); 70 } 71 } 72 | Popular Tags |