%line | %branch | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
org.apache.torque.adapter.DBHypersonicSQL |
|
|
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 to Hypersonic SQL databases. |
|
24 | * |
|
25 | * <a href="http://hsql.oron.ch/">http://hsql.oron.ch</a> |
|
26 | * |
|
27 | * @author <a href="mailto:celkins@scardini.com">Christopher Elkins</a> |
|
28 | * @version $Id: DBHypersonicSQL.java 239630 2005-08-24 12:25:32Z henning $ |
|
29 | */ |
|
30 | public class DBHypersonicSQL |
|
31 | extends DB |
|
32 | { |
|
33 | /** |
|
34 | * Constructor. |
|
35 | */ |
|
36 | protected DBHypersonicSQL() |
|
37 | 0 | { |
38 | 0 | } |
39 | ||
40 | /** |
|
41 | * This method is used to ignore case. |
|
42 | * |
|
43 | * @param in The string to transform to upper case. |
|
44 | * @return The upper case string. |
|
45 | */ |
|
46 | public String toUpperCase(String in) |
|
47 | { |
|
48 | 0 | String s = new StringBuffer("UPPER(").append(in).append(")").toString(); |
49 | 0 | return s; |
50 | } |
|
51 | ||
52 | /** |
|
53 | * This method is used to ignore case. |
|
54 | * |
|
55 | * @param in The string whose case to ignore. |
|
56 | * @return The string in a case that can be ignored. |
|
57 | */ |
|
58 | public String ignoreCase(String in) |
|
59 | { |
|
60 | 0 | return toUpperCase(in); |
61 | } |
|
62 | ||
63 | /** |
|
64 | * @see org.apache.torque.adapter.DB#getIDMethodType() |
|
65 | */ |
|
66 | public String getIDMethodType() |
|
67 | { |
|
68 | 0 | return AUTO_INCREMENT; |
69 | } |
|
70 | ||
71 | /** |
|
72 | * @see org.apache.torque.adapter.DB#getIDMethodSQL(Object obj) |
|
73 | */ |
|
74 | public String getIDMethodSQL(Object obj) |
|
75 | { |
|
76 | 0 | StringBuffer command = new StringBuffer("select IDENTITY() from "); |
77 | 0 | String qualifiedIdentifier = (String) obj; |
78 | 0 | command.append(qualifiedIdentifier); |
79 | 0 | return command.toString(); |
80 | } |
|
81 | ||
82 | /** |
|
83 | * Locks the specified table. |
|
84 | * |
|
85 | * @param con The JDBC connection to use. |
|
86 | * @param table The name of the table to lock. |
|
87 | * @exception SQLException No Statement could be created or executed. |
|
88 | */ |
|
89 | public void lockTable(Connection con, String table) throws SQLException |
|
90 | { |
|
91 | 0 | } |
92 | ||
93 | /** |
|
94 | * Unlocks the specified table. |
|
95 | * |
|
96 | * @param con The JDBC connection to use. |
|
97 | * @param table The name of the table to unlock. |
|
98 | * @exception SQLException No Statement could be created or executed. |
|
99 | */ |
|
100 | public void unlockTable(Connection con, String table) throws SQLException |
|
101 | { |
|
102 | 0 | } |
103 | } |
This report is generated by jcoverage, Maven and Maven JCoverage Plugin. |