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 DatabaseHandler is used when you do not have a database
24 * installed.
25 *
26 * @author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
27 * @author <a href="mailto:bmclaugh@algx.net">Brett McLaughlin</a>
28 * @version $Id: DBNone.java 239630 2005-08-24 12:25:32Z henning $
29 */
30 public class DBNone extends DB
31 {
32
33 /***
34 * Empty protected constructor.
35 */
36 protected DBNone()
37 {
38 }
39
40 /***
41 * @return null
42 */
43 public Connection getConnection()
44 {
45 return null;
46 }
47
48 /***
49 * This method is used to ignore case.
50 *
51 * @param in The string to transform to upper case.
52 * @return The upper case string.
53 */
54 public String toUpperCase(String in)
55 {
56 return in;
57 }
58
59 /***
60 * This method is used to ignore case.
61 *
62 * @param in The string whose case to ignore.
63 * @return The string in a case that can be ignored.
64 */
65 public String ignoreCase(String in)
66 {
67 return in;
68 }
69
70 /***
71 * @see org.apache.torque.adapter.DB#getIDMethodType()
72 */
73 public String getIDMethodType()
74 {
75 return NO_ID_METHOD;
76 }
77
78 /***
79 * @see org.apache.torque.adapter.DB#getIDMethodSQL(Object obj)
80 */
81 public String getIDMethodSQL(Object obj)
82 {
83 return null;
84 }
85
86 /***
87 * Locks the specified table.
88 *
89 * @param con The JDBC connection to use.
90 * @param table The name of the table to lock.
91 * @exception SQLException No Statement could be created or executed.
92 */
93 public void lockTable(Connection con, String table) throws SQLException
94 {
95 }
96
97 /***
98 * Unlocks the specified table.
99 *
100 * @param con The JDBC connection to use.
101 * @param table The name of the table to unlock.
102 * @exception SQLException No Statement could be created or executed.
103 */
104 public void unlockTable(Connection con, String table) throws SQLException
105 {
106 }
107 }