KickJava   Java API By Example, From Geeks To Geeks.

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


1 //$Id: ProgressDialect.java,v 1.3 2004/09/27 03:17:45 oneovthafew Exp $
2
// contributed by Phillip Baird
3
package org.hibernate.dialect;
4
5 import java.sql.Types JavaDoc;
6
7 /**
8  * An SQL dialect compatible with Progress 9.1C<br>
9  *<br>
10  * Connection Parameters required:
11  *<ul>
12  * <li>hibernate.dialect org.hibernate.sql.ProgressDialect
13  * <li>hibernate.driver com.progress.sql.jdbc.JdbcProgressDriver
14  * <li>hibernate.url jdbc:JdbcProgress:T:host:port:dbname;WorkArounds=536870912
15  * <li>hibernate.username username
16  * <li>hibernate.password password
17  *</ul>
18  * The WorkArounds parameter in the URL is required to avoid an error
19  * in the Progress 9.1C JDBC driver related to PreparedStatements.
20  * @author Phillip Baird
21  *
22  */

23 public class ProgressDialect extends Dialect {
24     public ProgressDialect() {
25         super();
26         registerColumnType( Types.BIT, "bit" );
27         registerColumnType( Types.BIGINT, "numeric" );
28         registerColumnType( Types.SMALLINT, "smallint" );
29         registerColumnType( Types.TINYINT, "tinyint" );
30         registerColumnType( Types.INTEGER, "integer" );
31         registerColumnType( Types.CHAR, "character(1)" );
32         registerColumnType( Types.VARCHAR, "varchar($l)" );
33         registerColumnType( Types.FLOAT, "real" );
34         registerColumnType( Types.DOUBLE, "double precision" );
35         registerColumnType( Types.DATE, "date" );
36         registerColumnType( Types.TIME, "time" );
37         registerColumnType( Types.TIMESTAMP, "timestamp" );
38         registerColumnType( Types.VARBINARY, "varbinary($l)" );
39         registerColumnType( Types.NUMERIC, "numeric($p,$s)" );
40     }
41
42     public boolean hasAlterTable(){
43         return false;
44     }
45
46     public String JavaDoc getAddColumnString() {
47         return "add column";
48     }
49
50     public boolean qualifyIndexName() {
51         return false;
52     }
53 }
54
55
56
57
58
59
60
61
Popular Tags