1 package org.apache.torque.adapter; 2 3 21 22 import java.sql.Connection ; 23 import java.sql.SQLException ; 24 25 33 public class DBHypersonicSQL extends AbstractDBAdapter 34 { 35 38 private static final long serialVersionUID = 8392727399615702372L; 39 40 43 protected DBHypersonicSQL() 44 { 45 } 46 47 53 public String toUpperCase(String in) 54 { 55 String s = new StringBuffer ("UPPER(").append(in).append(")").toString(); 56 return s; 57 } 58 59 65 public String ignoreCase(String in) 66 { 67 return toUpperCase(in); 68 } 69 70 73 public String getIDMethodType() 74 { 75 return AUTO_INCREMENT; 76 } 77 78 81 public String ignoreCaseInOrderBy(String in) 82 { 83 return "CAST(" + in + " AS VARCHAR_IGNORECASE)"; 84 } 85 86 89 public String getIDMethodSQL(Object obj) 90 { 91 StringBuffer command = new StringBuffer ("select IDENTITY() from "); 92 String qualifiedIdentifier = (String ) obj; 93 command.append(qualifiedIdentifier); 94 return command.toString(); 95 } 96 97 104 public void lockTable(Connection con, String table) throws SQLException 105 { 106 } 107 108 115 public void unlockTable(Connection con, String table) throws SQLException 116 { 117 } 118 119 126 public boolean escapeText() 127 { 128 return false; 129 } 130 131 140 public boolean useEscapeClauseForLike() 141 { 142 return true; 143 } 144 } 145 | Popular Tags |