1 package jimm.datavision.source.ncsql; 2 import jimm.datavision.Report; 3 import jimm.datavision.source.sql.SQLQuery; 4 import jimm.util.StringUtils; 5 import java.util.List ; 6 7 13 public class NCQuery extends SQLQuery { 14 15 20 public NCQuery(Report report) { 21 super(report); 22 } 23 24 33 public String quoted(String name) { 34 List components = StringUtils.split(name, "."); 35 int len = components.size(); 36 for (int i = 0; i < len; ++i) { 37 String component = (String )components.get(i); 38 if (component.indexOf(" ") >= 0 41 || !component.equals(component.toLowerCase())) 42 components.set(i, "\"" + component + "\""); 43 } 44 return StringUtils.join(components, "."); 45 } 46 47 } 48 | Popular Tags |