1 package org.apache.torque.adapter; 2 3 21 22 import java.sql.Connection ; 23 import java.sql.SQLException ; 24 import java.sql.Statement ; 25 26 33 public class DBInformix extends AbstractDBAdapter 34 { 35 38 private static final long serialVersionUID = 2599963509284952957L; 39 40 43 protected DBInformix() 44 { 45 } 46 47 55 public String toUpperCase(String in) 56 { 57 return in; 58 } 59 60 68 public String ignoreCase(String in) 69 { 70 return in; 71 } 72 73 76 public String getIDMethodType() 77 { 78 return NO_ID_METHOD; 79 } 80 81 84 public String getIDMethodSQL(Object obj) 85 { 86 return null; 87 } 88 89 96 public void lockTable(Connection con, String table) throws SQLException 97 { 98 Statement statement = con.createStatement(); 99 100 StringBuffer stmt = new StringBuffer (); 101 stmt.append("LOCK TABLE ") 102 .append(table) 103 .append(" IN EXCLUSIVE MODE"); 104 105 statement.executeQuery(stmt.toString()); 106 } 107 108 115 public void unlockTable(Connection con, String table) throws SQLException 116 { 117 con.commit(); 121 } 122 } 123 | Popular Tags |