KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > dialect > DB2390Dialect


1 //$Id: DB2390Dialect.java,v 1.4 2005/02/13 13:48:39 oneovthafew Exp $
2
package org.hibernate.dialect;
3
4 /**
5  * An SQL dialect for DB2/390. This class provides support for
6  * DB2 Universal Database for OS/390, also known as DB2/390.
7  *
8  * @author Kristoffer Dyrkorn
9  */

10 public class DB2390Dialect extends DB2Dialect {
11
12     public boolean supportsSequences() {
13         return false;
14     }
15
16     public String JavaDoc getIdentitySelectString() {
17         return "select identity_val_local() from sysibm.sysdummy1";
18     }
19
20     public boolean supportsLimit() {
21         return true;
22     }
23
24     public boolean supportsLimitOffset() {
25         return false;
26     }
27
28     public String JavaDoc getLimitString(String JavaDoc sql, int offset, int limit) {
29         return new StringBuffer JavaDoc(sql.length() + 40)
30             .append(sql)
31             .append(" fetch first ")
32             .append(limit)
33             .append(" rows only ")
34             .toString();
35     }
36
37     public boolean useMaxForLimit() {
38         return true;
39     }
40
41     public boolean supportsVariableLimit() {
42         return false;
43     }
44
45 }
Popular Tags