1 22 23 package org.xquark.extractor.sql; 24 25 import java.util.List ; 26 27 import org.xquark.extractor.common.Debug; 28 29 public class SfConcat extends SqlFunction 30 { 31 private static final String RCSRevision = "$Revision: 1.4 $"; 32 private static final String RCSName = "$Name: $"; 33 34 37 public SfConcat() 38 { 39 super("SfConcat"); 40 } 41 42 46 public SfConcat(List arguments) 47 { 48 super("SfConcat",arguments); 49 } 50 51 public String toSql (Context context) 52 { 53 55 StringBuffer retVal = new StringBuffer (); 56 List args = getArguments(); 57 Debug.assertTrue( 1<args.size(),"1<args.size()"); 58 59 for (int i = 0; i < args.size(); i++) { 60 SqlExpression item = (SqlExpression)args.get(i); 61 retVal.append(item.toSql(context)); 62 retVal.append(" || "); 63 } 64 retVal.delete(retVal.length()-4,retVal.length()-1); 65 66 return retVal.toString(); 68 } 69 } 70 | Popular Tags |