1 package org.apache.torque.adapter;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 /***
20 * Torque Database Adapter for DB2/400 on the IBM AS400 platform.
21 *
22 * @author <a href="mailto:sweaver@rippe.com">Scott Weaver</a>
23 * @author <a href="mailto:vido@ldh.org">Augustin Vidovic</a>
24 * @version $Id: DBDB2400.java 239630 2005-08-24 12:25:32Z henning $
25 */
26 public class DBDB2400 extends DBDB2App
27 {
28 /***
29 * UpperCase/IgnoreCase sql function in DB2/400
30 */
31 public static final String UCASE = "UCASE";
32
33
34 /***
35 * DBDB2400 constructor.
36 */
37 protected DBDB2400()
38 {
39 super();
40 }
41
42 /***
43 * This method is used to ignore case.
44 *
45 * @param in The string whose case to ignore.
46 * @return The string in a case that can be ignored.
47 */
48 public String ignoreCase(String in)
49 {
50 String s = formatCase(in);
51 return s;
52 }
53
54 /***
55 * This method is used to ignore case.
56 *
57 * @param in The string to transform to upper case.
58 * @return The upper case string.
59 */
60 public String toUpperCase(String in)
61 {
62 String s = formatCase(in);
63 return s;
64 }
65
66 /***
67 * Convenience method for String-formatting
68 * upper/ignore case statements.
69 *
70 * @param in The string to transform to upper case.
71 * @return The upper case string.
72 */
73 private String formatCase(String in)
74 {
75 return new StringBuffer(UCASE + "(").append(in).append(")").toString();
76 }
77
78 /***
79 * This method is used to check whether the database supports
80 * limiting the size of the resultset.
81 *
82 * @return LIMIT_STYLE_DB2.
83 */
84 public int getLimitStyle()
85 {
86 return DB.LIMIT_STYLE_DB2;
87 }
88 }