1 22 23 package org.xquark.extractor.algebra; 24 25 import java.util.ArrayList ; 26 import java.util.List ; 27 import java.util.Map ; 28 29 import org.xquark.extractor.common.SqlWrapperException; 30 import org.xquark.extractor.sql.SqlExpression; 31 32 36 public final class ConstantTempTable extends Table 37 { 38 39 private static final String RCSRevision = "$Revision: 1.3 $"; 40 private static final String RCSName = "$Name: $"; 41 42 43 protected List _tuples; 44 45 46 public ConstantTempTable(org.xquark.extractor.metadata.Table mTable) { 47 super(mTable); 48 } 49 50 51 synchronized Object clone(Map clonedExprs) throws CloneNotSupportedException { 52 54 ConstantTempTable retVal = (ConstantTempTable)super.clone(clonedExprs); 55 56 clonedExprs.put(this, retVal); 57 return retVal; 59 } 60 61 62 public void addValues(List values) { 63 if (null == _tuples ) { 64 _tuples = new ArrayList (); 65 } 66 _tuples.add(values); 67 } 68 69 public List getValues() { 70 return _tuples; 71 } 72 73 public SqlExpression accept (GenSqlVisitor visitor) throws SqlWrapperException { 74 return visitor.visit(this); 75 } 76 77 public void accept (AlgebraVisitor visitor) throws SqlWrapperException { 78 visitor.visit(this); 79 } 80 81 } 82 | Popular Tags |