1 22 23 package org.xquark.extractor.sql; 24 25 26 public class SqlBinOpUnion extends SqlBinaryOperator implements Executable 27 { 28 29 private static final String RCSRevision = "$Revision: 1.4 $"; 30 private static final String RCSName = "$Name: $"; 31 32 33 private int _operator; 34 35 41 public SqlBinOpUnion(int operator, SqlExpression leftOperand, SqlExpression rightOperand) 42 { 43 super ( leftOperand, rightOperand ); 44 _operator = operator ; 45 } 46 47 52 public SqlBinOpUnion() 53 { 54 55 } 56 57 61 public int getOperator() 62 { 63 return _operator; 64 } 65 66 70 public void setOperator(int aOperator) 71 { 72 _operator = aOperator; 73 } 74 75 79 public String toSql(Context context) 80 { 81 StringBuffer retVal = new StringBuffer (); 83 84 retVal.append(getLeftOperand().toSql(context)) ; 85 retVal.append(" "); 86 retVal.append(UNION_MODE [_operator]); 87 retVal.append(" "); 88 retVal.append(getRightOperand().toSql(context)); 89 90 return retVal.toString(); 92 } 93 } 94 | Popular Tags |