1 22 23 package org.xquark.extractor.sql; 24 25 26 public class SqlBinOpCompareAny extends SqlBinaryOperator 27 { 28 private static final String RCSRevision = "$Revision: 1.5 $"; 29 private static final String RCSName = "$Name: $"; 30 protected int _operator; 31 32 40 public SqlBinOpCompareAny(int operator, SqlExpression leftOperand, SqlExpression rightOperand) 41 { 42 super ( leftOperand, rightOperand ); 43 setOperator ( operator ) ; 44 } 45 46 49 public SqlBinOpCompareAny() 50 { 51 52 } 53 54 59 public int getOperator() 60 { 61 return _operator; 62 } 63 64 69 public void setOperator(int aOperator) 70 { 71 _operator = aOperator; 72 } 73 74 78 public String toSql(Context context) 79 { 80 82 String retVal ; 83 84 retVal = "" ; 85 retVal = " ( "+getLeftOperand().toSql(context)+ " ) " ; 86 retVal += " " + COMPOPSSTRINGS [_operator] + " ANY " ; 87 if (getRightOperand() instanceof SqlLitList) { 88 retVal += getRightOperand().toSql(context); 89 } 90 else { 91 retVal += " ( "+getRightOperand().toSql(context)+ " ) " ; 92 } 93 94 return retVal ; 96 } 97 } 98 | Popular Tags |