blob: e9114fb27f138cad42fe90fd992a7881c4640b69 [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.6.0_24) on Sat Jun 11 11:32:54 EEST 2011 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
JdbcPkGenerator (Cayenne Documentation 3.0.2 API)
</TITLE>
<META NAME="date" CONTENT="2011-06-11">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="JdbcPkGenerator (Cayenne Documentation 3.0.2 API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= 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="class-use/JdbcPkGenerator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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-all.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;<A HREF="../../../../org/apache/cayenne/dba/JdbcAdapter.html" title="class in org.apache.cayenne.dba"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/cayenne/dba/PkGenerator.html" title="interface in org.apache.cayenne.dba"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/cayenne/dba/JdbcPkGenerator.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="JdbcPkGenerator.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="#field_summary">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;<A HREF="#field_detail">FIELD</A>&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.apache.cayenne.dba</FONT>
<BR>
Class JdbcPkGenerator</H2>
<PRE>
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.cayenne.dba.JdbcPkGenerator</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../org/apache/cayenne/dba/PkGenerator.html" title="interface in org.apache.cayenne.dba">PkGenerator</A></DD>
</DL>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../org/apache/cayenne/dba/db2/DB2PkGenerator.html" title="class in org.apache.cayenne.dba.db2">DB2PkGenerator</A>, <A HREF="../../../../org/apache/cayenne/dba/derby/DerbyPkGenerator.html" title="class in org.apache.cayenne.dba.derby">DerbyPkGenerator</A>, <A HREF="../../../../org/apache/cayenne/dba/frontbase/FrontBasePkGenerator.html" title="class in org.apache.cayenne.dba.frontbase">FrontBasePkGenerator</A>, <A HREF="../../../../org/apache/cayenne/dba/mysql/MySQLPkGenerator.html" title="class in org.apache.cayenne.dba.mysql">MySQLPkGenerator</A>, <A HREF="../../../../org/apache/cayenne/dba/openbase/OpenBasePkGenerator.html" title="class in org.apache.cayenne.dba.openbase">OpenBasePkGenerator</A>, <A HREF="../../../../org/apache/cayenne/dba/oracle/OraclePkGenerator.html" title="class in org.apache.cayenne.dba.oracle">OraclePkGenerator</A>, <A HREF="../../../../org/apache/cayenne/dba/sybase/SybasePkGenerator.html" title="class in org.apache.cayenne.dba.sybase">SybasePkGenerator</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>JdbcPkGenerator</B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A><DT>implements <A HREF="../../../../org/apache/cayenne/dba/PkGenerator.html" title="interface in org.apache.cayenne.dba">PkGenerator</A></DL>
</PRE>
<P>
Default primary key generator implementation. Uses a lookup table named
"AUTO_PK_SUPPORT" to search and increment primary keys for tables.
<P>
<P>
<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>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#DEFAULT_PK_CACHE_SIZE">DEFAULT_PK_CACHE_SIZE</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>,org.apache.cayenne.dba.LongPkRange&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#pkCache">pkCache</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#pkCacheSize">pkCacheSize</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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 ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#JdbcPkGenerator()">JdbcPkGenerator</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>since 3.0</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#JdbcPkGenerator(org.apache.cayenne.dba.JdbcAdapter)">JdbcPkGenerator</A></B>(<A HREF="../../../../org/apache/cayenne/dba/JdbcAdapter.html" title="class in org.apache.cayenne.dba">JdbcAdapter</A>&nbsp;adapter)</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>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#autoPkTableExists(org.apache.cayenne.access.DataNode)">autoPkTableExists</A></B>(<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A>&nbsp;node)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks if AUTO_PK_TABLE already exists in the database.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#binaryPK(org.apache.cayenne.map.DbEntity)">binaryPK</A></B>(<A HREF="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</A>&nbsp;entity)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>since 3.0</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#createAutoPk(org.apache.cayenne.access.DataNode, java.util.List)">createAutoPk</A></B>(<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A>&nbsp;node,
<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</A>&gt;&nbsp;dbEntities)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generates necessary database objects to provide automatic primary key support.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#createAutoPkStatements(java.util.List)">createAutoPkStatements</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</A>&gt;&nbsp;dbEntities)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a list of SQL strings needed to generates database objects to provide
automatic primary support for the list of entities.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#dropAutoPk(org.apache.cayenne.access.DataNode, java.util.List)">dropAutoPk</A></B>(<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A>&nbsp;node,
<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</A>&gt;&nbsp;dbEntities)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Drops table named "AUTO_PK_SUPPORT" if it exists in the database.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#dropAutoPkStatements(java.util.List)">dropAutoPkStatements</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</A>&gt;&nbsp;dbEntities)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns SQL string needed to drop database objects associated with automatic
primary key generation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#dropAutoPkString()">dropAutoPkString</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#generatePk(org.apache.cayenne.access.DataNode, org.apache.cayenne.map.DbAttribute)">generatePk</A></B>(<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A>&nbsp;node,
<A HREF="../../../../org/apache/cayenne/map/DbAttribute.html" title="class in org.apache.cayenne.map">DbAttribute</A>&nbsp;pk)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generates a unique and non-repeating primary key for specified dbEntity.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#generatePkForDbEntity(org.apache.cayenne.access.DataNode, org.apache.cayenne.map.DbEntity)">generatePkForDbEntity</A></B>(<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A>&nbsp;node,
<A HREF="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</A>&nbsp;ent)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>since 3.0</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/cayenne/dba/JdbcAdapter.html" title="class in org.apache.cayenne.dba">JdbcAdapter</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#getAdapter()">getAdapter</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#getPkCacheSize()">getPkCacheSize</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a size of the entity primary key cache.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#longPkFromDatabase(org.apache.cayenne.access.DataNode, org.apache.cayenne.map.DbEntity)">longPkFromDatabase</A></B>(<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A>&nbsp;node,
<A HREF="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</A>&nbsp;entity)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Performs primary key generation ignoring cache.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#pkCreateString(java.lang.String)">pkCreateString</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;entName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#pkDeleteString(java.util.List)">pkDeleteString</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</A>&gt;&nbsp;dbEntities)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#pkFromDatabase(org.apache.cayenne.access.DataNode, org.apache.cayenne.map.DbEntity)">pkFromDatabase</A></B>(<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A>&nbsp;node,
<A HREF="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</A>&nbsp;ent)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>since 3.0 <A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#longPkFromDatabase(org.apache.cayenne.access.DataNode, org.apache.cayenne.map.DbEntity)"><CODE>longPkFromDatabase(DataNode, DbEntity)</CODE></A> is used.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#pkSelectString(java.lang.String)">pkSelectString</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;entName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#pkTableCreateString()">pkTableCreateString</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#pkUpdateString(java.lang.String)">pkUpdateString</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;entName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#reset()">reset</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resets any cached primary keys forcing generator to go to the database next time id
generation is requested.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#runUpdate(org.apache.cayenne.access.DataNode, java.lang.String)">runUpdate</A></B>(<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A>&nbsp;node,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;sql)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Runs JDBC update over a Connection obtained from DataNode.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#setPkCacheSize(int)">setPkCacheSize</A></B>(int&nbsp;pkCacheSize)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the size of the entity primary key cache.</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.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_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>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="DEFAULT_PK_CACHE_SIZE"><!-- --></A><H3>
DEFAULT_PK_CACHE_SIZE</H3>
<PRE>
public static final int <B>DEFAULT_PK_CACHE_SIZE</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.cayenne.dba.JdbcPkGenerator.DEFAULT_PK_CACHE_SIZE">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="pkCache"><!-- --></A><H3>
pkCache</H3>
<PRE>
protected <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>,org.apache.cayenne.dba.LongPkRange&gt; <B>pkCache</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="pkCacheSize"><!-- --></A><H3>
pkCacheSize</H3>
<PRE>
protected int <B>pkCacheSize</B></PRE>
<DL>
<DL>
</DL>
</DL>
<!-- ========= 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="JdbcPkGenerator(org.apache.cayenne.dba.JdbcAdapter)"><!-- --></A><H3>
JdbcPkGenerator</H3>
<PRE>
protected <B>JdbcPkGenerator</B>(<A HREF="../../../../org/apache/cayenne/dba/JdbcAdapter.html" title="class in org.apache.cayenne.dba">JdbcAdapter</A>&nbsp;adapter)</PRE>
<DL>
</DL>
<HR>
<A NAME="JdbcPkGenerator()"><!-- --></A><H3>
JdbcPkGenerator</H3>
<PRE>
public <B>JdbcPkGenerator</B>()</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>since 3.0</I>
<P>
</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="getAdapter()"><!-- --></A><H3>
getAdapter</H3>
<PRE>
public <A HREF="../../../../org/apache/cayenne/dba/JdbcAdapter.html" title="class in org.apache.cayenne.dba">JdbcAdapter</A> <B>getAdapter</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="createAutoPk(org.apache.cayenne.access.DataNode, java.util.List)"><!-- --></A><H3>
createAutoPk</H3>
<PRE>
public void <B>createAutoPk</B>(<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A>&nbsp;node,
<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</A>&gt;&nbsp;dbEntities)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/cayenne/dba/PkGenerator.html#createAutoPk(org.apache.cayenne.access.DataNode, java.util.List)">PkGenerator</A></CODE></B></DD>
<DD>Generates necessary database objects to provide automatic primary key support.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/cayenne/dba/PkGenerator.html#createAutoPk(org.apache.cayenne.access.DataNode, java.util.List)">createAutoPk</A></CODE> in interface <CODE><A HREF="../../../../org/apache/cayenne/dba/PkGenerator.html" title="interface in org.apache.cayenne.dba">PkGenerator</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>node</CODE> - node that provides access to a DataSource.<DD><CODE>dbEntities</CODE> - a list of entities that require primary key auto-generation
support
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="createAutoPkStatements(java.util.List)"><!-- --></A><H3>
createAutoPkStatements</H3>
<PRE>
public <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt; <B>createAutoPkStatements</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</A>&gt;&nbsp;dbEntities)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/cayenne/dba/PkGenerator.html#createAutoPkStatements(java.util.List)">PkGenerator</A></CODE></B></DD>
<DD>Returns a list of SQL strings needed to generates database objects to provide
automatic primary support for the list of entities. No actual database operations
are performed.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/cayenne/dba/PkGenerator.html#createAutoPkStatements(java.util.List)">createAutoPkStatements</A></CODE> in interface <CODE><A HREF="../../../../org/apache/cayenne/dba/PkGenerator.html" title="interface in org.apache.cayenne.dba">PkGenerator</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="dropAutoPk(org.apache.cayenne.access.DataNode, java.util.List)"><!-- --></A><H3>
dropAutoPk</H3>
<PRE>
public void <B>dropAutoPk</B>(<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A>&nbsp;node,
<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</A>&gt;&nbsp;dbEntities)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD>Drops table named "AUTO_PK_SUPPORT" if it exists in the database.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/cayenne/dba/PkGenerator.html#dropAutoPk(org.apache.cayenne.access.DataNode, java.util.List)">dropAutoPk</A></CODE> in interface <CODE><A HREF="../../../../org/apache/cayenne/dba/PkGenerator.html" title="interface in org.apache.cayenne.dba">PkGenerator</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>node</CODE> - node that provides access to a DataSource.<DD><CODE>dbEntities</CODE> - a list of entities whose primary key auto-generation support
should be dropped.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="dropAutoPkStatements(java.util.List)"><!-- --></A><H3>
dropAutoPkStatements</H3>
<PRE>
public <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt; <B>dropAutoPkStatements</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</A>&gt;&nbsp;dbEntities)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/cayenne/dba/PkGenerator.html#dropAutoPkStatements(java.util.List)">PkGenerator</A></CODE></B></DD>
<DD>Returns SQL string needed to drop database objects associated with automatic
primary key generation. No actual database operations are performed.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/cayenne/dba/PkGenerator.html#dropAutoPkStatements(java.util.List)">dropAutoPkStatements</A></CODE> in interface <CODE><A HREF="../../../../org/apache/cayenne/dba/PkGenerator.html" title="interface in org.apache.cayenne.dba">PkGenerator</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="pkTableCreateString()"><!-- --></A><H3>
pkTableCreateString</H3>
<PRE>
protected <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>pkTableCreateString</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="pkDeleteString(java.util.List)"><!-- --></A><H3>
pkDeleteString</H3>
<PRE>
protected <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>pkDeleteString</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</A>&gt;&nbsp;dbEntities)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="pkCreateString(java.lang.String)"><!-- --></A><H3>
pkCreateString</H3>
<PRE>
protected <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>pkCreateString</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;entName)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="pkSelectString(java.lang.String)"><!-- --></A><H3>
pkSelectString</H3>
<PRE>
protected <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>pkSelectString</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;entName)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="pkUpdateString(java.lang.String)"><!-- --></A><H3>
pkUpdateString</H3>
<PRE>
protected <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>pkUpdateString</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;entName)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="dropAutoPkString()"><!-- --></A><H3>
dropAutoPkString</H3>
<PRE>
protected <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>dropAutoPkString</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="autoPkTableExists(org.apache.cayenne.access.DataNode)"><!-- --></A><H3>
autoPkTableExists</H3>
<PRE>
protected boolean <B>autoPkTableExists</B>(<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A>&nbsp;node)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</A></PRE>
<DL>
<DD>Checks if AUTO_PK_TABLE already exists in the database.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="runUpdate(org.apache.cayenne.access.DataNode, java.lang.String)"><!-- --></A><H3>
runUpdate</H3>
<PRE>
public int <B>runUpdate</B>(<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A>&nbsp;node,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;sql)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</A></PRE>
<DL>
<DD>Runs JDBC update over a Connection obtained from DataNode. Returns a number of
objects returned from update.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</A></CODE> - in case of query failure.</DL>
</DD>
</DL>
<HR>
<A NAME="generatePk(org.apache.cayenne.access.DataNode, org.apache.cayenne.map.DbAttribute)"><!-- --></A><H3>
generatePk</H3>
<PRE>
public <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>generatePk</B>(<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A>&nbsp;node,
<A HREF="../../../../org/apache/cayenne/map/DbAttribute.html" title="class in org.apache.cayenne.map">DbAttribute</A>&nbsp;pk)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD>Generates a unique and non-repeating primary key for specified dbEntity.
<p>
This implementation is naive since it does not lock the database rows when
executing select and subsequent update. Adapter-specific implementations are more
robust.
</p>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/cayenne/dba/PkGenerator.html#generatePk(org.apache.cayenne.access.DataNode, org.apache.cayenne.map.DbAttribute)">generatePk</A></CODE> in interface <CODE><A HREF="../../../../org/apache/cayenne/dba/PkGenerator.html" title="interface in org.apache.cayenne.dba">PkGenerator</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></CODE><DT><B>Since:</B></DT>
<DD>3.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="generatePkForDbEntity(org.apache.cayenne.access.DataNode, org.apache.cayenne.map.DbEntity)"><!-- --></A><H3>
generatePkForDbEntity</H3>
<PRE>
public <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>generatePkForDbEntity</B>(<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A>&nbsp;node,
<A HREF="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</A>&nbsp;ent)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>since 3.0</I>
<P>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/cayenne/dba/PkGenerator.html#generatePkForDbEntity(org.apache.cayenne.access.DataNode, org.apache.cayenne.map.DbEntity)">PkGenerator</A></CODE></B></DD>
<DD>Generates new (unique and non-repeating) primary key for specified DbEntity.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/cayenne/dba/PkGenerator.html#generatePkForDbEntity(org.apache.cayenne.access.DataNode, org.apache.cayenne.map.DbEntity)">generatePkForDbEntity</A></CODE> in interface <CODE><A HREF="../../../../org/apache/cayenne/dba/PkGenerator.html" title="interface in org.apache.cayenne.dba">PkGenerator</A></CODE></DL>
</DD>
<DD><DL>
<DD><CODE>ent</CODE> - DbEntity for which automatic PK is generated.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="binaryPK(org.apache.cayenne.map.DbEntity)"><!-- --></A><H3>
binaryPK</H3>
<PRE>
protected byte[] <B>binaryPK</B>(<A HREF="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</A>&nbsp;entity)</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>since 3.0</I>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a binary PK if DbEntity has a BINARY or VARBINARY pk, null otherwise. This
method will likely be deprecated in 1.1 in favor of a more generic
solution.<DT><B>Since:</B></DT>
<DD>1.0.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="pkFromDatabase(org.apache.cayenne.access.DataNode, org.apache.cayenne.map.DbEntity)"><!-- --></A><H3>
pkFromDatabase</H3>
<PRE>
protected int <B>pkFromDatabase</B>(<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A>&nbsp;node,
<A HREF="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</A>&nbsp;ent)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>since 3.0 <A HREF="../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#longPkFromDatabase(org.apache.cayenne.access.DataNode, org.apache.cayenne.map.DbEntity)"><CODE>longPkFromDatabase(DataNode, DbEntity)</CODE></A> is used.</I>
<P>
<DD>Performs primary key generation ignoring cache. Generates a range of primary keys
as specified by "pkCacheSize" bean property.
<p>
This method is called internally from "generatePkForDbEntity" and then generated
range of key values is saved in cache for performance. Subclasses that implement
different primary key generation solutions should override this method, not
"generatePkForDbEntity".
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="longPkFromDatabase(org.apache.cayenne.access.DataNode, org.apache.cayenne.map.DbEntity)"><!-- --></A><H3>
longPkFromDatabase</H3>
<PRE>
protected long <B>longPkFromDatabase</B>(<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A>&nbsp;node,
<A HREF="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</A>&nbsp;entity)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD>Performs primary key generation ignoring cache. Generates a range of primary keys
as specified by "pkCacheSize" bean property.
<p>
This method is called internally from "generatePkForDbEntity" and then generated
range of key values is saved in cache for performance. Subclasses that implement
different primary key generation solutions should override this method, not
"generatePkForDbEntity".
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></CODE><DT><B>Since:</B></DT>
<DD>3.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getPkCacheSize()"><!-- --></A><H3>
getPkCacheSize</H3>
<PRE>
public int <B>getPkCacheSize</B>()</PRE>
<DL>
<DD>Returns a size of the entity primary key cache. Default value is 20. If cache size
is set to a value less or equals than "one", no primary key caching is done.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setPkCacheSize(int)"><!-- --></A><H3>
setPkCacheSize</H3>
<PRE>
public void <B>setPkCacheSize</B>(int&nbsp;pkCacheSize)</PRE>
<DL>
<DD>Sets the size of the entity primary key cache. If <code>pkCacheSize</code>
parameter is less than 1, cache size is set to "one".
<p>
<i>Note that our tests show that setting primary key cache value to anything much
bigger than 20 does not give any significant performance increase. Therefore it
does not make sense to use bigger values, since this may potentially create big
gaps in the database primary key sequences in cases like application crashes or
restarts. </i>
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="reset()"><!-- --></A><H3>
reset</H3>
<PRE>
public void <B>reset</B>()</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/cayenne/dba/PkGenerator.html#reset()">PkGenerator</A></CODE></B></DD>
<DD>Resets any cached primary keys forcing generator to go to the database next time id
generation is requested. May not be applicable for all generator implementations.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/cayenne/dba/PkGenerator.html#reset()">reset</A></CODE> in interface <CODE><A HREF="../../../../org/apache/cayenne/dba/PkGenerator.html" title="interface in org.apache.cayenne.dba">PkGenerator</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="class-use/JdbcPkGenerator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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-all.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;<A HREF="../../../../org/apache/cayenne/dba/JdbcAdapter.html" title="class in org.apache.cayenne.dba"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/cayenne/dba/PkGenerator.html" title="interface in org.apache.cayenne.dba"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/cayenne/dba/JdbcPkGenerator.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="JdbcPkGenerator.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="#field_summary">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;<A HREF="#field_detail">FIELD</A>&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>
Copyright &#169; 2001-2011 <a href="http://cayenne.apache.org/">Apache Cayenne</a>. All Rights Reserved.
</BODY>
</HTML>