1 package org.apache.torque.adapter;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 import java.sql.Connection;
20 import java.sql.SQLException;
21
22 /***
23 * This is used to connect via the NET-Driver to DB2 databases.
24 *
25 * <p>
26 * <a href="http://www-4.ibm.com/software/data/db2/">
27 * http://www-4.ibm.com/software/data/db2/
28 * </a>
29 *
30 * @author <a href="mailto:hakan42@gmx.de">Hakan Tandogan</a>
31 * @author <a href="mailto:vido@ldh.org">Augustin Vidovic</a>
32 * @version $Id: DBDB2Net.java 239630 2005-08-24 12:25:32Z henning $
33 */
34 public class DBDB2Net
35 extends DB
36 {
37 /***
38 * Empty constructor.
39 */
40 protected DBDB2Net()
41 {
42 }
43
44 /***
45 * This method is used to ignore case.
46 *
47 * @param in The string to transform to upper case.
48 * @return The upper case string.
49 */
50 public String toUpperCase(String in)
51 {
52 String s = new StringBuffer("UPPER(").append(in).append(")").toString();
53 return s;
54 }
55
56 /***
57 * This method is used to ignore case.
58 *
59 * @param in The string whose case to ignore.
60 * @return The string in a case that can be ignored.
61 */
62 public String ignoreCase(String in)
63 {
64 String s = new StringBuffer("UPPER(").append(in).append(")").toString();
65 return s;
66 }
67
68 /***
69 * @see org.apache.torque.adapter.DB#getIDMethodType()
70 */
71 public String getIDMethodType()
72 {
73 return NO_ID_METHOD;
74 }
75
76 /***
77 * @see org.apache.torque.adapter.DB#getIDMethodSQL(Object obj)
78 */
79 public String getIDMethodSQL(Object obj)
80 {
81 return null;
82 }
83
84 /***
85 * Locks the specified table.
86 *
87 * @param con The JDBC connection to use.
88 * @param table The name of the table to lock.
89 * @exception SQLException No Statement could be created or executed.
90 */
91 public void lockTable(Connection con, String table) throws SQLException
92 {
93 }
94
95 /***
96 * Unlocks the specified table.
97 *
98 * @param con The JDBC connection to use.
99 * @param table The name of the table to unlock.
100 * @exception SQLException No Statement could be created or executed.
101 */
102 public void unlockTable(Connection con, String table) throws SQLException
103 {
104 }
105
106 /***
107 * This method is used to check whether the database supports
108 * limiting the size of the resultset.
109 *
110 * @return LIMIT_STYLE_DB2.
111 */
112 public int getLimitStyle()
113 {
114 return DB.LIMIT_STYLE_DB2;
115 }
116 }