1 22 23 package org.xquark.extractor.sybase.sql; 24 25 import java.util.List ; 26 27 import org.xquark.extractor.sql.Context; 28 import org.xquark.extractor.sql.SqlExpression; 29 30 public class SqlValueList extends org.xquark.extractor.sql.SqlExpression { 31 private static final String RCSRevision = "$Revision: 1.4 $"; 32 private static final String RCSName = "$Name: $"; 33 34 35 private List _valueList = null; 36 public SqlValueList() { 37 super(); 38 } 39 40 public SqlValueList(List valueList) { 41 super(); 42 setValueList(valueList); 43 } 44 45 public void setValueList(List valueList) { 46 _valueList = valueList; 47 } 48 49 public List getValueList() { 50 return _valueList; 51 } 52 53 public String toSql(Context context) { 54 StringBuffer retVal = new StringBuffer (); 56 57 retVal.append(" ("); 58 59 SqlExpression value = null; 60 for (int i = 0; i < getValueList().size(); i++) { 61 value = (SqlExpression)getValueList().get(i); 62 retVal.append(value.toSql(context)); 63 if (i != getValueList().size()-1 ) { 64 retVal.append(" , "); 65 } 66 } 67 retVal.append(")"); 68 69 return retVal.toString() ; 71 } 72 73 } 74 75 | Popular Tags |