%line | %branch | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
org.apache.torque.adapter.DBDB2App |
|
|
1 | package org.apache.torque.adapter; |
|
2 | ||
3 | /* |
|
4 | * Copyright 2001-2005 The Apache Software Foundation. |
|
5 | * |
|
6 | * Licensed under the Apache License, Version 2.0 (the "License") |
|
7 | * you may not use this file except in compliance with the License. |
|
8 | * You may obtain a copy of the License at |
|
9 | * |
|
10 | * http://www.apache.org/licenses/LICENSE-2.0 |
|
11 | * |
|
12 | * Unless required by applicable law or agreed to in writing, software |
|
13 | * distributed under the License is distributed on an "AS IS" BASIS, |
|
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
15 | * See the License for the specific language governing permissions and |
|
16 | * limitations under the License. |
|
17 | */ |
|
18 | ||
19 | import java.sql.Connection; |
|
20 | import java.sql.SQLException; |
|
21 | ||
22 | /** |
|
23 | * This is used to connect via the Application-Driver to DB2 |
|
24 | * databases. |
|
25 | * |
|
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: DBDB2App.java 239630 2005-08-24 12:25:32Z henning $ |
|
33 | */ |
|
34 | public class DBDB2App extends DB |
|
35 | { |
|
36 | /** |
|
37 | * Empty constructor. |
|
38 | */ |
|
39 | protected DBDB2App() |
|
40 | 0 | { |
41 | 0 | } |
42 | ||
43 | /** |
|
44 | * This method is used to ignore case. |
|
45 | * |
|
46 | * @param in The string to transform to upper case. |
|
47 | * @return The upper case string. |
|
48 | */ |
|
49 | public String toUpperCase(String in) |
|
50 | { |
|
51 | 0 | String s = new StringBuffer("UPPER(").append(in).append(")").toString(); |
52 | 0 | return s; |
53 | } |
|
54 | ||
55 | /** |
|
56 | * This method is used to ignore case. |
|
57 | * |
|
58 | * @param in The string whose case to ignore. |
|
59 | * @return The string in a case that can be ignored. |
|
60 | */ |
|
61 | public String ignoreCase(String in) |
|
62 | { |
|
63 | 0 | String s = new StringBuffer("UPPER(").append(in).append(")").toString(); |
64 | 0 | return s; |
65 | } |
|
66 | ||
67 | /** |
|
68 | * @see org.apache.torque.adapter.DB#getIDMethodType() |
|
69 | */ |
|
70 | public String getIDMethodType() |
|
71 | { |
|
72 | 0 | return NO_ID_METHOD; |
73 | } |
|
74 | ||
75 | /** |
|
76 | * @see org.apache.torque.adapter.DB#getIDMethodSQL(Object obj) |
|
77 | */ |
|
78 | public String getIDMethodSQL(Object obj) |
|
79 | { |
|
80 | 0 | return null; |
81 | } |
|
82 | ||
83 | /** |
|
84 | * Locks the specified table. |
|
85 | * |
|
86 | * @param con The JDBC connection to use. |
|
87 | * @param table The name of the table to lock. |
|
88 | * @exception SQLException No Statement could be created or executed. |
|
89 | */ |
|
90 | public void lockTable(Connection con, String table) throws SQLException |
|
91 | { |
|
92 | 0 | } |
93 | ||
94 | /** |
|
95 | * Unlocks the specified table. |
|
96 | * |
|
97 | * @param con The JDBC connection to use. |
|
98 | * @param table The name of the table to unlock. |
|
99 | * @exception SQLException No Statement could be created or executed. |
|
100 | */ |
|
101 | public void unlockTable(Connection con, String table) throws SQLException |
|
102 | { |
|
103 | 0 | } |
104 | ||
105 | /** |
|
106 | * This method is used to check whether the database supports |
|
107 | * limiting the size of the resultset. |
|
108 | * |
|
109 | * @return LIMIT_STYLE_DB2. |
|
110 | */ |
|
111 | public int getLimitStyle() |
|
112 | { |
|
113 | 0 | return DB.LIMIT_STYLE_DB2; |
114 | } |
|
115 | } |
This report is generated by jcoverage, Maven and Maven JCoverage Plugin. |