yawda.utils.cayenne.mysql
Class MySQLAdapter

java.lang.Object
  extended byorg.objectstyle.cayenne.dba.JdbcAdapter
      extended byyawda.utils.cayenne.mysql.MySQLAdapter
All Implemented Interfaces:
org.objectstyle.cayenne.dba.DbAdapter

public final class MySQLAdapter
extends org.objectstyle.cayenne.dba.JdbcAdapter

Author:
Quentin Anciaux

Nested Class Summary
static class MySQLAdapter.MySQLPKGenerator
           
 
Field Summary
 
Fields inherited from class org.objectstyle.cayenne.dba.JdbcAdapter
extendedTypes, pkGenerator, supportsBatchUpdates, supportsFkConstraints, supportsUniqueConstraints, typesHandler
 
Fields inherited from interface org.objectstyle.cayenne.dba.DbAdapter
availableAdapterClassNames, DB2, FIREBIRD, HSQLDB, JDBC, MYSQL, OPENBASE, ORACLE, POSTGRES, SQLSERVER, SYBASE
 
Constructor Summary
MySQLAdapter()
           
 
Method Summary
 org.objectstyle.cayenne.map.DbAttribute buildAttribute(String name, String typeName, int type, int size, int precision, boolean allowNulls)
           
protected  void configureExtendedTypes(org.objectstyle.cayenne.access.types.ExtendedTypeMap map)
          Installs appropriate ExtendedTypes used as converters for passing values between JDBC and Java layers.
 String createFkConstraint(org.objectstyle.cayenne.map.DbRelationship rel)
          Throws an exception, since FK constraints are not supported by MySQL.
protected  org.objectstyle.cayenne.dba.PkGenerator createPkGenerator()
          Creates and returns a primary key generator.
 String tableTypeForView()
          Returns null, since views are not yet supported in MySQL.
 
Methods inherited from class org.objectstyle.cayenne.dba.JdbcAdapter
bindParameter, createDataNode, createTable, createUniqueConstraint, dropTable, externalTypesForJdbcType, findAdapterResource, getBatchTerminator, getExtendedTypes, getPkGenerator, getQualifierTranslator, getQueryTranslator, queryTranslatorClass, setPkGenerator, setSupportsBatchUpdates, setSupportsFkConstraints, setSupportsUniqueConstraints, shouldRunBatchQuery, supportsBatchUpdates, supportsFkConstraints, supportsUniqueConstraints, tableTypeForTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectstyle.cayenne.dba.DbAdapter
 

Constructor Detail

MySQLAdapter

public MySQLAdapter()
Method Detail

configureExtendedTypes

protected final void configureExtendedTypes(org.objectstyle.cayenne.access.types.ExtendedTypeMap map)
Installs appropriate ExtendedTypes used as converters for passing values between JDBC and Java layers.


buildAttribute

public final org.objectstyle.cayenne.map.DbAttribute buildAttribute(String name,
                                                                    String typeName,
                                                                    int type,
                                                                    int size,
                                                                    int precision,
                                                                    boolean allowNulls)

createFkConstraint

public final String createFkConstraint(org.objectstyle.cayenne.map.DbRelationship rel)
Throws an exception, since FK constraints are not supported by MySQL.


tableTypeForView

public final String tableTypeForView()
Returns null, since views are not yet supported in MySQL. Views support is promised in MySQL 4.1.


createPkGenerator

protected final org.objectstyle.cayenne.dba.PkGenerator createPkGenerator()
Creates and returns a primary key generator. Overrides superclass implementation to return an instance of MySQLPkGenerator that does the correct table locking.