This is an automated email from the ASF dual-hosted git repository.
stariy95 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne-website.git
The following commit(s) were added to refs/heads/master by this push:
new 9b999200c Update docs for Cayenne 5.0
9b999200c is described below
commit 9b999200c26312daed02fa22505aa48a1052e207
Author: Nikita Timofeev <[email protected]>
AuthorDate: Mon May 25 13:16:39 2026 +0400
Update docs for Cayenne 5.0
---
.../site/content/docs/5.0/cayenne-guide.toc.html | 16 +-
.../docs/5.0/cayenne-guide/additional-modules.html | 13 +-
.../docs/5.0/cayenne-guide/agentic-coding.html | 2 +-
.../appendix-b-service-collections.html | 2 +-
.../docs/5.0/cayenne-guide/cayenne-framework.html | 5 +-
.../content/docs/5.0/cayenne-guide/commit-log.html | 191 +++++++++++++++++++++
.../cayenne-guide/customizing-cayenne-runtime.html | 36 ++--
.../docs/5.0/cayenne-guide/db-first-flow.html | 2 +-
.../5.0/cayenne-guide/ext-cache-invalidation.html | 2 +-
.../content/docs/5.0/cayenne-guide/ext-crypto.html | 14 +-
.../content/docs/5.0/cayenne-guide/ext-jcache.html | 10 +-
.../content/docs/5.0/cayenne-guide/ext-osgi.html | 6 +-
.../cayenne-guide/ext-project-compatibility.html | 8 +-
.../docs/5.0/cayenne-guide/ext-velocity.html | 8 +-
.../installing-the-cayenne-mcp-server.html | 2 +-
.../docs/5.0/cayenne-guide/maven_plugin.html | 16 +-
.../content/docs/5.0/cayenne-guide/mcp-tools.html | 68 +++++++-
.../content/docs/5.0/cayenne-guide/overview.html | 2 +-
.../docs/5.0/cayenne-guide/performance-tuning.html | 22 +--
.../docs/5.0/cayenne-guide/re-filtering.html | 2 +-
.../docs/5.0/cayenne-guide/re-introduction.html | 2 +-
.../content/docs/5.0/cayenne-guide/re-modeler.html | 2 +-
.../re-relationships-loading-control.html | 2 +-
23 files changed, 344 insertions(+), 89 deletions(-)
diff --git a/src/main/site/content/docs/5.0/cayenne-guide.toc.html
b/src/main/site/content/docs/5.0/cayenne-guide.toc.html
index eb6e1101c..189c57bfe 100644
--- a/src/main/site/content/docs/5.0/cayenne-guide.toc.html
+++ b/src/main/site/content/docs/5.0/cayenne-guide.toc.html
@@ -18,8 +18,9 @@
<li><a href="/docs/5.0/cayenne-guide/orderings" class="nav-link"
id="orderings">2.5. Orderings</a></li>
<li><a href="/docs/5.0/cayenne-guide/queries" class="nav-link"
id="queries">2.6. Queries</a></li>
<li><a href="/docs/5.0/cayenne-guide/lifecycle-events" class="nav-link"
id="lifecycle-events">2.7. Lifecycle Events</a></li>
- <li><a href="/docs/5.0/cayenne-guide/performance-tuning" class="nav-link"
id="performance-tuning">2.8. Performance Tuning</a></li>
- <li><a href="/docs/5.0/cayenne-guide/customizing-cayenne-runtime"
class="nav-link" id="customizing-cayenne-runtime">2.9. Customizing Cayenne
Runtime</a></li>
+ <li><a href="/docs/5.0/cayenne-guide/commit-log" class="nav-link"
id="commit-log">2.8. Commit Log</a></li>
+ <li><a href="/docs/5.0/cayenne-guide/performance-tuning" class="nav-link"
id="performance-tuning">2.9. Performance Tuning</a></li>
+ <li><a href="/docs/5.0/cayenne-guide/customizing-cayenne-runtime"
class="nav-link" id="customizing-cayenne-runtime">2.10. Customizing Cayenne
Runtime</a></li>
</ul></li>
<li><a href="/docs/5.0/cayenne-guide/agentic-coding" class="nav-link"
id="agentic-coding">3. Agentic Coding</a>
<ul class="sectlevel2 nav">
@@ -37,12 +38,11 @@
<li><a href="/docs/5.0/cayenne-guide/additional-modules" class="nav-link"
id="additional-modules">5. Additional Modules</a>
<ul class="sectlevel2 nav">
<li><a href="/docs/5.0/cayenne-guide/ext-cache-invalidation"
class="nav-link" id="ext-cache-invalidation">5.1. Cache Invalidation
Extension</a></li>
- <li><a href="/docs/5.0/cayenne-guide/ext-commit-log" class="nav-link"
id="ext-commit-log">5.2. Commit log extension</a></li>
- <li><a href="/docs/5.0/cayenne-guide/ext-crypto" class="nav-link"
id="ext-crypto">5.3. Crypto extension</a></li>
- <li><a href="/docs/5.0/cayenne-guide/ext-jcache" class="nav-link"
id="ext-jcache">5.4. JCache integration</a></li>
- <li><a href="/docs/5.0/cayenne-guide/ext-project-compatibility"
class="nav-link" id="ext-project-compatibility">5.5. Project compatibility
extension</a></li>
- <li><a href="/docs/5.0/cayenne-guide/ext-velocity" class="nav-link"
id="ext-velocity">5.6. Apache Velocity Extension</a></li>
- <li><a href="/docs/5.0/cayenne-guide/ext-osgi" class="nav-link"
id="ext-osgi">5.7. Cayenne OSGI extension</a></li>
+ <li><a href="/docs/5.0/cayenne-guide/ext-crypto" class="nav-link"
id="ext-crypto">5.2. Crypto extension</a></li>
+ <li><a href="/docs/5.0/cayenne-guide/ext-jcache" class="nav-link"
id="ext-jcache">5.3. JCache integration</a></li>
+ <li><a href="/docs/5.0/cayenne-guide/ext-project-compatibility"
class="nav-link" id="ext-project-compatibility">5.4. Project compatibility
extension</a></li>
+ <li><a href="/docs/5.0/cayenne-guide/ext-velocity" class="nav-link"
id="ext-velocity">5.5. Apache Velocity Extension</a></li>
+ <li><a href="/docs/5.0/cayenne-guide/ext-osgi" class="nav-link"
id="ext-osgi">5.6. Cayenne OSGI extension</a></li>
</ul></li>
<li><a href="/docs/5.0/cayenne-guide/build_tools" class="nav-link"
id="build_tools">6. Build Tools</a>
<ul class="sectlevel2 nav">
diff --git
a/src/main/site/content/docs/5.0/cayenne-guide/additional-modules.html
b/src/main/site/content/docs/5.0/cayenne-guide/additional-modules.html
index 9a0306b7d..6488fe666 100644
--- a/src/main/site/content/docs/5.0/cayenne-guide/additional-modules.html
+++ b/src/main/site/content/docs/5.0/cayenne-guide/additional-modules.html
@@ -21,15 +21,14 @@ description: "Cayenne Guide 5.0, Additional Modules"
cayenneVersion: "5.0"
cayenneNoToc: true
docId: cayenne-guide
-weight: 240
+weight: 250
---
<div><h2>5. Additional Modules</h2>
<div id="index-section-toc"><ul>
<li><a href="/docs/5.0/cayenne-guide/ext-cache-invalidation">5.1. Cache
Invalidation Extension</a>
-<li><a href="/docs/5.0/cayenne-guide/ext-commit-log">5.2. Commit log
extension</a>
-<li><a href="/docs/5.0/cayenne-guide/ext-crypto">5.3. Crypto extension</a>
-<li><a href="/docs/5.0/cayenne-guide/ext-jcache">5.4. JCache integration</a>
-<li><a href="/docs/5.0/cayenne-guide/ext-project-compatibility">5.5. Project
compatibility extension</a>
-<li><a href="/docs/5.0/cayenne-guide/ext-velocity">5.6. Apache Velocity
Extension</a>
-<li><a href="/docs/5.0/cayenne-guide/ext-osgi">5.7. Cayenne OSGI extension</a>
+<li><a href="/docs/5.0/cayenne-guide/ext-crypto">5.2. Crypto extension</a>
+<li><a href="/docs/5.0/cayenne-guide/ext-jcache">5.3. JCache integration</a>
+<li><a href="/docs/5.0/cayenne-guide/ext-project-compatibility">5.4. Project
compatibility extension</a>
+<li><a href="/docs/5.0/cayenne-guide/ext-velocity">5.5. Apache Velocity
Extension</a>
+<li><a href="/docs/5.0/cayenne-guide/ext-osgi">5.6. Cayenne OSGI extension</a>
</ul></div></div>
diff --git a/src/main/site/content/docs/5.0/cayenne-guide/agentic-coding.html
b/src/main/site/content/docs/5.0/cayenne-guide/agentic-coding.html
index 2dd39f5df..53415803e 100644
--- a/src/main/site/content/docs/5.0/cayenne-guide/agentic-coding.html
+++ b/src/main/site/content/docs/5.0/cayenne-guide/agentic-coding.html
@@ -21,7 +21,7 @@ description: "Cayenne Guide 5.0, Agentic Coding"
cayenneVersion: "5.0"
cayenneNoToc: true
docId: cayenne-guide
-weight: 150
+weight: 160
---
<div><h2>3. Agentic Coding</h2>
<div id="index-section-toc"><ul>
diff --git
a/src/main/site/content/docs/5.0/cayenne-guide/appendix-b-service-collections.html
b/src/main/site/content/docs/5.0/cayenne-guide/appendix-b-service-collections.html
index 4cf82b731..0860c1324 100644
---
a/src/main/site/content/docs/5.0/cayenne-guide/appendix-b-service-collections.html
+++
b/src/main/site/content/docs/5.0/cayenne-guide/appendix-b-service-collections.html
@@ -31,7 +31,7 @@ weight: 370
</div>
<table id="serviceCollections" class="tableblock frame-all grid-all stretch
table table-bordered">
<caption class="title">
- Table 14. Service Collection Keys Present in CayenneRuntime
+ Table 15. Service Collection Keys Present in CayenneRuntime
</caption>
<colgroup>
<col style="width: 37.5%;">
diff --git
a/src/main/site/content/docs/5.0/cayenne-guide/cayenne-framework.html
b/src/main/site/content/docs/5.0/cayenne-guide/cayenne-framework.html
index 7c87cbe85..e8ae818b5 100644
--- a/src/main/site/content/docs/5.0/cayenne-guide/cayenne-framework.html
+++ b/src/main/site/content/docs/5.0/cayenne-guide/cayenne-framework.html
@@ -32,6 +32,7 @@ weight: 50
<li><a href="/docs/5.0/cayenne-guide/orderings">2.5. Orderings</a>
<li><a href="/docs/5.0/cayenne-guide/queries">2.6. Queries</a>
<li><a href="/docs/5.0/cayenne-guide/lifecycle-events">2.7. Lifecycle
Events</a>
-<li><a href="/docs/5.0/cayenne-guide/performance-tuning">2.8. Performance
Tuning</a>
-<li><a href="/docs/5.0/cayenne-guide/customizing-cayenne-runtime">2.9.
Customizing Cayenne Runtime</a>
+<li><a href="/docs/5.0/cayenne-guide/commit-log">2.8. Commit Log</a>
+<li><a href="/docs/5.0/cayenne-guide/performance-tuning">2.9. Performance
Tuning</a>
+<li><a href="/docs/5.0/cayenne-guide/customizing-cayenne-runtime">2.10.
Customizing Cayenne Runtime</a>
</ul></div></div>
diff --git a/src/main/site/content/docs/5.0/cayenne-guide/commit-log.html
b/src/main/site/content/docs/5.0/cayenne-guide/commit-log.html
new file mode 100644
index 000000000..d5fc7507e
--- /dev/null
+++ b/src/main/site/content/docs/5.0/cayenne-guide/commit-log.html
@@ -0,0 +1,191 @@
+---
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+title: "Cayenne Guide 5.0 · Commit Log"
+description: "Cayenne Guide 5.0, Commit Log"
+cayenneVersion: "5.0"
+cayenneNoToc: true
+docId: cayenne-guide
+weight: 130
+---
+<div class="sect2">
+ <h3 id="commit-log"><a class="anchor" href="#commit-log"></a>2.8. Commit
Log</h3>
+ <div class="paragraph">
+ <p>Cayenne includes built-in support for capturing commit changes and
delivering them to application-defined listeners. This lets you build audit
trails, propagate changes to external systems, or enforce post-commit business
rules without coupling that logic to individual entity classes.</p>
+ </div>
+ <div class="admonitionblock note">
+ <table>
+ <tbody>
+ <tr>
+ <td class="icon"><i class="fa fa-info-circle fa-2x" title="Note"></i></td>
+ <td class="content">Prior to Cayenne 5.0 this feature shipped as a
separate <code>cayenne-commitlog</code> artifact. Starting with 5.0 it is part
of the core <code>cayenne</code> dependency. Migrate by replacing
<code>CommitLogModule.extend(binder)</code> with
<code>CoreModule.extend(binder)</code>.</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="sect3">
+ <h4 id="basic-usage"><a class="anchor" href="#basic-usage"></a>2.8.1. Basic
Usage</h4>
+ <div class="paragraph">
+ <p>To receive commit notifications, follow three steps.</p>
+ </div>
+ <div class="sect4">
+ <h5 id="1-annotate-entities"><a class="anchor"
href="#1-annotate-entities"></a>2.8.1.1. 1. Annotate entities</h5>
+ <div class="paragraph">
+ <p>Mark every entity whose changes you want to capture with
<code>@CommitLog</code>:</p>
+ </div>
+ <div class="listingblock">
+ <div class="content">
+ <pre class="highlight"><code class="language-java java"
data-lang="java">@CommitLog
+public class Order extends _Order {
+ // ...
+}</code></pre>
+ </div>
+ </div>
+ <div class="paragraph">
+ <p>By default every committed entity is included. To limit auditing to
annotated entities only, call <code>commitLogAnnotationEntitiesOnly()</code>
during configuration (see below).</p>
+ </div>
+ <div class="paragraph">
+ <p>The annotation accepts optional attributes:</p>
+ </div>
+ <div class="listingblock">
+ <div class="content">
+ <pre class="highlight"><code class="language-java java"
data-lang="java">@CommitLog(
+ ignoredProperties = {"internalState"}, // exclude from change
records
+ ignoreAttributes = false, // set true to skip all
attributes
+ ignoreToOneRelationships = false, // set true to skip all
to-one relationships
+ ignoreToManyRelationships = false // set true to skip all
to-many relationships
+)
+public class Order extends _Order { ... }</code></pre>
+ </div>
+ </div>
+ <div class="paragraph">
+ <p>For properties containing sensitive data, annotate the getter with
<code>@Confidential</code> instead of <code>ignoredProperties</code>. The value
will appear in the <code>ChangeMap</code> as
<code><strong><strong></strong></strong>*</code> rather than the real value.</p>
+ </div>
+ </div>
+ <div class="sect4">
+ <h5 id="2-implement-commitloglistener"><a class="anchor"
href="#2-implement-commitloglistener"></a>2.8.1.2. 2. Implement
CommitLogListener</h5>
+ <div class="listingblock">
+ <div class="content">
+ <pre class="highlight"><code class="language-java java"
data-lang="java">public class AuditListener implements CommitLogListener {
+
+ @Override
+ public void onPostCommit(ObjectContext originatingContext, ChangeMap
changes) {
+ for (ObjectChange change : changes.getUniqueChanges()) {
+ switch (change.getType()) {
+ case INSERT -> System.out.println("Inserted: " +
change.getPostCommitId());
+ case UPDATE -> System.out.println("Updated: " +
change.getPostCommitId());
+ case DELETE -> System.out.println("Deleted: " +
change.getPreCommitId());
+ }
+ }
+ }
+}</code></pre>
+ </div>
+ </div>
+ <div class="paragraph">
+ <p><code>ChangeMap</code> gives access to the full set of changes in one
commit. Each <code>ObjectChange</code> carries:</p>
+ </div>
+ <div class="ulist">
+ <ul>
+ <li>
+ <p><code>getType()</code> — <code>INSERT</code>, <code>UPDATE</code>, or
<code>DELETE</code></p></li>
+ <li>
+ <p><code>getPreCommitId()</code> / <code>getPostCommitId()</code> — the
object identity before and after the commit</p></li>
+ <li>
+ <p><code>getAttributeChanges()</code> — map of attribute name →
<code>AttributeChange</code> (old and new value)</p></li>
+ <li>
+ <p><code>getToOneRelationshipChanges()</code> /
<code>getToManyRelationshipChanges()</code> — relationship-level
changes</p></li>
+ </ul>
+ </div>
+ <div class="paragraph">
+ <p>Multiple listeners may be registered; all receive identical change data
for the same commit.</p>
+ </div>
+ </div>
+ <div class="sect4">
+ <h5 id="3-register-the-listener"><a class="anchor"
href="#3-register-the-listener"></a>2.8.1.3. 3. Register the listener</h5>
+ <div class="listingblock">
+ <div class="content">
+ <pre class="highlight"><code class="language-java java"
data-lang="java">CayenneRuntime runtime = CayenneRuntime.builder()
+ .addConfig("cayenne-project.xml")
+ .addModule(binder -> CoreModule.extend(binder)
+ .addCommitLogListener(AuditListener.class))
+ .build();</code></pre>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="sect3">
+ <h4 id="restricting-to-annotated-entities"><a class="anchor"
href="#restricting-to-annotated-entities"></a>2.8.2. Restricting to Annotated
Entities</h4>
+ <div class="paragraph">
+ <p>To audit only entities marked with <code>@CommitLog</code>:</p>
+ </div>
+ <div class="listingblock">
+ <div class="content">
+ <pre class="highlight"><code class="language-java java"
data-lang="java">CoreModule.extend(binder)
+ .commitLogAnnotationEntitiesOnly()
+ .addCommitLogListener(AuditListener.class)</code></pre>
+ </div>
+ </div>
+ </div>
+ <div class="sect3">
+ <h4 id="dispatching-events-outside-the-transaction"><a class="anchor"
href="#dispatching-events-outside-the-transaction"></a>2.8.3. Dispatching
Events Outside the Transaction</h4>
+ <div class="paragraph">
+ <p>By default, listeners are called within the database transaction, so a
listener can write additional rows as part of the same commit. If your listener
performs its own transaction (for example writing to a different database),
call <code>excludeCommitLogFromTransaction()</code> to move the notification
outside the main transaction:</p>
+ </div>
+ <div class="listingblock">
+ <div class="content">
+ <pre class="highlight"><code class="language-java java"
data-lang="java">CoreModule.extend(binder)
+ .excludeCommitLogFromTransaction()
+ .addCommitLogListener(AuditListener.class)</code></pre>
+ </div>
+ </div>
+ <div class="admonitionblock important">
+ <table>
+ <tbody>
+ <tr>
+ <td class="icon"><i class="fa fa-exclamation-circle fa-2x"
title="Important"></i></td>
+ <td class="content"><code>excludeCommitLogFromTransaction()</code> must
be called <strong>before</strong> <code>addCommitLogListener()</code>.</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ <div class="sect3">
+ <h4 id="custom-entity-factory"><a class="anchor"
href="#custom-entity-factory"></a>2.8.4. Custom Entity Factory</h4>
+ <div class="paragraph">
+ <p>For full control over which entities are included and how their metadata
is computed, provide a custom <code>CommitLogEntityFactory</code>:</p>
+ </div>
+ <div class="listingblock">
+ <div class="content">
+ <pre class="highlight"><code class="language-java java"
data-lang="java">public class MyEntityFactory implements CommitLogEntityFactory
{
+ @Override
+ public CommitLogEntity getEntity(ObjEntity entity) {
+ // return null to exclude the entity, or a CommitLogEntity instance to
include it
+ ...
+ }
+}</code></pre>
+ </div>
+ </div>
+ <div class="listingblock">
+ <div class="content">
+ <pre class="highlight"><code class="language-java java"
data-lang="java">CoreModule.extend(binder)
+ .commitLogEntityFactory(MyEntityFactory.class)
+ .addCommitLogListener(AuditListener.class)</code></pre>
+ </div>
+ </div>
+ </div>
+</div>
\ No newline at end of file
diff --git
a/src/main/site/content/docs/5.0/cayenne-guide/customizing-cayenne-runtime.html
b/src/main/site/content/docs/5.0/cayenne-guide/customizing-cayenne-runtime.html
index 72dd26f38..e20a9f6e4 100644
---
a/src/main/site/content/docs/5.0/cayenne-guide/customizing-cayenne-runtime.html
+++
b/src/main/site/content/docs/5.0/cayenne-guide/customizing-cayenne-runtime.html
@@ -21,12 +21,12 @@ description: "Cayenne Guide 5.0, Customizing Cayenne
Runtime"
cayenneVersion: "5.0"
cayenneNoToc: true
docId: cayenne-guide
-weight: 140
+weight: 150
---
<div class="sect2">
- <h3 id="customizing-cayenne-runtime"><a class="anchor"
href="#customizing-cayenne-runtime"></a>2.9. Customizing Cayenne Runtime</h3>
+ <h3 id="customizing-cayenne-runtime"><a class="anchor"
href="#customizing-cayenne-runtime"></a>2.10. Customizing Cayenne Runtime</h3>
<div class="sect3">
- <h4 id="dependency-injection-container"><a class="anchor"
href="#dependency-injection-container"></a>2.9.1. Dependency Injection
Container</h4>
+ <h4 id="dependency-injection-container"><a class="anchor"
href="#dependency-injection-container"></a>2.10.1. Dependency Injection
Container</h4>
<div class="paragraph">
<p>Cayenne runtime is built around a small powerful dependency injection
(DI) container. Just like other popular DI technologies, such as Spring or
Guice, Cayenne DI container manages sets of interdependent objects and allows
users to configure them. These objects are regular Java objects. We are calling
them "services" in this document to distinguish from all other objects that are
not configured in the container and are not managed. DI container is
responsible for service instantiat [...]
</div>
@@ -40,7 +40,7 @@ weight: 140
<p>Cayenne DI probably has ~80% of the features expected in a DI container
and has no dependency on the rest of Cayenne, so in theory can be used as an
application-wide DI engine. But its primary purpose is still to serve Cayenne.
Hence there are no plans to expand it beyond Cayenne needs. It is an ideal
"embedded" DI that does not interfere with Spring, Guice or any other such
framework present elsewhere in the application.</p>
</div>
<div class="sect4">
- <h5 id="di-bindings-api"><a class="anchor"
href="#di-bindings-api"></a>2.9.1.1. DI Bindings API</h5>
+ <h5 id="di-bindings-api"><a class="anchor"
href="#di-bindings-api"></a>2.10.1.1. DI Bindings API</h5>
<div class="paragraph">
<p>To have a working DI container, we need three things: service
interfaces and classes, a module that describes service bindings, a container
that loads the module, and resolves the dependencies. Let’s start with service
interfaces and classes:</p>
</div>
@@ -177,7 +177,7 @@ binder.bind(Key.get(Service2.class,
"i2")).to(Service2Impl.class);</code></pre>
</div>
</div>
<div class="sect4">
- <h5 id="service-lifecycle"><a class="anchor"
href="#service-lifecycle"></a>2.9.1.2. Service Lifecycle</h5>
+ <h5 id="service-lifecycle"><a class="anchor"
href="#service-lifecycle"></a>2.10.1.2. Service Lifecycle</h5>
<div class="paragraph">
<p>An important feature of the Cayenne DI container is instance scope. The
default scope (implicitly used in all examples above) is "singleton", meaning
that a binding would result in creation of only one service instance, that will
be repeatedly returned from <code>Injector.getInstance(..)</code>, as well as
injected into classes that declare it as a dependency.</p>
</div>
@@ -197,14 +197,14 @@ binder.bind(Key.get(Service2.class,
"i2")).to(Service2Impl.class);</code></pre>
</div>
</div>
<div class="sect4">
- <h5 id="overriding-services"><a class="anchor"
href="#overriding-services"></a>2.9.1.3. Overriding Services</h5>
+ <h5 id="overriding-services"><a class="anchor"
href="#overriding-services"></a>2.10.1.3. Overriding Services</h5>
<div class="paragraph">
<p>Cayenne DI allows to override services already defined in the current
module, or more commonly - some other module in the the same container.
Actually there’s no special API to override a service, you’d just bind the
service key again with a new implementation or provider. The last binding for a
key takes precedence. This means that the order of modules is important when
configuring a container. The built-in Cayenne injector ensures that Cayenne
standard modules are loaded first, [...]
</div>
</div>
</div>
<div class="sect3">
- <h4 id="customization-strategies"><a class="anchor"
href="#customization-strategies"></a>2.9.2. Customization Strategies</h4>
+ <h4 id="customization-strategies"><a class="anchor"
href="#customization-strategies"></a>2.10.2. Customization Strategies</h4>
<div class="paragraph">
<p>The previous section discussed how Cayenne DI works in general terms.
Since Cayenne users will mostly be dealing with an existing Injector provided
by CayenneRuntime, it is important to understand how to build custom extensions
to a preconfigured container. As shown in "Starting and Stopping
CayenneRuntime" chapter, custom extensions are done by writing an application
DI module (or multiple modules) that configures service overrides. This section
shows all the configuration possibi [...]
</div>
@@ -227,7 +227,7 @@ CayenneRuntime runtime = CayenneRuntime.builder()
</div>
</div>
<div class="sect4">
- <h5 id="changing-properties-of-existing-services"><a class="anchor"
href="#changing-properties-of-existing-services"></a>2.9.2.1. Changing
Properties of Existing Services</h5>
+ <h5 id="changing-properties-of-existing-services"><a class="anchor"
href="#changing-properties-of-existing-services"></a>2.10.2.1. Changing
Properties of Existing Services</h5>
<div class="paragraph">
<p>Many built-in Cayenne services change their behavior based on a value
of some environment property. A user may change Cayenne behavior without even
knowing which services are responsible for it, but setting a specific value of
a known property. Supported property names are listed in "Appendix A".</p>
</div>
@@ -250,7 +250,7 @@ CayenneRuntime runtime = CayenneRuntime.builder()
</div>
</div>
<div class="sect4">
- <h5 id="contributing-to-service-collections"><a class="anchor"
href="#contributing-to-service-collections"></a>2.9.2.2. Contributing to
Service Collections</h5>
+ <h5 id="contributing-to-service-collections"><a class="anchor"
href="#contributing-to-service-collections"></a>2.10.2.2. Contributing to
Service Collections</h5>
<div class="paragraph">
<p>Cayenne can be extended by adding custom objects to named maps or lists
bound in DI. We are calling these lists/maps "service collections". A service
collection allows things like appending a custom strategy to a list of built-in
strategies. E.g. an application that needs to install a custom DbAdapter for
some database type may contribute an instance of custom DbAdapterDetector to a
<code>o.a.c.configuration.runtime.DefaultDbAdapterFactory.detectors</code>
list:</p>
</div>
@@ -275,7 +275,7 @@ CayenneRuntime runtime = CayenneRuntime.builder()
</div>
</div>
<div class="sect4">
- <h5 id="alternative-service-implementations"><a class="anchor"
href="#alternative-service-implementations"></a>2.9.2.3. Alternative Service
Implementations</h5>
+ <h5 id="alternative-service-implementations"><a class="anchor"
href="#alternative-service-implementations"></a>2.10.2.3. Alternative Service
Implementations</h5>
<div class="paragraph">
<p>As mentioned above, custom modules are loaded by CayenneRuntime after
the built-in modules. So it is easy to redefine a built-in service in Cayenne
by rebinding desired implementations or providers. To do that, first we need to
know what those services to redefine are. While we describe some of them in the
following sections, the best way to get a full list is to check the source code
of the Cayenne version you are using and namely look in
<code>org.apache.cayenne.configuration.ru [...]
</div>
@@ -291,9 +291,9 @@ CayenneRuntime runtime = CayenneRuntime.builder()
</div>
</div>
<div class="sect3">
- <h4 id="using-custom-data-types"><a class="anchor"
href="#using-custom-data-types"></a>2.9.3. Using custom data types</h4>
+ <h4 id="using-custom-data-types"><a class="anchor"
href="#using-custom-data-types"></a>2.10.3. Using custom data types</h4>
<div class="sect4">
- <h5 id="value-object-type"><a class="anchor"
href="#value-object-type"></a>2.9.3.1. Value object type</h5>
+ <h5 id="value-object-type"><a class="anchor"
href="#value-object-type"></a>2.10.3.1. Value object type</h5>
<div class="paragraph">
<p><code>ValueObjectType</code> is a new and lightweight alternative to
the Extended Types API described in the following section. In most cases is
should be preferred as is it easier to understand and use. Currently only one
case is known when <code>ExtendedType</code> should be used: when your value
object can be mapped on different JDBC types.</p>
</div>
@@ -369,7 +369,7 @@ CayenneRuntime runtime = CayenneRuntime.builder()
</div>
</div>
<div class="sect4">
- <h5 id="extended-types"><a class="anchor"
href="#extended-types"></a>2.9.3.2. Extended Types</h5>
+ <h5 id="extended-types"><a class="anchor"
href="#extended-types"></a>2.10.3.2. Extended Types</h5>
<div class="paragraph">
<p>JDBC specification defines a set of "standard" database column types
(defined in java.sql.Types class) and a very specific mapping of these types to
Java Object Types, such as java.lang.String, java.math.BigDecimal, etc.
Sometimes there is a need to use a custom Java type not known to JDBC driver
and Cayenne allows to configure it. For this Cayenne needs to know how to
instantiate this type from a database "primitive" value, and conversely, how to
transform an object of the custom [...]
</div>
@@ -469,27 +469,27 @@ CayenneRuntime runtime = CayenneRuntime.builder()
</div>
</div>
<div class="sect3">
- <h4 id="noteworthy-built-in-services"><a class="anchor"
href="#noteworthy-built-in-services"></a>2.9.4. Noteworthy Built-in
Services</h4>
+ <h4 id="noteworthy-built-in-services"><a class="anchor"
href="#noteworthy-built-in-services"></a>2.10.4. Noteworthy Built-in
Services</h4>
<div class="sect4">
- <h5 id="jdbceventlogger"><a class="anchor"
href="#jdbceventlogger"></a>2.9.4.1. JdbcEventLogger</h5>
+ <h5 id="jdbceventlogger"><a class="anchor"
href="#jdbceventlogger"></a>2.10.4.1. JdbcEventLogger</h5>
<div class="paragraph">
<p><code>org.apache.cayenne.log.JdbcEventLogger</code> is the service that
defines logging API for Cayenne internals. It provides facilities for logging
queries, commits, transactions, etc. The default implementation is
<code>org.apache.cayenne.log.Slf4jJdbcEventLogger</code> that performs logging
via slf4j-api library. Cayenne library includes another potentially useful
logger - <code>org.apache.cayenne.log.FormattedSlf4jJdbcEventLogger</code> that
produces formatted multiline SQL o [...]
</div>
</div>
<div class="sect4">
- <h5 id="datasourcefactory"><a class="anchor"
href="#datasourcefactory"></a>2.9.4.2. DataSourceFactory</h5>
+ <h5 id="datasourcefactory"><a class="anchor"
href="#datasourcefactory"></a>2.10.4.2. DataSourceFactory</h5>
<div class="paragraph">
<p>Factory that returns <code>javax.sql.DataSource</code> object based on
the configuration provided in the "nodeDescriptor".</p>
</div>
</div>
<div class="sect4">
- <h5 id="datachannelsyncfilter-and-datachannelqueryfilter"><a class="anchor"
href="#datachannelsyncfilter-and-datachannelqueryfilter"></a>2.9.4.3.
DataChannelSyncFilter and DataChannelQueryFilter</h5>
+ <h5 id="datachannelsyncfilter-and-datachannelqueryfilter"><a class="anchor"
href="#datachannelsyncfilter-and-datachannelqueryfilter"></a>2.10.4.3.
DataChannelSyncFilter and DataChannelQueryFilter</h5>
<div class="paragraph">
<p>Interfaces of filters that allow to intercept DataChannel operations.
Filters allow to implement chains of custom processors around a DataChannel,
that can be used for security, monitoring, business logic, providing context to
lifecycle event listeners, etc.</p>
</div>
</div>
<div class="sect4">
- <h5 id="querycache"><a class="anchor" href="#querycache"></a>2.9.4.4.
QueryCache</h5>
+ <h5 id="querycache"><a class="anchor" href="#querycache"></a>2.10.4.4.
QueryCache</h5>
<div class="paragraph">
<p>Defines API of a cache that stores query results.</p>
</div>
diff --git a/src/main/site/content/docs/5.0/cayenne-guide/db-first-flow.html
b/src/main/site/content/docs/5.0/cayenne-guide/db-first-flow.html
index 13f45f25f..6b8d7b428 100644
--- a/src/main/site/content/docs/5.0/cayenne-guide/db-first-flow.html
+++ b/src/main/site/content/docs/5.0/cayenne-guide/db-first-flow.html
@@ -21,7 +21,7 @@ description: "Cayenne Guide 5.0, DB-First Flow"
cayenneVersion: "5.0"
cayenneNoToc: true
docId: cayenne-guide
-weight: 190
+weight: 200
---
<div><h2>4. DB-First Flow</h2>
<div id="index-section-toc"><ul>
diff --git
a/src/main/site/content/docs/5.0/cayenne-guide/ext-cache-invalidation.html
b/src/main/site/content/docs/5.0/cayenne-guide/ext-cache-invalidation.html
index 6f116bf9e..5702e0339 100644
--- a/src/main/site/content/docs/5.0/cayenne-guide/ext-cache-invalidation.html
+++ b/src/main/site/content/docs/5.0/cayenne-guide/ext-cache-invalidation.html
@@ -21,7 +21,7 @@ description: "Cayenne Guide 5.0, Cache Invalidation Extension"
cayenneVersion: "5.0"
cayenneNoToc: true
docId: cayenne-guide
-weight: 250
+weight: 260
---
<div class="sect2">
<h3 id="ext-cache-invalidation"><a class="anchor"
href="#ext-cache-invalidation"></a>5.1. Cache Invalidation Extension</h3>
diff --git a/src/main/site/content/docs/5.0/cayenne-guide/ext-crypto.html
b/src/main/site/content/docs/5.0/cayenne-guide/ext-crypto.html
index be0b041cd..03a9901ce 100644
--- a/src/main/site/content/docs/5.0/cayenne-guide/ext-crypto.html
+++ b/src/main/site/content/docs/5.0/cayenne-guide/ext-crypto.html
@@ -24,12 +24,12 @@ docId: cayenne-guide
weight: 270
---
<div class="sect2">
- <h3 id="ext-crypto"><a class="anchor" href="#ext-crypto"></a>5.3. Crypto
extension</h3>
+ <h3 id="ext-crypto"><a class="anchor" href="#ext-crypto"></a>5.2. Crypto
extension</h3>
<div class="paragraph">
<p>Crypto module allows encrypt and decrypt values stored in DB
transparently to your Java app.</p>
</div>
<div class="sect3">
- <h4 id="maven-4"><a class="anchor" href="#maven-4"></a>5.3.1. Maven</h4>
+ <h4 id="maven-3"><a class="anchor" href="#maven-3"></a>5.2.1. Maven</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-XML XML"
data-lang="XML"><dependency>
@@ -41,7 +41,7 @@ weight: 270
</div>
</div>
<div class="sect3">
- <h4 id="gradle-4"><a class="anchor" href="#gradle-4"></a>5.3.2. Gradle</h4>
+ <h4 id="gradle-3"><a class="anchor" href="#gradle-3"></a>5.2.2. Gradle</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-Groovy Groovy"
data-lang="Groovy">compile 'org.apache.cayenne:cayenne-crypto:5.0'</code></pre>
@@ -49,9 +49,9 @@ weight: 270
</div>
</div>
<div class="sect3">
- <h4 id="usage-3"><a class="anchor" href="#usage-3"></a>5.3.3. Usage</h4>
+ <h4 id="usage-2"><a class="anchor" href="#usage-2"></a>5.2.3. Usage</h4>
<div class="sect4">
- <h5 id="setup-your-model-and-db"><a class="anchor"
href="#setup-your-model-and-db"></a>5.3.3.1. Setup your model and DB</h5>
+ <h5 id="setup-your-model-and-db"><a class="anchor"
href="#setup-your-model-and-db"></a>5.2.3.1. Setup your model and DB</h5>
<div class="paragraph">
<p>To use crypto module you must prepare your database to allow
<code>byte[]</code> storage and properly name columns that will contain
encrypted values.</p>
</div>
@@ -96,7 +96,7 @@ weight: 270
</div>
</div>
<div class="sect4">
- <h5 id="setup-keystore"><a class="anchor"
href="#setup-keystore"></a>5.3.3.2. Setup keystore</h5>
+ <h5 id="setup-keystore"><a class="anchor"
href="#setup-keystore"></a>5.2.3.2. Setup keystore</h5>
<div class="paragraph">
<p>To perform encryption you must provide <code>KEYSTORE_URL</code> and
<code>KEY_PASSWORD</code>. Currently crypto module supports only Java "jceks"
KeyStore.</p>
</div>
@@ -109,7 +109,7 @@ weight: 270
</div>
</div>
<div class="sect4">
- <h5 id="additional-settings"><a class="anchor"
href="#additional-settings"></a>5.3.3.3. Additional settings</h5>
+ <h5 id="additional-settings"><a class="anchor"
href="#additional-settings"></a>5.2.3.3. Additional settings</h5>
<div class="paragraph">
<p>In addition to <code>ColumnMapper</code> mentioned above you can
customize other parts of <code>crypto module</code>. You can enable
<code>gzip</code> compression and <code>HMAC</code> usage (later will ensure
integrity of data).</p>
</div>
diff --git a/src/main/site/content/docs/5.0/cayenne-guide/ext-jcache.html
b/src/main/site/content/docs/5.0/cayenne-guide/ext-jcache.html
index 56ccbd868..61cede9c5 100644
--- a/src/main/site/content/docs/5.0/cayenne-guide/ext-jcache.html
+++ b/src/main/site/content/docs/5.0/cayenne-guide/ext-jcache.html
@@ -24,12 +24,12 @@ docId: cayenne-guide
weight: 280
---
<div class="sect2">
- <h3 id="ext-jcache"><a class="anchor" href="#ext-jcache"></a>5.4. JCache
integration</h3>
+ <h3 id="ext-jcache"><a class="anchor" href="#ext-jcache"></a>5.3. JCache
integration</h3>
<div class="paragraph">
<p>Allows to integrate any JCache (JSR 107) compatible caching provider with
Cayenne.</p>
</div>
<div class="sect3">
- <h4 id="maven-5"><a class="anchor" href="#maven-5"></a>5.4.1. Maven</h4>
+ <h4 id="maven-4"><a class="anchor" href="#maven-4"></a>5.3.1. Maven</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-XML XML"
data-lang="XML"><dependency>
@@ -41,7 +41,7 @@ weight: 280
</div>
</div>
<div class="sect3">
- <h4 id="gradle-5"><a class="anchor" href="#gradle-5"></a>5.4.2. Gradle</h4>
+ <h4 id="gradle-4"><a class="anchor" href="#gradle-4"></a>5.3.2. Gradle</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-Groovy Groovy"
data-lang="Groovy">compile 'org.apache.cayenne:cayenne-jcache:5.0'</code></pre>
@@ -49,7 +49,7 @@ weight: 280
</div>
</div>
<div class="sect3">
- <h4 id="usage-4"><a class="anchor" href="#usage-4"></a>5.4.3. Usage</h4>
+ <h4 id="usage-3"><a class="anchor" href="#usage-3"></a>5.3.3. Usage</h4>
<div class="paragraph">
<p>To use JCache provider in your app you need to include this module and
caching provider libs (e.g. Ehcache). You can provide own implementation of
<code>org.apache.cayenne.jcache.JCacheConfigurationFactory</code> to customize
cache configuration if required.</p>
</div>
@@ -90,7 +90,7 @@ weight: 280
<p>You may else be interested in <a
href="/docs/5.0/cayenne-guide/ext-cache-invalidation">Cache invalidation
extension</a>.</p>
</div>
<div class="sect4">
- <h5 id="ehcache-setup-example"><a class="anchor"
href="#ehcache-setup-example"></a>5.4.3.1. Ehcache setup example</h5>
+ <h5 id="ehcache-setup-example"><a class="anchor"
href="#ehcache-setup-example"></a>5.3.3.1. Ehcache setup example</h5>
<div class="paragraph">
<p>Here is an example of using <code>ehcache</code> as cache manager.</p>
</div>
diff --git a/src/main/site/content/docs/5.0/cayenne-guide/ext-osgi.html
b/src/main/site/content/docs/5.0/cayenne-guide/ext-osgi.html
index 3cd6f20a8..dced7f135 100644
--- a/src/main/site/content/docs/5.0/cayenne-guide/ext-osgi.html
+++ b/src/main/site/content/docs/5.0/cayenne-guide/ext-osgi.html
@@ -24,12 +24,12 @@ docId: cayenne-guide
weight: 310
---
<div class="sect2">
- <h3 id="ext-osgi"><a class="anchor" href="#ext-osgi"></a>5.7. Cayenne OSGI
extension</h3>
+ <h3 id="ext-osgi"><a class="anchor" href="#ext-osgi"></a>5.6. Cayenne OSGI
extension</h3>
<div class="paragraph">
<p>Helps to bootstrap Cayenne in OSGi environment.</p>
</div>
<div class="sect3">
- <h4 id="maven-8"><a class="anchor" href="#maven-8"></a>5.7.1. Maven</h4>
+ <h4 id="maven-7"><a class="anchor" href="#maven-7"></a>5.6.1. Maven</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-XML XML"
data-lang="XML"><dependency>
@@ -41,7 +41,7 @@ weight: 310
</div>
</div>
<div class="sect3">
- <h4 id="gradle-8"><a class="anchor" href="#gradle-8"></a>5.7.2. Gradle</h4>
+ <h4 id="gradle-7"><a class="anchor" href="#gradle-7"></a>5.6.2. Gradle</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-Groovy Groovy"
data-lang="Groovy">compile 'org.apache.cayenne:cayenne-osgi:5.0'</code></pre>
diff --git
a/src/main/site/content/docs/5.0/cayenne-guide/ext-project-compatibility.html
b/src/main/site/content/docs/5.0/cayenne-guide/ext-project-compatibility.html
index de8fe78de..4e2ea6942 100644
---
a/src/main/site/content/docs/5.0/cayenne-guide/ext-project-compatibility.html
+++
b/src/main/site/content/docs/5.0/cayenne-guide/ext-project-compatibility.html
@@ -24,7 +24,7 @@ docId: cayenne-guide
weight: 290
---
<div class="sect2">
- <h3 id="ext-project-compatibility"><a class="anchor"
href="#ext-project-compatibility"></a>5.5. Project compatibility extension</h3>
+ <h3 id="ext-project-compatibility"><a class="anchor"
href="#ext-project-compatibility"></a>5.4. Project compatibility extension</h3>
<div class="paragraph">
<p>Since version 4.1 Cayenne doesn’t allow to load project XML files from
previous versions as this can lead to unexpected errors in runtime. This module
allows to use project files from older versions performing their upgrade on the
fly (without modifying files). This can be useful when using Cayenne models
from third-party libraries in your app.</p>
</div>
@@ -39,7 +39,7 @@ weight: 290
</table>
</div>
<div class="sect3">
- <h4 id="maven-6"><a class="anchor" href="#maven-6"></a>5.5.1. Maven</h4>
+ <h4 id="maven-5"><a class="anchor" href="#maven-5"></a>5.4.1. Maven</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-XML XML"
data-lang="XML"><dependency>
@@ -51,7 +51,7 @@ weight: 290
</div>
</div>
<div class="sect3">
- <h4 id="gradle-6"><a class="anchor" href="#gradle-6"></a>5.5.2. Gradle</h4>
+ <h4 id="gradle-5"><a class="anchor" href="#gradle-5"></a>5.4.2. Gradle</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-Groovy Groovy"
data-lang="Groovy">compile
'org.apache.cayenne:cayenne-project-compatibility:5.0'</code></pre>
@@ -59,7 +59,7 @@ weight: 290
</div>
</div>
<div class="sect3">
- <h4 id="usage-5"><a class="anchor" href="#usage-5"></a>5.5.3. Usage</h4>
+ <h4 id="usage-4"><a class="anchor" href="#usage-4"></a>5.4.3. Usage</h4>
<div class="paragraph">
<p>This module doesn’t require any additional setup.</p>
</div>
diff --git a/src/main/site/content/docs/5.0/cayenne-guide/ext-velocity.html
b/src/main/site/content/docs/5.0/cayenne-guide/ext-velocity.html
index 576e92767..b7cb4d4bc 100644
--- a/src/main/site/content/docs/5.0/cayenne-guide/ext-velocity.html
+++ b/src/main/site/content/docs/5.0/cayenne-guide/ext-velocity.html
@@ -24,12 +24,12 @@ docId: cayenne-guide
weight: 300
---
<div class="sect2">
- <h3 id="ext-velocity"><a class="anchor" href="#ext-velocity"></a>5.6. Apache
Velocity Extension</h3>
+ <h3 id="ext-velocity"><a class="anchor" href="#ext-velocity"></a>5.5. Apache
Velocity Extension</h3>
<div class="paragraph">
<p>Enables usage of full featured Apache Velocity templates in
<code>SQLSelect</code> / <code>SQLExec</code> queries.</p>
</div>
<div class="sect3">
- <h4 id="maven-7"><a class="anchor" href="#maven-7"></a>5.6.1. Maven</h4>
+ <h4 id="maven-6"><a class="anchor" href="#maven-6"></a>5.5.1. Maven</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-XML XML"
data-lang="XML"><dependency>
@@ -41,7 +41,7 @@ weight: 300
</div>
</div>
<div class="sect3">
- <h4 id="gradle-7"><a class="anchor" href="#gradle-7"></a>5.6.2. Gradle</h4>
+ <h4 id="gradle-6"><a class="anchor" href="#gradle-6"></a>5.5.2. Gradle</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-Groovy Groovy"
data-lang="Groovy">compile
'org.apache.cayenne:cayenne-velocity:5.0'</code></pre>
@@ -49,7 +49,7 @@ weight: 300
</div>
</div>
<div class="sect3">
- <h4 id="usage-6"><a class="anchor" href="#usage-6"></a>5.6.3. Usage</h4>
+ <h4 id="usage-5"><a class="anchor" href="#usage-5"></a>5.5.3. Usage</h4>
<div class="paragraph">
<p>This module doesn’t require any additional setup. In addition of
directives mentioned in <a
href="/docs/5.0/cayenne-guide/queries#directives">this chapter</a>, this module
also adds <code>#chain</code> and <code>#chunk</code> directives.</p>
</div>
diff --git
a/src/main/site/content/docs/5.0/cayenne-guide/installing-the-cayenne-mcp-server.html
b/src/main/site/content/docs/5.0/cayenne-guide/installing-the-cayenne-mcp-server.html
index e62eda916..c4ee0bfe2 100644
---
a/src/main/site/content/docs/5.0/cayenne-guide/installing-the-cayenne-mcp-server.html
+++
b/src/main/site/content/docs/5.0/cayenne-guide/installing-the-cayenne-mcp-server.html
@@ -21,7 +21,7 @@ description: "Cayenne Guide 5.0, Installing the Cayenne MCP
Server"
cayenneVersion: "5.0"
cayenneNoToc: true
docId: cayenne-guide
-weight: 170
+weight: 180
---
<div class="sect2">
<h3 id="installing-the-cayenne-mcp-server"><a class="anchor"
href="#installing-the-cayenne-mcp-server"></a>3.2. Installing the Cayenne MCP
Server</h3>
diff --git a/src/main/site/content/docs/5.0/cayenne-guide/maven_plugin.html
b/src/main/site/content/docs/5.0/cayenne-guide/maven_plugin.html
index 02e97f7ec..de74a083e 100644
--- a/src/main/site/content/docs/5.0/cayenne-guide/maven_plugin.html
+++ b/src/main/site/content/docs/5.0/cayenne-guide/maven_plugin.html
@@ -38,7 +38,7 @@ weight: 330
</div>
<table id="tablecgen" class="tableblock frame-all grid-all stretch table
table-bordered">
<caption class="title">
- Table 6. cgen required parameters
+ Table 7. cgen required parameters
</caption>
<colgroup>
<col style="width: 16.6666%;">
@@ -74,7 +74,7 @@ weight: 330
</table>
<table id="cgenOptional" class="tableblock frame-all grid-all stretch table
table-bordered">
<caption class="title">
- Table 7. cgen optional parameters
+ Table 8. cgen optional parameters
</caption>
<colgroup>
<col style="width: 25%;">
@@ -259,7 +259,7 @@ weight: 330
</div>
<table id="cdbimportTable" class="tableblock frame-all grid-all stretch
table table-bordered">
<caption class="title">
- Table 8. cdbimport parameters
+ Table 9. cdbimport parameters
</caption>
<colgroup>
<col style="width: 20%;">
@@ -330,7 +330,7 @@ weight: 330
</table>
<table id="cdbimportDataSource" class="tableblock frame-all grid-all stretch
table table-bordered">
<caption class="title">
- Table 9. <dataSource> parameters
+ Table 10. <dataSource> parameters
</caption>
<colgroup>
<col style="width: 20%;">
@@ -391,7 +391,7 @@ weight: 330
</table>
<table id="dbimportParameters" class="tableblock frame-all grid-all stretch
table table-bordered">
<caption class="title">
- Table 10. <dbimport> parameters
+ Table 11. <dbimport> parameters
</caption>
<colgroup>
<col style="width: 37.5%;">
@@ -599,7 +599,7 @@ weight: 330
</div>
<table id="cdbgenTable" class="tableblock frame-all grid-all stretch table
table-bordered">
<caption class="title">
- Table 11. cdbgen required parameters
+ Table 12. cdbgen required parameters
</caption>
<colgroup>
<col style="width: 16.6666%;">
@@ -643,7 +643,7 @@ weight: 330
</table>
<table id="dataSourceParameteres" class="tableblock frame-all grid-all
stretch table table-bordered">
<caption class="title">
- Table 12. <dataSource> parameters
+ Table 13. <dataSource> parameters
</caption>
<colgroup>
<col style="width: 20%;">
@@ -704,7 +704,7 @@ weight: 330
</table>
<table id="cdbgenOptionl" class="tableblock frame-all grid-all stretch table
table-bordered">
<caption class="title">
- Table 13. cdbgen optional parameters
+ Table 14. cdbgen optional parameters
</caption>
<colgroup>
<col style="width: 16.6666%;">
diff --git a/src/main/site/content/docs/5.0/cayenne-guide/mcp-tools.html
b/src/main/site/content/docs/5.0/cayenne-guide/mcp-tools.html
index 05f636e8e..09d4be207 100644
--- a/src/main/site/content/docs/5.0/cayenne-guide/mcp-tools.html
+++ b/src/main/site/content/docs/5.0/cayenne-guide/mcp-tools.html
@@ -21,12 +21,12 @@ description: "Cayenne Guide 5.0, MCP Tools"
cayenneVersion: "5.0"
cayenneNoToc: true
docId: cayenne-guide
-weight: 180
+weight: 190
---
<div class="sect2">
<h3 id="mcp-tools"><a class="anchor" href="#mcp-tools"></a>3.3. MCP Tools</h3>
<div class="paragraph">
- <p>The server currently exposes two tools. Your agent will discover them on
its own, but it is useful to understand the capabilities and possible prompts.
Both tools operate on a Cayenne project descriptor (a
<code>cayenne-*.xml</code> file) and take absolute paths - agents should
resolve relative paths against the current workspace before invoking.</p>
+ <p>The server exposes three tools. Your agent will discover them on its own,
but it is useful to understand the capabilities and possible prompts. All tools
operate on a Cayenne project descriptor (a <code>cayenne-*.xml</code> file) and
take absolute paths - agents should resolve relative paths against the current
workspace before invoking.</p>
</div>
<div class="sect3">
<h4 id="open_project"><a class="anchor" href="#open_project"></a>3.3.1.
open_project</h4>
@@ -142,4 +142,68 @@ weight: 180
</blockquote>
</div>
</div>
+ <div class="sect3">
+ <h4 id="dbimport_run"><a class="anchor" href="#dbimport_run"></a>3.3.3.
dbimport_run</h4>
+ <div class="paragraph">
+ <p>Runs Cayenne reverse engineering (dbimport) for a single DataMap inside
the project. The tool reads the JDBC connection from the DBConnector that
CayenneModeler stored in preferences when the user last ran the
reverse-engineering dialog for this DataMap. If the DataMap has a
<code><reverse-engineering></code> block its filters are applied;
otherwise the full database schema is imported. The DataMap XML is rewritten on
disk with the merged schema, and a JSON summary of what ch [...]
+ </div>
+ <div class="paragraph">
+ <p>JDBC credentials are not passed as arguments — they come from
CayenneModeler preferences. If no connection has been saved yet
(<code>dbconnector_not_configured</code> error), open the project in the
Modeler with <code>open_project</code>, run the dialog once to save the
connection, then call <code>dbimport_run</code> again.</p>
+ </div>
+ <table class="tableblock frame-all grid-all stretch">
+ <caption class="title">
+ Table 6. Parameters
+ </caption>
+ <colgroup>
+ <col style="width: 20%;">
+ <col style="width: 20%;">
+ <col style="width: 60%;">
+ </colgroup>
+ <thead>
+ <tr>
+ <th class="tableblock halign-left valign-top">Name</th>
+ <th class="tableblock halign-left valign-top">Required</th>
+ <th class="tableblock halign-left valign-top">Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="tableblock halign-left valign-top">
+ <p class="tableblock"><code>projectPath</code></p></td>
+ <td class="tableblock halign-left valign-top">
+ <p class="tableblock">yes</p></td>
+ <td class="tableblock halign-left valign-top">
+ <p class="tableblock">Absolute path to the top-level Cayenne project
descriptor (<code>cayenne-*.xml</code>), not a DataMap file.</p></td>
+ </tr>
+ <tr>
+ <td class="tableblock halign-left valign-top">
+ <p class="tableblock"><code>dataMap</code></p></td>
+ <td class="tableblock halign-left valign-top">
+ <p class="tableblock">yes</p></td>
+ <td class="tableblock halign-left valign-top">
+ <p class="tableblock">Name of the target DataMap as it appears in the
<code><map name='…'></code> element of the project descriptor.</p></td>
+ </tr>
+ </tbody>
+ </table>
+ <div class="paragraph">
+ <p>A typical agent prompt that triggers this tool:</p>
+ </div>
+ <div class="quoteblock">
+ <blockquote>
+ <div class="paragraph">
+ <p>sync the Cayenne model with the database</p>
+ </div>
+ </blockquote>
+ </div>
+ <div class="paragraph">
+ <p>Or more specifically:</p>
+ </div>
+ <div class="quoteblock">
+ <blockquote>
+ <div class="paragraph">
+ <p>re-import the <code>MyDataMap</code> schema from the database into
<code>/path/to/cayenne-project.xml</code></p>
+ </div>
+ </blockquote>
+ </div>
+ </div>
</div>
\ No newline at end of file
diff --git a/src/main/site/content/docs/5.0/cayenne-guide/overview.html
b/src/main/site/content/docs/5.0/cayenne-guide/overview.html
index 5c1814aae..d35719ef0 100644
--- a/src/main/site/content/docs/5.0/cayenne-guide/overview.html
+++ b/src/main/site/content/docs/5.0/cayenne-guide/overview.html
@@ -21,7 +21,7 @@ description: "Cayenne Guide 5.0, Overview"
cayenneVersion: "5.0"
cayenneNoToc: true
docId: cayenne-guide
-weight: 160
+weight: 170
---
<div class="sect2">
<h3 id="overview"><a class="anchor" href="#overview"></a>3.1. Overview</h3>
diff --git
a/src/main/site/content/docs/5.0/cayenne-guide/performance-tuning.html
b/src/main/site/content/docs/5.0/cayenne-guide/performance-tuning.html
index e968c8990..cd5065f74 100644
--- a/src/main/site/content/docs/5.0/cayenne-guide/performance-tuning.html
+++ b/src/main/site/content/docs/5.0/cayenne-guide/performance-tuning.html
@@ -21,12 +21,12 @@ description: "Cayenne Guide 5.0, Performance Tuning"
cayenneVersion: "5.0"
cayenneNoToc: true
docId: cayenne-guide
-weight: 130
+weight: 140
---
<div class="sect2">
- <h3 id="performance-tuning"><a class="anchor"
href="#performance-tuning"></a>2.8. Performance Tuning</h3>
+ <h3 id="performance-tuning"><a class="anchor"
href="#performance-tuning"></a>2.9. Performance Tuning</h3>
<div class="sect3">
- <h4 id="prefetching"><a class="anchor" href="#prefetching"></a>2.8.1.
Prefetching</h4>
+ <h4 id="prefetching"><a class="anchor" href="#prefetching"></a>2.9.1.
Prefetching</h4>
<div class="paragraph">
<p>Prefetching is a technique that allows to bring back in one query not
only the queried objects, but also objects related to them. In other words it
is a controlled eager relationship resolving mechanism. Prefetching is
discussed in the "Performance Tuning" chapter, as it is a powerful performance
optimization method. However another common application of prefetching is to
refresh stale object relationships, so more generally it can be viewed as a
technique for managing subsets of t [...]
</div>
@@ -150,7 +150,7 @@
PrefetchTreeNode.DISJOINT_BY_ID_PREFETCH_SEMANTICS</code></pre>
</div>
</div>
<div class="sect3">
- <h4 id="data-rows"><a class="anchor" href="#data-rows"></a>2.8.2. Data
Rows</h4>
+ <h4 id="data-rows"><a class="anchor" href="#data-rows"></a>2.9.2. Data
Rows</h4>
<div class="paragraph">
<p>Converting result set data to Persistent objects and registering these
objects in the ObjectContext can be an expensive operation comparable to the
time spent running the query (and frequently exceeding it). Internally Cayenne
builds the result as a list of DataRows, that are later converted to objects.
Skipping the last step and using data in the form of DataRows can significantly
increase performance.</p>
</div>
@@ -189,7 +189,7 @@ for(DataRow row : rows) {
</div>
</div>
<div class="sect3">
- <h4 id="specific-attributes-and-relationships-with-ejbql"><a class="anchor"
href="#specific-attributes-and-relationships-with-ejbql"></a>2.8.3. Specific
Attributes and Relationships with EJBQL</h4>
+ <h4 id="specific-attributes-and-relationships-with-ejbql"><a class="anchor"
href="#specific-attributes-and-relationships-with-ejbql"></a>2.9.3. Specific
Attributes and Relationships with EJBQL</h4>
<div class="paragraph">
<p>It is possible to fetch specific attributes and relationships from a
model using <a href="/docs/5.0/cayenne-guide/queries#ejbql">EJBQLQuery</a>. The
following example would return a java.util.List of String objects;</p>
</div>
@@ -211,7 +211,7 @@ for(DataRow row : rows) {
</div>
</div>
<div class="sect3">
- <h4 id="iterated-queries"><a class="anchor"
href="#iterated-queries"></a>2.8.4. Iterated Queries</h4>
+ <h4 id="iterated-queries"><a class="anchor"
href="#iterated-queries"></a>2.9.4. Iterated Queries</h4>
<div class="paragraph">
<p>While contemporary hardware may easily allow applications to fetch
hundreds of thousands or even millions of objects into memory, it doesn’t mean
this is always a good idea to do so. You can optimize processing of very large
result sets with two techniques discussed in this and the following chapter -
iterated and paginated queries.</p>
</div>
@@ -262,7 +262,7 @@ for(DataRow row : rows) {
</div>
</div>
<div class="sect3">
- <h4 id="paginated-queries"><a class="anchor"
href="#paginated-queries"></a>2.8.5. Paginated Queries</h4>
+ <h4 id="paginated-queries"><a class="anchor"
href="#paginated-queries"></a>2.9.5. Paginated Queries</h4>
<div class="paragraph">
<p>Enabling query pagination allows to load very large result sets in a
Java app with very little memory overhead (much smaller than even the DataRows
option discussed above). Moreover it is completely transparent to the
application - a user gets what appears to be a list of Persistent objects -
there’s no iterator to close or DataRows to convert to objects:</p>
</div>
@@ -290,12 +290,12 @@ List<Artist> artists =
</div>
</div>
<div class="sect3">
- <h4 id="caching"><a class="anchor" href="#caching"></a>2.8.6. Caching and
Fresh Data</h4>
+ <h4 id="caching"><a class="anchor" href="#caching"></a>2.9.6. Caching and
Fresh Data</h4>
<div class="sect4">
- <h5 id="object-caching"><a class="anchor"
href="#object-caching"></a>2.8.6.1. Object Caching</h5>
+ <h5 id="object-caching"><a class="anchor"
href="#object-caching"></a>2.9.6.1. Object Caching</h5>
</div>
<div class="sect4">
- <h5 id="query-result-caching"><a class="anchor"
href="#query-result-caching"></a>2.8.6.2. Query Result Caching</h5>
+ <h5 id="query-result-caching"><a class="anchor"
href="#query-result-caching"></a>2.9.6.2. Query Result Caching</h5>
<div class="paragraph">
<p>Cayenne supports mostly transparent caching of the query results. There
are two levels of the cache: local (i.e. results cached by the ObjectContext)
and shared (i.e. the results cached at the stack level and shared between all
contexts). Local cache is much faster then the shared one, but is limited to a
single context. It is often used with a shared read-only ObjectContext.</p>
</div>
@@ -331,7 +331,7 @@ context.performGenericQuery(refresh);</code></pre>
</div>
</div>
<div class="sect3">
- <h4 id="turning-off-synchronization-of-objectcontexts"><a class="anchor"
href="#turning-off-synchronization-of-objectcontexts"></a>2.8.7. Turning off
Synchronization of ObjectContexts</h4>
+ <h4 id="turning-off-synchronization-of-objectcontexts"><a class="anchor"
href="#turning-off-synchronization-of-objectcontexts"></a>2.9.7. Turning off
Synchronization of ObjectContexts</h4>
<div class="paragraph">
<p>By default when a single ObjectContext commits its changes, all other
contexts in the same runtime receive an event that contains all the committed
changes. This allows them to update their cached object state to match the
latest committed data. There are however many problems with this ostensibly
helpful feature. In short - it works well in environments with few contexts and
in unclustered scenarios, such as single user desktop applications, or simple
webapps with only a few users [...]
</div>
diff --git a/src/main/site/content/docs/5.0/cayenne-guide/re-filtering.html
b/src/main/site/content/docs/5.0/cayenne-guide/re-filtering.html
index 6888e879b..4890328db 100644
--- a/src/main/site/content/docs/5.0/cayenne-guide/re-filtering.html
+++ b/src/main/site/content/docs/5.0/cayenne-guide/re-filtering.html
@@ -21,7 +21,7 @@ description: "Cayenne Guide 5.0, Filtering"
cayenneVersion: "5.0"
cayenneNoToc: true
docId: cayenne-guide
-weight: 210
+weight: 220
---
<div class="sect2">
<h3 id="re-filtering"><a class="anchor" href="#re-filtering"></a>4.2.
Filtering</h3>
diff --git a/src/main/site/content/docs/5.0/cayenne-guide/re-introduction.html
b/src/main/site/content/docs/5.0/cayenne-guide/re-introduction.html
index 21a28e904..2f716f391 100644
--- a/src/main/site/content/docs/5.0/cayenne-guide/re-introduction.html
+++ b/src/main/site/content/docs/5.0/cayenne-guide/re-introduction.html
@@ -21,7 +21,7 @@ description: "Cayenne Guide 5.0, Introduction"
cayenneVersion: "5.0"
cayenneNoToc: true
docId: cayenne-guide
-weight: 200
+weight: 210
---
<div class="sect2">
<h3 id="re-introduction"><a class="anchor" href="#re-introduction"></a>4.1.
Introduction</h3>
diff --git a/src/main/site/content/docs/5.0/cayenne-guide/re-modeler.html
b/src/main/site/content/docs/5.0/cayenne-guide/re-modeler.html
index bdb62b86e..f45642f61 100644
--- a/src/main/site/content/docs/5.0/cayenne-guide/re-modeler.html
+++ b/src/main/site/content/docs/5.0/cayenne-guide/re-modeler.html
@@ -21,7 +21,7 @@ description: "Cayenne Guide 5.0, Reverse Engineering in
Cayenne Modeler"
cayenneVersion: "5.0"
cayenneNoToc: true
docId: cayenne-guide
-weight: 230
+weight: 240
---
<div class="sect2">
<h3 id="re-modeler"><a class="anchor" href="#re-modeler"></a>4.4. Reverse
Engineering in Cayenne Modeler</h3>
diff --git
a/src/main/site/content/docs/5.0/cayenne-guide/re-relationships-loading-control.html
b/src/main/site/content/docs/5.0/cayenne-guide/re-relationships-loading-control.html
index f5898a011..b7038e5d6 100644
---
a/src/main/site/content/docs/5.0/cayenne-guide/re-relationships-loading-control.html
+++
b/src/main/site/content/docs/5.0/cayenne-guide/re-relationships-loading-control.html
@@ -21,7 +21,7 @@ description: "Cayenne Guide 5.0, Other Settings"
cayenneVersion: "5.0"
cayenneNoToc: true
docId: cayenne-guide
-weight: 220
+weight: 230
---
<div class="sect2">
<h3 id="re-relationships-loading-control"><a class="anchor"
href="#re-relationships-loading-control"></a>4.3. Other Settings</h3>