blob: 6f04bf58aa8edc4475749a8443df0c426b7fae11 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_06) on Wed Jul 19 14:42:46 EDT 2006 -->
<TITLE>
MySQLAdapter (Cayenne API Documentation - v.1.2)
</TITLE>
<META NAME="keywords" CONTENT="org.objectstyle.cayenne.dba.mysql.MySQLAdapter class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../objectstyle-javadoc.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="MySQLAdapter (Cayenne API Documentation - v.1.2)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../org/objectstyle/cayenne/dba/mysql/MySQLPkGenerator.html" title="class in org.objectstyle.cayenne.dba.mysql"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/objectstyle/cayenne/dba/mysql/MySQLAdapter.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="MySQLAdapter.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_org.objectstyle.cayenne.dba.JdbcAdapter">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.objectstyle.cayenne.dba.mysql</FONT>
<BR>
Class MySQLAdapter</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html" title="class in org.objectstyle.cayenne.dba">org.objectstyle.cayenne.dba.JdbcAdapter</A>
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.objectstyle.cayenne.dba.mysql.MySQLAdapter</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/objectstyle/cayenne/dba/DbAdapter.html" title="interface in org.objectstyle.cayenne.dba">DbAdapter</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>MySQLAdapter</B><DT>extends <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html" title="class in org.objectstyle.cayenne.dba">JdbcAdapter</A></DL>
</PRE>
<P>
DbAdapter implementation for <a href="http://www.mysql.com">MySQL RDBMS</a>.
<h3>Foreign Key Constraint Handling</h3>
<p>
Foreign key constraints are supported by InnoDB engine and NOT supported by MyISAM
engine. This adapter by default assumes MyISAM, so
<A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#supportsFkConstraints()"><CODE>JdbcAdapter.supportsFkConstraints()</CODE></A> will return
false. Users can manually change this by calling
<em>setSupportsFkConstraints(true)</em> or better by using an
<A HREF="../../../../../org/objectstyle/cayenne/dba/AutoAdapter.html" title="class in org.objectstyle.cayenne.dba"><CODE>AutoAdapter</CODE></A>, i.e. not entering the adapter name at
all for the DataNode, letting Cayenne guess it in runtime. In the later case Cayenne
will check the <em>table_type</em> MySQL variable to detect whether InnoDB is the
default, and configure the adapter accordingly.
<h3>Sample Connection Settings</h3>
<ul>
<li>Adapter name: org.objectstyle.cayenne.dba.mysql.MySQLAdapter</li>
<li>DB URL: jdbc: mysql://serverhostname/dbname</li>
<li>Driver Class: com.mysql.jdbc.Driver</li>
</ul>
<P>
<P>
<DL>
<DT><B>Author:</B></DT>
<DD>Andrus Adamchik</DD>
</DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_org.objectstyle.cayenne.dba.JdbcAdapter"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from class org.objectstyle.cayenne.dba.<A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html" title="class in org.objectstyle.cayenne.dba">JdbcAdapter</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#extendedTypes">extendedTypes</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#pkGenerator">pkGenerator</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#supportsBatchUpdates">supportsBatchUpdates</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#supportsFkConstraints">supportsFkConstraints</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#supportsGeneratedKeys">supportsGeneratedKeys</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#supportsUniqueConstraints">supportsUniqueConstraints</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#typesHandler">typesHandler</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/objectstyle/cayenne/dba/mysql/MySQLAdapter.html#MySQLAdapter()">MySQLAdapter</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/objectstyle/cayenne/map/DbAttribute.html" title="class in org.objectstyle.cayenne.map">DbAttribute</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/objectstyle/cayenne/dba/mysql/MySQLAdapter.html#buildAttribute(java.lang.String, java.lang.String, int, int, int, boolean)">buildAttribute</A></B>(java.lang.String&nbsp;name,
java.lang.String&nbsp;typeName,
int&nbsp;type,
int&nbsp;size,
int&nbsp;precision,
boolean&nbsp;allowNulls)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and returns a DbAttribute based on supplied parameters (usually obtained
from database meta data).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/objectstyle/cayenne/dba/mysql/MySQLAdapter.html#configureExtendedTypes(org.objectstyle.cayenne.access.types.ExtendedTypeMap)">configureExtendedTypes</A></B>(<A HREF="../../../../../org/objectstyle/cayenne/access/types/ExtendedTypeMap.html" title="class in org.objectstyle.cayenne.access.types">ExtendedTypeMap</A>&nbsp;map)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Installs appropriate ExtendedTypes used as converters for passing values between
JDBC and Java layers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../../org/objectstyle/cayenne/dba/PkGenerator.html" title="interface in org.objectstyle.cayenne.dba">PkGenerator</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/objectstyle/cayenne/dba/mysql/MySQLAdapter.html#createPkGenerator()">createPkGenerator</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and returns a primary key generator.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/objectstyle/cayenne/dba/mysql/MySQLAdapter.html#createTable(org.objectstyle.cayenne.map.DbEntity)">createTable</A></B>(<A HREF="../../../../../org/objectstyle/cayenne/map/DbEntity.html" title="class in org.objectstyle.cayenne.map">DbEntity</A>&nbsp;entity)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Overrides super implementation to explicitly set table engine to InnoDB if FK
constraints are supported by this adapter.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/objectstyle/cayenne/dba/mysql/MySQLAdapter.html#createTableAppendColumn(java.lang.StringBuffer, org.objectstyle.cayenne.map.DbAttribute)">createTableAppendColumn</A></B>(java.lang.StringBuffer&nbsp;sqlBuffer,
<A HREF="../../../../../org/objectstyle/cayenne/map/DbAttribute.html" title="class in org.objectstyle.cayenne.map">DbAttribute</A>&nbsp;column)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Appends AUTO_INCREMENT clause to the column definition for generated columns.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/objectstyle/cayenne/dba/mysql/MySQLAdapter.html#createTableAppendPKClause(java.lang.StringBuffer, org.objectstyle.cayenne.map.DbEntity)">createTableAppendPKClause</A></B>(java.lang.StringBuffer&nbsp;sqlBuffer,
<A HREF="../../../../../org/objectstyle/cayenne/map/DbEntity.html" title="class in org.objectstyle.cayenne.map">DbEntity</A>&nbsp;entity)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Customizes PK clause semantics to ensure that generated columns are in the
beginning of the PK definition, as this seems to be a requirement for InnoDB
tables.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/objectstyle/cayenne/dba/mysql/MySQLAdapter.html#dropTable(org.objectstyle.cayenne.map.DbEntity)">dropTable</A></B>(<A HREF="../../../../../org/objectstyle/cayenne/map/DbEntity.html" title="class in org.objectstyle.cayenne.map">DbEntity</A>&nbsp;entity)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a SQL string to drop a table corresponding to <code>ent</code> DbEntity.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/objectstyle/cayenne/query/SQLAction.html" title="interface in org.objectstyle.cayenne.query">SQLAction</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/objectstyle/cayenne/dba/mysql/MySQLAdapter.html#getAction(org.objectstyle.cayenne.query.Query, org.objectstyle.cayenne.access.DataNode)">getAction</A></B>(<A HREF="../../../../../org/objectstyle/cayenne/query/Query.html" title="interface in org.objectstyle.cayenne.query">Query</A>&nbsp;query,
<A HREF="../../../../../org/objectstyle/cayenne/access/DataNode.html" title="class in org.objectstyle.cayenne.access">DataNode</A>&nbsp;node)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Uses special action builder to create the right action.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/objectstyle/cayenne/dba/mysql/MySQLAdapter.html#tableTypeForView()">tableTypeForView</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns null, since views are not yet supported in MySQL.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.objectstyle.cayenne.dba.JdbcAdapter"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class org.objectstyle.cayenne.dba.<A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html" title="class in org.objectstyle.cayenne.dba">JdbcAdapter</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#bindParameter(java.sql.PreparedStatement, java.lang.Object, int, int, int)">bindParameter</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#createDataNode(java.lang.String)">createDataNode</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#createFkConstraint(org.objectstyle.cayenne.map.DbRelationship)">createFkConstraint</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#createUniqueConstraint(org.objectstyle.cayenne.map.DbEntity, java.util.Collection)">createUniqueConstraint</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#externalTypesForJdbcType(int)">externalTypesForJdbcType</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#findAdapterResource(java.lang.String)">findAdapterResource</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#getBatchTerminator()">getBatchTerminator</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#getExtendedTypes()">getExtendedTypes</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#getPkGenerator()">getPkGenerator</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#getQualifierTranslator(org.objectstyle.cayenne.access.trans.QueryAssembler)">getQualifierTranslator</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#getQueryTranslator(org.objectstyle.cayenne.query.Query)">getQueryTranslator</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#queryTranslatorClass(org.objectstyle.cayenne.query.Query)">queryTranslatorClass</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#setPkGenerator(org.objectstyle.cayenne.dba.PkGenerator)">setPkGenerator</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#setSupportsBatchUpdates(boolean)">setSupportsBatchUpdates</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#setSupportsFkConstraints(boolean)">setSupportsFkConstraints</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#setSupportsGeneratedKeys(boolean)">setSupportsGeneratedKeys</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#setSupportsUniqueConstraints(boolean)">setSupportsUniqueConstraints</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#shouldRunBatchQuery(org.objectstyle.cayenne.access.DataNode, java.sql.Connection, org.objectstyle.cayenne.query.BatchQuery, org.objectstyle.cayenne.access.OperationObserver)">shouldRunBatchQuery</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#supportsBatchUpdates()">supportsBatchUpdates</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#supportsFkConstraints()">supportsFkConstraints</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#supportsGeneratedKeys()">supportsGeneratedKeys</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#supportsUniqueConstraints()">supportsUniqueConstraints</A>, <A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#tableTypeForTable()">tableTypeForTable</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="MySQLAdapter()"><!-- --></A><H3>
MySQLAdapter</H3>
<PRE>
public <B>MySQLAdapter</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="getAction(org.objectstyle.cayenne.query.Query, org.objectstyle.cayenne.access.DataNode)"><!-- --></A><H3>
getAction</H3>
<PRE>
public <A HREF="../../../../../org/objectstyle/cayenne/query/SQLAction.html" title="interface in org.objectstyle.cayenne.query">SQLAction</A> <B>getAction</B>(<A HREF="../../../../../org/objectstyle/cayenne/query/Query.html" title="interface in org.objectstyle.cayenne.query">Query</A>&nbsp;query,
<A HREF="../../../../../org/objectstyle/cayenne/access/DataNode.html" title="class in org.objectstyle.cayenne.access">DataNode</A>&nbsp;node)</PRE>
<DL>
<DD>Uses special action builder to create the right action.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/DbAdapter.html#getAction(org.objectstyle.cayenne.query.Query, org.objectstyle.cayenne.access.DataNode)">getAction</A></CODE> in interface <CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/DbAdapter.html" title="interface in org.objectstyle.cayenne.dba">DbAdapter</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#getAction(org.objectstyle.cayenne.query.Query, org.objectstyle.cayenne.access.DataNode)">getAction</A></CODE> in class <CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html" title="class in org.objectstyle.cayenne.dba">JdbcAdapter</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="dropTable(org.objectstyle.cayenne.map.DbEntity)"><!-- --></A><H3>
dropTable</H3>
<PRE>
public java.lang.String <B>dropTable</B>(<A HREF="../../../../../org/objectstyle/cayenne/map/DbEntity.html" title="class in org.objectstyle.cayenne.map">DbEntity</A>&nbsp;entity)</PRE>
<DL>
<DD><B>Description copied from class: <CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#dropTable(org.objectstyle.cayenne.map.DbEntity)">JdbcAdapter</A></CODE></B></DD>
<DD>Returns a SQL string to drop a table corresponding to <code>ent</code> DbEntity.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/DbAdapter.html#dropTable(org.objectstyle.cayenne.map.DbEntity)">dropTable</A></CODE> in interface <CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/DbAdapter.html" title="interface in org.objectstyle.cayenne.dba">DbAdapter</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#dropTable(org.objectstyle.cayenne.map.DbEntity)">dropTable</A></CODE> in class <CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html" title="class in org.objectstyle.cayenne.dba">JdbcAdapter</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="configureExtendedTypes(org.objectstyle.cayenne.access.types.ExtendedTypeMap)"><!-- --></A><H3>
configureExtendedTypes</H3>
<PRE>
protected void <B>configureExtendedTypes</B>(<A HREF="../../../../../org/objectstyle/cayenne/access/types/ExtendedTypeMap.html" title="class in org.objectstyle.cayenne.access.types">ExtendedTypeMap</A>&nbsp;map)</PRE>
<DL>
<DD>Installs appropriate ExtendedTypes used as converters for passing values between
JDBC and Java layers.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#configureExtendedTypes(org.objectstyle.cayenne.access.types.ExtendedTypeMap)">configureExtendedTypes</A></CODE> in class <CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html" title="class in org.objectstyle.cayenne.dba">JdbcAdapter</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="buildAttribute(java.lang.String, java.lang.String, int, int, int, boolean)"><!-- --></A><H3>
buildAttribute</H3>
<PRE>
public <A HREF="../../../../../org/objectstyle/cayenne/map/DbAttribute.html" title="class in org.objectstyle.cayenne.map">DbAttribute</A> <B>buildAttribute</B>(java.lang.String&nbsp;name,
java.lang.String&nbsp;typeName,
int&nbsp;type,
int&nbsp;size,
int&nbsp;precision,
boolean&nbsp;allowNulls)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/DbAdapter.html#buildAttribute(java.lang.String, java.lang.String, int, int, int, boolean)">DbAdapter</A></CODE></B></DD>
<DD>Creates and returns a DbAttribute based on supplied parameters (usually obtained
from database meta data).
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/DbAdapter.html#buildAttribute(java.lang.String, java.lang.String, int, int, int, boolean)">buildAttribute</A></CODE> in interface <CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/DbAdapter.html" title="interface in org.objectstyle.cayenne.dba">DbAdapter</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#buildAttribute(java.lang.String, java.lang.String, int, int, int, boolean)">buildAttribute</A></CODE> in class <CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html" title="class in org.objectstyle.cayenne.dba">JdbcAdapter</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - database column name<DD><CODE>typeName</CODE> - database specific type name, may be used as a hint to determine the
right JDBC type.<DD><CODE>type</CODE> - JDBC column type<DD><CODE>size</CODE> - database column size (ignored if less than zero)<DD><CODE>precision</CODE> - database column precision (ignored if less than zero)<DD><CODE>allowNulls</CODE> - database column nullable parameter</DL>
</DD>
</DL>
<HR>
<A NAME="tableTypeForView()"><!-- --></A><H3>
tableTypeForView</H3>
<PRE>
public java.lang.String <B>tableTypeForView</B>()</PRE>
<DL>
<DD>Returns null, since views are not yet supported in MySQL. Views are available on
newer versions of MySQL.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/DbAdapter.html#tableTypeForView()">tableTypeForView</A></CODE> in interface <CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/DbAdapter.html" title="interface in org.objectstyle.cayenne.dba">DbAdapter</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#tableTypeForView()">tableTypeForView</A></CODE> in class <CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html" title="class in org.objectstyle.cayenne.dba">JdbcAdapter</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="createPkGenerator()"><!-- --></A><H3>
createPkGenerator</H3>
<PRE>
protected <A HREF="../../../../../org/objectstyle/cayenne/dba/PkGenerator.html" title="interface in org.objectstyle.cayenne.dba">PkGenerator</A> <B>createPkGenerator</B>()</PRE>
<DL>
<DD>Creates and returns a primary key generator. Overrides superclass implementation to
return an instance of MySQLPkGenerator that does the correct table locking.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#createPkGenerator()">createPkGenerator</A></CODE> in class <CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html" title="class in org.objectstyle.cayenne.dba">JdbcAdapter</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="createTable(org.objectstyle.cayenne.map.DbEntity)"><!-- --></A><H3>
createTable</H3>
<PRE>
public java.lang.String <B>createTable</B>(<A HREF="../../../../../org/objectstyle/cayenne/map/DbEntity.html" title="class in org.objectstyle.cayenne.map">DbEntity</A>&nbsp;entity)</PRE>
<DL>
<DD>Overrides super implementation to explicitly set table engine to InnoDB if FK
constraints are supported by this adapter.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/DbAdapter.html#createTable(org.objectstyle.cayenne.map.DbEntity)">createTable</A></CODE> in interface <CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/DbAdapter.html" title="interface in org.objectstyle.cayenne.dba">DbAdapter</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#createTable(org.objectstyle.cayenne.map.DbEntity)">createTable</A></CODE> in class <CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html" title="class in org.objectstyle.cayenne.dba">JdbcAdapter</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="createTableAppendPKClause(java.lang.StringBuffer, org.objectstyle.cayenne.map.DbEntity)"><!-- --></A><H3>
createTableAppendPKClause</H3>
<PRE>
protected void <B>createTableAppendPKClause</B>(java.lang.StringBuffer&nbsp;sqlBuffer,
<A HREF="../../../../../org/objectstyle/cayenne/map/DbEntity.html" title="class in org.objectstyle.cayenne.map">DbEntity</A>&nbsp;entity)</PRE>
<DL>
<DD>Customizes PK clause semantics to ensure that generated columns are in the
beginning of the PK definition, as this seems to be a requirement for InnoDB
tables.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#createTableAppendPKClause(java.lang.StringBuffer, org.objectstyle.cayenne.map.DbEntity)">createTableAppendPKClause</A></CODE> in class <CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html" title="class in org.objectstyle.cayenne.dba">JdbcAdapter</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="createTableAppendColumn(java.lang.StringBuffer, org.objectstyle.cayenne.map.DbAttribute)"><!-- --></A><H3>
createTableAppendColumn</H3>
<PRE>
protected void <B>createTableAppendColumn</B>(java.lang.StringBuffer&nbsp;sqlBuffer,
<A HREF="../../../../../org/objectstyle/cayenne/map/DbAttribute.html" title="class in org.objectstyle.cayenne.map">DbAttribute</A>&nbsp;column)</PRE>
<DL>
<DD>Appends AUTO_INCREMENT clause to the column definition for generated columns.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html#createTableAppendColumn(java.lang.StringBuffer, org.objectstyle.cayenne.map.DbAttribute)">createTableAppendColumn</A></CODE> in class <CODE><A HREF="../../../../../org/objectstyle/cayenne/dba/JdbcAdapter.html" title="class in org.objectstyle.cayenne.dba">JdbcAdapter</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../org/objectstyle/cayenne/dba/mysql/MySQLPkGenerator.html" title="class in org.objectstyle.cayenne.dba.mysql"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/objectstyle/cayenne/dba/mysql/MySQLAdapter.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="MySQLAdapter.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_org.objectstyle.cayenne.dba.JdbcAdapter">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<!--@SFLOGO@--> &nbsp; <i>Copyright &#169; 2001-2006 <a href=
"http://objectstyle.org" target="_top">ObjectStyle.org</a> All Rights Reserved.</i>
</BODY>
</HTML>