Project

General

Profile

Download (871 Bytes) Statistics
| Branch: | Tag: | Revision:
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
import org.hibernate.dialect.MySQL5InnoDBDialect;
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 MySQL5InnoDBUtf8Dialect extends MySQL5InnoDBDialect {
22

    
23
    
24
	public MySQL5InnoDBUtf8Dialect(){
25
		super();
26
		//see http://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.html
27
		registerColumnType(Types.BOOLEAN, "bit");
28
	}
29
	
30
	public String getTableTypeString() {
31
        return " ENGINE=InnoDB DEFAULT CHARSET=utf8";
32
    }
33
    
34
}
(3-3/4)