yawda.utils.cayenne.mysql
Class MySQLAdapter.MySQLPKGenerator

java.lang.Object
  extended byorg.objectstyle.cayenne.dba.JdbcPkGenerator
      extended byyawda.utils.cayenne.mysql.MySQLAdapter.MySQLPKGenerator
All Implemented Interfaces:
org.objectstyle.cayenne.dba.PkGenerator
Enclosing class:
MySQLAdapter

public static final class MySQLAdapter.MySQLPKGenerator
extends org.objectstyle.cayenne.dba.JdbcPkGenerator


Nested Class Summary
 
Nested classes inherited from class org.objectstyle.cayenne.dba.JdbcPkGenerator
org.objectstyle.cayenne.dba.JdbcPkGenerator.PkRetrieveProcessor
 
Field Summary
 
Fields inherited from class org.objectstyle.cayenne.dba.JdbcPkGenerator
DEFAULT_PK_CACHE_SIZE, NEXT_ID, objDesc, pkCache, pkCacheSize, resultDesc
 
Constructor Summary
MySQLAdapter.MySQLPKGenerator()
           
 
Method Summary
protected  int getPrimaryKey(Statement statement, String entityName)
           
protected  int pkFromDatabase(org.objectstyle.cayenne.access.DataNode node, org.objectstyle.cayenne.map.DbEntity ent)
          Overrides superclass's implementation to perform locking of the primary key lookup table.
protected  String pkTableCreateString()
           
protected  SQLException processSQLException(SQLException exception, SQLException parent)
          Appends a new SQLException to the chain.
 
Methods inherited from class org.objectstyle.cayenne.dba.JdbcPkGenerator
autoPkTableExists, binaryPK, createAutoPk, createAutoPkStatements, dropAutoPk, dropAutoPkStatements, dropAutoPkString, generatePkForDbEntity, generatePkForDbEntityString, getPkCacheSize, pkCreateString, pkDeleteString, pkSelectString, pkUpdateString, reset, runSelect, runUpdate, setPkCacheSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MySQLAdapter.MySQLPKGenerator

public MySQLAdapter.MySQLPKGenerator()
Method Detail

pkFromDatabase

protected final int pkFromDatabase(org.objectstyle.cayenne.access.DataNode node,
                                   org.objectstyle.cayenne.map.DbEntity ent)
                            throws Exception
Overrides superclass's implementation to perform locking of the primary key lookup table.

Throws:
Exception

processSQLException

protected final SQLException processSQLException(SQLException exception,
                                                 SQLException parent)
Appends a new SQLException to the chain. If parent is null, uses the exception as the chain root.


pkTableCreateString

protected final String pkTableCreateString()

getPrimaryKey

protected final int getPrimaryKey(Statement statement,
                                  String entityName)
                           throws SQLException
Throws:
SQLException