org.ujoframework.orm.dialect
Class MySqlDialect

java.lang.Object
  extended by org.ujoframework.orm.SqlDialect
      extended by org.ujoframework.orm.dialect.MySqlDialect

public class MySqlDialect
extends SqlDialect

Dialect for the MySQL since release 5.0 for the InnoDB engine.
http://dev.mysql.com/


Field Summary
 
Fields inherited from class org.ujoframework.orm.SqlDialect
COMMON_SEQ_TABLE_KEY, COMMON_SEQ_TABLE_NAME, ormHandler
 
Constructor Summary
MySqlDialect()
           
 
Method Summary
protected  java.lang.String getColumnType(MetaColumn column)
          MySQL dialect uses a database type DATETIME (instead of the TIMESTAMP) for the java.util.Date.
protected  java.lang.String getEngine()
          Returns a MySQL enginge.
 java.lang.String getJdbcDriver()
          Returns a JDBC driver class name.
 java.lang.String getJdbcUrl()
          Returns a default JDBC URL
 java.lang.Appendable printDelete(MetaTable table, CriterionDecoder decoder, java.lang.Appendable out)
          Print an SQL DELETE statement.
 java.lang.Appendable printSequenceTable(MetaDatabase db, java.lang.Appendable out)
          Print SQL CREATE SEQUENCE.
 java.lang.Appendable printTable(MetaTable table, java.lang.Appendable out)
          Print a SQL sript to create table
 
Methods inherited from class org.ujoframework.orm.SqlDialect
createConnection, createJndiInitialContext, getCriterionTemplate, getKeywordSet, isUsable, printAlterTable, printCall, printColumnAlias, printColumnDeclaration, printCommit, printCreateSchema, printCriterion, printDefaultSchema, printDefaultValue, printFKColumnsDeclaration, printForeignKey, printForeignKey, printFullTableName, printIndex, printInsert, println, printLockForSelect, printOffset, printSelect, printSelectOrder, printSelectTable, printSelectView, printSequenceCurrentValue, printSequenceInit, printSequenceNextValue, printSequenceTableName, printSetMaxSequence, printTableAliasDefinition, printTableColumns, printUpdate, setHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MySqlDialect

public MySqlDialect()
Method Detail

getJdbcUrl

public java.lang.String getJdbcUrl()
Description copied from class: SqlDialect
Returns a default JDBC URL

Specified by:
getJdbcUrl in class SqlDialect

getJdbcDriver

public java.lang.String getJdbcDriver()
Description copied from class: SqlDialect
Returns a JDBC driver class name.

Specified by:
getJdbcDriver in class SqlDialect

printDelete

public java.lang.Appendable printDelete(MetaTable table,
                                        CriterionDecoder decoder,
                                        java.lang.Appendable out)
                                 throws java.io.IOException
Print an SQL DELETE statement.

Overrides:
printDelete in class SqlDialect
Throws:
java.io.IOException

printSequenceTable

public java.lang.Appendable printSequenceTable(MetaDatabase db,
                                               java.lang.Appendable out)
                                        throws java.io.IOException
Description copied from class: SqlDialect
Print SQL CREATE SEQUENCE. No JDBC parameters.

Overrides:
printSequenceTable in class SqlDialect
Throws:
java.io.IOException

printTable

public java.lang.Appendable printTable(MetaTable table,
                                       java.lang.Appendable out)
                                throws java.io.IOException
Description copied from class: SqlDialect
Print a SQL sript to create table

Overrides:
printTable in class SqlDialect
Throws:
java.io.IOException

getEngine

protected java.lang.String getEngine()
Returns a MySQL enginge.
The default value is " ENGINE = InnoDB".


getColumnType

protected java.lang.String getColumnType(MetaColumn column)
MySQL dialect uses a database type DATETIME (instead of the TIMESTAMP) for the java.util.Date.

Overrides:
getColumnType in class SqlDialect


Copyright © 2010. All Rights Reserved.