2206f803cd4f1cc74db88eaf09cfac281e0854d6
[cdmlib.git] / cdmlib-persistence / src / main / java / org / hibernate / dialect / MySQL5MyISAMUtf8Dialect.java
1 /**
2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9
10 package org.hibernate.dialect;
11
12 import java.sql.Types;
13
14
15
16 /**
17 * Extends MySQL5InnoDBDialect and sets the default charset to be UTF-8
18 * @author a.mueller
19 * /TODO licence
20 */
21 public class MySQL5MyISAMUtf8Dialect extends MySQL5Dialect {
22
23 public MySQL5MyISAMUtf8Dialect(){
24 super();
25 //see http://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.html
26 registerColumnType(Types.BOOLEAN, "bit");
27 }
28
29 public String getTableTypeString() {
30 return " ENGINE=MYISAM DEFAULT CHARSET=utf8";
31 }
32
33
34 // compare org.hibernate.dialect.MySQLMyISAMDialect
35 /* (non-Javadoc)
36 * @see org.hibernate.dialect.Dialect#dropConstraints()
37 */
38 public boolean dropConstraints() {
39 return false;
40 }
41
42 }