1 package org.apache.torque.adapter; 2 3 21 22 import java.io.Serializable ; 23 import java.sql.Connection ; 24 import java.sql.SQLException ; 25 import java.util.Date ; 26 27 import org.apache.torque.TorqueException; 28 import org.apache.torque.util.Query; 29 30 67 public interface DB extends Serializable , IDMethod 68 { 69 72 int LIMIT_STYLE_NONE = 0; 73 74 77 int LIMIT_STYLE_POSTGRES = 1; 78 79 82 int LIMIT_STYLE_MYSQL = 2; 83 84 87 int LIMIT_STYLE_SYBASE = 3; 88 89 92 int LIMIT_STYLE_ORACLE = 4; 93 94 97 int LIMIT_STYLE_DB2 = 5; 98 99 102 String ADAPTER_KEY = "adapter"; 103 104 107 String DRIVER_KEY = "driver"; 108 109 115 String toUpperCase(String in); 116 117 124 char getStringDelimiter(); 125 126 133 String getIDMethodType(); 134 135 143 String getIDMethodSQL(Object obj); 144 145 152 void lockTable(Connection con, String table) 153 throws SQLException ; 154 155 162 void unlockTable(Connection con, String table) 163 throws SQLException ; 164 165 174 String ignoreCase(String in); 175 176 185 String ignoreCaseInOrderBy(String in); 186 187 194 boolean supportsNativeLimit(); 195 196 204 boolean supportsNativeOffset(); 205 206 216 void generateLimits(Query query, int offset, int limit) 217 throws TorqueException; 218 219 227 228 boolean escapeText(); 229 230 237 int getLimitStyle(); 238 239 246 String getDateString(Date date); 247 248 254 String getBooleanString(Boolean b); 255 256 262 boolean useIlike(); 263 264 270 boolean useEscapeClauseForLike(); 271 } 272 | Popular Tags |