1 22 23 package org.xquark.extractor.sql; 24 25 import org.xquark.extractor.common.Debug; 26 27 30 public class SqlOuterJoinPredicate extends SqlExpression 31 { 32 private static final String RCSRevision = "$Revision: 1.4 $"; 33 private static final String RCSName = "$Name: $"; 34 35 private SqlExpression _predicate; 36 protected SqlRenameRelation _innerTable; 37 38 44 public SqlOuterJoinPredicate(SqlExpression predicate, SqlRenameRelation innerTable) 45 { 46 setPredicate (predicate); 47 setInnerTable (innerTable); 48 } 49 50 55 public SqlOuterJoinPredicate() { 56 } 57 58 63 public SqlExpression getPredicate() 64 { 65 return _predicate; 66 } 67 68 73 public void setPredicate(SqlExpression aPredicate) 74 { 75 Debug.assertTrue(null!=aPredicate,"null!=aPredicate"); 76 _predicate = aPredicate; 77 } 78 79 public SqlRenameRelation getInnerTable() 80 { 81 return _innerTable; 82 } 83 84 public void setInnerTable(SqlRenameRelation innerTable) 85 { 86 Debug.assertTrue(null != innerTable, "null != innerTable"); 87 _innerTable = innerTable; 88 } 89 90 public String toSql(Context context) 91 { 92 context.outerJoinPredicate = true; 94 context.innerTable = getInnerTable(); 95 96 String retVal = getPredicate().toSql(context); 97 98 context.outerJoinPredicate = false; 99 context.innerTable = null; 100 101 return retVal; 103 } 104 } 105 | Popular Tags |