1 22 23 package org.xquark.extractor.sql; 24 25 26 public class SqlBinOpBoolean extends SqlBinaryOperator 27 { 28 29 private static final String RCSRevision = "$Revision: 1.4 $"; 30 private static final String RCSName = "$Name: $"; 31 32 private int _operator; 33 34 public SqlBinOpBoolean(int operator, SqlExpression leftOperand, SqlExpression rightOperand) 35 { 36 super ( leftOperand, rightOperand ); 37 setOperator ( operator ) ; 38 } 39 40 43 public SqlBinOpBoolean() 44 { 45 46 } 47 48 53 public int getOperator() 54 { 55 return _operator; 56 } 57 58 63 public void setOperator(int aOperator) 64 { 65 _operator = aOperator; 66 } 67 68 72 public String toSql(Context context) 73 { 74 StringBuffer retVal = new StringBuffer (); 76 77 retVal.append("("); 78 retVal.append(getLeftOperand().toSql(context)); 79 retVal.append(") "); 80 81 retVal.append(BOOLEAN_OPERATORS [_operator]); 82 83 retVal.append(" ("); 84 retVal.append(getRightOperand().toSql(context)); 85 retVal.append(")"); 86 87 return retVal.toString(); 89 } 90 } 91 | Popular Tags |