1 2 12 package com.versant.core.jdbc.sql.exp; 13 14 import com.versant.core.jdbc.sql.SqlDriver; 15 import com.versant.core.jdbc.metadata.JdbcTypes; 16 import com.versant.core.util.CharBuf; 17 18 20 public class CollectionParamExp extends ParamExp { 21 public ColumnExp field; 22 23 public CollectionParamExp(ColumnExp field) { 24 this.field = field; 25 } 26 27 public void appendSQLImp(SqlDriver driver, CharBuf s, SqlExp leftSibling) { 28 firstCharIndex = s.size(); 29 field.appendSQL(driver, s, null); 30 s.append(" in ("); 31 firstCharIndex = s.size(); 32 s.append(')'); 33 } 34 35 public String toString() { 36 String n = getClass().getName(); 37 int i = n.lastIndexOf('.'); 38 if (i >= 0) n = n.substring(i + 1); 39 return n + "@" + Integer.toHexString(System.identityHashCode(this)) 40 + " " + JdbcTypes.toString(jdbcType); 41 } 42 } 43 | Popular Tags |