blob: 27ce487a5cf3b5b241ec1479cd808707e231b6c0 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_112) on Mon Oct 14 11:36:18 MSK 2019 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>OpenBasePkGenerator (cayenne-doc: Cayenne Documentation 4.0.2 API)</title>
<meta name="date" content="2019-10-14">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="OpenBasePkGenerator (cayenne-doc: Cayenne Documentation 4.0.2 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/OpenBasePkGenerator.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/cayenne/dba/openbase/OpenBaseAdapter.html" title="class in org.apache.cayenne.dba.openbase"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/cayenne/dba/openbase/OpenBaseQualifierTranslator.html" title="class in org.apache.cayenne.dba.openbase"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/cayenne/dba/openbase/OpenBasePkGenerator.html" target="_top">Frames</a></li>
<li><a href="OpenBasePkGenerator.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#fields.inherited.from.class.org.apache.cayenne.dba.JdbcPkGenerator">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.cayenne.dba.openbase</div>
<h2 title="Class OpenBasePkGenerator" class="title">Class OpenBasePkGenerator</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html" title="class in org.apache.cayenne.dba">org.apache.cayenne.dba.JdbcPkGenerator</a></li>
<li>
<ul class="inheritance">
<li>org.apache.cayenne.dba.openbase.OpenBasePkGenerator</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../../../org/apache/cayenne/dba/PkGenerator.html" title="interface in org.apache.cayenne.dba">PkGenerator</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">OpenBasePkGenerator</span>
extends <a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html" title="class in org.apache.cayenne.dba">JdbcPkGenerator</a></pre>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.org.apache.cayenne.dba.JdbcPkGenerator">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.cayenne.dba.<a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html" title="class in org.apache.cayenne.dba">JdbcPkGenerator</a></h3>
<code><a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#adapter">adapter</a>, <a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#DEFAULT_PK_CACHE_SIZE">DEFAULT_PK_CACHE_SIZE</a>, <a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#pkCache">pkCache</a>, <a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#pkCacheSize">pkCacheSize</a>, <a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#pkStartValue">pkStartValue</a></code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colLast" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/cayenne/dba/openbase/OpenBasePkGenerator.html#OpenBasePkGenerator-org.apache.cayenne.dba.JdbcAdapter-">OpenBasePkGenerator</a></span>(<a href="../../../../../org/apache/cayenne/dba/JdbcAdapter.html" title="class in org.apache.cayenne.dba">JdbcAdapter</a>&nbsp;adapter)</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/cayenne/dba/openbase/OpenBasePkGenerator.html#canCreatePK-org.apache.cayenne.map.DbEntity-">canCreatePK</a></span>(<a href="../../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</a>&nbsp;entity)</code>&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/cayenne/dba/openbase/OpenBasePkGenerator.html#createAutoPk-org.apache.cayenne.access.DataNode-java.util.List-">createAutoPk</a></span>(<a href="../../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</a>&nbsp;node,
<a href="https://docs.oracle.com/javase/7/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>
<div class="block">Generates necessary database objects to provide automatic primary key support.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/cayenne/dba/openbase/OpenBasePkGenerator.html#createAutoPkStatements-java.util.List-">createAutoPkStatements</a></span>(<a href="https://docs.oracle.com/javase/7/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>
<div class="block">Returns a list of SQL strings needed to generates database objects to provide
automatic primary support for the list of entities.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/cayenne/dba/openbase/OpenBasePkGenerator.html#createPKString-org.apache.cayenne.map.DbEntity-">createPKString</a></span>(<a href="../../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</a>&nbsp;entity)</code>
<div class="block">Returns a String to create PK support for an entity.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/cayenne/dba/openbase/OpenBasePkGenerator.html#createUniquePKIndexString-org.apache.cayenne.map.DbEntity-">createUniquePKIndexString</a></span>(<a href="../../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</a>&nbsp;entity)</code>
<div class="block">Returns a String to create a unique index on table primary key columns
per OpenBase recommendations.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/cayenne/dba/openbase/OpenBasePkGenerator.html#dropAutoPk-org.apache.cayenne.access.DataNode-java.util.List-">dropAutoPk</a></span>(<a href="../../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</a>&nbsp;node,
<a href="https://docs.oracle.com/javase/7/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>
<div class="block">Drops table named "AUTO_PK_SUPPORT" if it exists in the database.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/cayenne/dba/openbase/OpenBasePkGenerator.html#dropAutoPkStatements-java.util.List-">dropAutoPkStatements</a></span>(<a href="https://docs.oracle.com/javase/7/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>
<div class="block">Returns an empty list, since OpenBase doesn't support this operation.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/cayenne/dba/openbase/OpenBasePkGenerator.html#generatePk-org.apache.cayenne.access.DataNode-org.apache.cayenne.map.DbAttribute-">generatePk</a></span>(<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>
<div class="block">Returns a non-repeating primary key for a given PK attribute.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/cayenne/dba/openbase/OpenBasePkGenerator.html#getPkCacheSize--">getPkCacheSize</a></span>()</code>
<div class="block">Returns zero, since PK caching is not feasible with OpenBase PK
generation mechanism.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>protected long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/cayenne/dba/openbase/OpenBasePkGenerator.html#longPkFromDatabase-org.apache.cayenne.access.DataNode-org.apache.cayenne.map.DbEntity-">longPkFromDatabase</a></span>(<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>
<div class="block">Generates new (unique and non-repeating) primary key for specified
DbEntity.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/cayenne/dba/openbase/OpenBasePkGenerator.html#newIDString-org.apache.cayenne.map.DbEntity-">newIDString</a></span>(<a href="../../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</a>&nbsp;ent)</code>
<div class="block">Returns SQL string that can generate new (unique and non-repeating)
primary key for specified DbEntity.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/cayenne/dba/openbase/OpenBasePkGenerator.html#reset--">reset</a></span>()</code>
<div class="block">Resets any cached primary keys forcing generator to go to the database next time id
generation is requested.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/cayenne/dba/openbase/OpenBasePkGenerator.html#setPkCacheSize-int-">setPkCacheSize</a></span>(int&nbsp;pkCacheSize)</code>
<div class="block">Sets the size of the entity primary key cache.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.cayenne.dba.JdbcPkGenerator">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.cayenne.dba.<a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html" title="class in org.apache.cayenne.dba">JdbcPkGenerator</a></h3>
<code><a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#autoPkTableExists-org.apache.cayenne.access.DataNode-">autoPkTableExists</a>, <a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#dropAutoPkString--">dropAutoPkString</a>, <a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#getAdapter--">getAdapter</a>, <a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#pkCreateString-java.lang.String-">pkCreateString</a>, <a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#pkDeleteString-java.util.List-">pkDeleteString</a>, <a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#pkSelectString-java.lang.String-">pkSelectString</a>, <a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#pkTableCreateString--">pkTableCreateString</a>, <a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#pkUpdateString-java.lang.String-">pkUpdateString</a>, <a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#runUpdate-org.apache.cayenne.access.DataNode-java.lang.String-">runUpdate</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="OpenBasePkGenerator-org.apache.cayenne.dba.JdbcAdapter-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>OpenBasePkGenerator</h4>
<pre>protected&nbsp;OpenBasePkGenerator(<a href="../../../../../org/apache/cayenne/dba/JdbcAdapter.html" title="class in org.apache.cayenne.dba">JdbcAdapter</a>&nbsp;adapter)</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="generatePk-org.apache.cayenne.access.DataNode-org.apache.cayenne.map.DbAttribute-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>generatePk</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;generatePk(<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="https://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<div class="block">Returns a non-repeating primary key for a given PK attribute. Since
OpenBase-specific mechanism is used, key caching is disabled. Instead a
database operation is performed on every call.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/cayenne/dba/PkGenerator.html#generatePk-org.apache.cayenne.access.DataNode-org.apache.cayenne.map.DbAttribute-">generatePk</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/cayenne/dba/PkGenerator.html" title="interface in org.apache.cayenne.dba">PkGenerator</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#generatePk-org.apache.cayenne.access.DataNode-org.apache.cayenne.map.DbAttribute-">generatePk</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html" title="class in org.apache.cayenne.dba">JdbcPkGenerator</a></code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code></dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>3.0</dd>
</dl>
</li>
</ul>
<a name="longPkFromDatabase-org.apache.cayenne.access.DataNode-org.apache.cayenne.map.DbEntity-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>longPkFromDatabase</h4>
<pre>protected&nbsp;long&nbsp;longPkFromDatabase(<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="https://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<div class="block">Generates new (unique and non-repeating) primary key for specified
DbEntity. Executed SQL looks like this:
<pre>
NEWID FOR Table Column
</pre>
COLUMN must be marked as UNIQUE in order for this to work properly.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#longPkFromDatabase-org.apache.cayenne.access.DataNode-org.apache.cayenne.map.DbEntity-">longPkFromDatabase</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html" title="class in org.apache.cayenne.dba">JdbcPkGenerator</a></code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code></dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>3.0</dd>
</dl>
</li>
</ul>
<a name="newIDString-org.apache.cayenne.map.DbEntity-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newIDString</h4>
<pre>protected&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;newIDString(<a href="../../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</a>&nbsp;ent)</pre>
<div class="block">Returns SQL string that can generate new (unique and non-repeating)
primary key for specified DbEntity. No actual database operations are
performed.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.2</dd>
</dl>
</li>
</ul>
<a name="createAutoPk-org.apache.cayenne.access.DataNode-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createAutoPk</h4>
<pre>public&nbsp;void&nbsp;createAutoPk(<a href="../../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</a>&nbsp;node,
<a href="https://docs.oracle.com/javase/7/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="https://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/cayenne/dba/PkGenerator.html#createAutoPk-org.apache.cayenne.access.DataNode-java.util.List-">PkGenerator</a></code></span></div>
<div class="block">Generates necessary database objects to provide automatic primary key support.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/cayenne/dba/PkGenerator.html#createAutoPk-org.apache.cayenne.access.DataNode-java.util.List-">createAutoPk</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/cayenne/dba/PkGenerator.html" title="interface in org.apache.cayenne.dba">PkGenerator</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#createAutoPk-org.apache.cayenne.access.DataNode-java.util.List-">createAutoPk</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html" title="class in org.apache.cayenne.dba">JdbcPkGenerator</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>node</code> - node that provides access to a DataSource.</dd>
<dd><code>dbEntities</code> - a list of entities that require primary key auto-generation
support</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code></dd>
</dl>
</li>
</ul>
<a name="createAutoPkStatements-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createAutoPkStatements</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;createAutoPkStatements(<a href="https://docs.oracle.com/javase/7/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>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/cayenne/dba/PkGenerator.html#createAutoPkStatements-java.util.List-">PkGenerator</a></code></span></div>
<div class="block">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.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/cayenne/dba/PkGenerator.html#createAutoPkStatements-java.util.List-">createAutoPkStatements</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/cayenne/dba/PkGenerator.html" title="interface in org.apache.cayenne.dba">PkGenerator</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#createAutoPkStatements-java.util.List-">createAutoPkStatements</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html" title="class in org.apache.cayenne.dba">JdbcPkGenerator</a></code></dd>
</dl>
</li>
</ul>
<a name="canCreatePK-org.apache.cayenne.map.DbEntity-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>canCreatePK</h4>
<pre>protected&nbsp;boolean&nbsp;canCreatePK(<a href="../../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</a>&nbsp;entity)</pre>
</li>
</ul>
<a name="dropAutoPk-org.apache.cayenne.access.DataNode-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dropAutoPk</h4>
<pre>public&nbsp;void&nbsp;dropAutoPk(<a href="../../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</a>&nbsp;node,
<a href="https://docs.oracle.com/javase/7/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="https://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#dropAutoPk-org.apache.cayenne.access.DataNode-java.util.List-">JdbcPkGenerator</a></code></span></div>
<div class="block">Drops table named "AUTO_PK_SUPPORT" if it exists in the database.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/cayenne/dba/PkGenerator.html#dropAutoPk-org.apache.cayenne.access.DataNode-java.util.List-">dropAutoPk</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/cayenne/dba/PkGenerator.html" title="interface in org.apache.cayenne.dba">PkGenerator</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#dropAutoPk-org.apache.cayenne.access.DataNode-java.util.List-">dropAutoPk</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html" title="class in org.apache.cayenne.dba">JdbcPkGenerator</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>node</code> - node that provides access to a DataSource.</dd>
<dd><code>dbEntities</code> - a list of entities whose primary key auto-generation support
should be dropped.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code></dd>
</dl>
</li>
</ul>
<a name="dropAutoPkStatements-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dropAutoPkStatements</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;dropAutoPkStatements(<a href="https://docs.oracle.com/javase/7/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>
<div class="block">Returns an empty list, since OpenBase doesn't support this operation.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/cayenne/dba/PkGenerator.html#dropAutoPkStatements-java.util.List-">dropAutoPkStatements</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/cayenne/dba/PkGenerator.html" title="interface in org.apache.cayenne.dba">PkGenerator</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#dropAutoPkStatements-java.util.List-">dropAutoPkStatements</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html" title="class in org.apache.cayenne.dba">JdbcPkGenerator</a></code></dd>
</dl>
</li>
</ul>
<a name="createPKString-org.apache.cayenne.map.DbEntity-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createPKString</h4>
<pre>protected&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;createPKString(<a href="../../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</a>&nbsp;entity)</pre>
<div class="block">Returns a String to create PK support for an entity.</div>
</li>
</ul>
<a name="createUniquePKIndexString-org.apache.cayenne.map.DbEntity-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createUniquePKIndexString</h4>
<pre>protected&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;createUniquePKIndexString(<a href="../../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</a>&nbsp;entity)</pre>
<div class="block">Returns a String to create a unique index on table primary key columns
per OpenBase recommendations.</div>
</li>
</ul>
<a name="reset--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reset</h4>
<pre>public&nbsp;void&nbsp;reset()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/cayenne/dba/PkGenerator.html#reset--">PkGenerator</a></code></span></div>
<div class="block">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.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/cayenne/dba/PkGenerator.html#reset--">reset</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/cayenne/dba/PkGenerator.html" title="interface in org.apache.cayenne.dba">PkGenerator</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#reset--">reset</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html" title="class in org.apache.cayenne.dba">JdbcPkGenerator</a></code></dd>
</dl>
</li>
</ul>
<a name="getPkCacheSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPkCacheSize</h4>
<pre>public&nbsp;int&nbsp;getPkCacheSize()</pre>
<div class="block">Returns zero, since PK caching is not feasible with OpenBase PK
generation mechanism.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#getPkCacheSize--">getPkCacheSize</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html" title="class in org.apache.cayenne.dba">JdbcPkGenerator</a></code></dd>
</dl>
</li>
</ul>
<a name="setPkCacheSize-int-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>setPkCacheSize</h4>
<pre>public&nbsp;void&nbsp;setPkCacheSize(int&nbsp;pkCacheSize)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#setPkCacheSize-int-">JdbcPkGenerator</a></code></span></div>
<div class="block">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></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html#setPkCacheSize-int-">setPkCacheSize</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/cayenne/dba/JdbcPkGenerator.html" title="class in org.apache.cayenne.dba">JdbcPkGenerator</a></code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/OpenBasePkGenerator.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/cayenne/dba/openbase/OpenBaseAdapter.html" title="class in org.apache.cayenne.dba.openbase"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/cayenne/dba/openbase/OpenBaseQualifierTranslator.html" title="class in org.apache.cayenne.dba.openbase"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/cayenne/dba/openbase/OpenBasePkGenerator.html" target="_top">Frames</a></li>
<li><a href="OpenBasePkGenerator.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#fields.inherited.from.class.org.apache.cayenne.dba.JdbcPkGenerator">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2001&#x2013;2019 <a href="http://cayenne.apache.org/">Apache Cayenne</a>. All rights reserved.</small></p>
</body>
</html>