You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by bu...@apache.org on 2012/11/07 13:36:59 UTC
svn commit: r837553 [1/3] - in /websites/staging/cayenne/trunk/content: ./
v31/cayenne-guide/ v31/cayenne-guide/css/ v31/cayenne-guide/images/
Author: buildbot
Date: Wed Nov 7 12:36:58 2012
New Revision: 837553
Log:
Staging update by buildbot for cayenne
Added:
websites/staging/cayenne/trunk/content/v31/cayenne-guide/
websites/staging/cayenne/trunk/content/v31/cayenne-guide/cayenne-guide-part1.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/cayenne-guide-part2.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/cayenne-guide-part3.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/cayenne-mapping-structure.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/cayennemodeler-application.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/client-configuration-properties.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/css/
websites/staging/cayenne/trunk/content/v31/cayenne-guide/css/cayenne-doc.css
websites/staging/cayenne/trunk/content/v31/cayenne-guide/current-limitations.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/customizing-cayenne-runtime.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/expressions-bnf.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/expressions.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/images/
websites/staging/cayenne/trunk/content/v31/cayenne-guide/images/.gitignore
websites/staging/cayenne/trunk/content/v31/cayenne-guide/implementing-rop-client.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/implementing-rop-server.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/including-cayenne-in-project.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/index.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/introduction-to-rop.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/lifecycle-events.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/orderings.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/performance-tuning.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/persistent-objects-objectcontext.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/queries.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/rop-deployment.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/rop-setup.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/server-configuration-properties.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/setup.html
websites/staging/cayenne/trunk/content/v31/cayenne-guide/starting-cayenne.html
Modified:
websites/staging/cayenne/trunk/content/ (props changed)
Propchange: websites/staging/cayenne/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Wed Nov 7 12:36:58 2012
@@ -1 +1 @@
-1406587
+1406588
Added: websites/staging/cayenne/trunk/content/v31/cayenne-guide/cayenne-guide-part1.html
==============================================================================
--- websites/staging/cayenne/trunk/content/v31/cayenne-guide/cayenne-guide-part1.html (added)
+++ websites/staging/cayenne/trunk/content/v31/cayenne-guide/cayenne-guide-part1.html Wed Nov 7 12:36:58 2012
@@ -0,0 +1,3 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Part I. Object Relational Mapping with Cayenne</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="index.html" title="Cayenne Guide"><link rel="prev" href="index.html" title="Cayenne Guide"><link rel="next" href="setup.html" title="Chapter 1. Setup"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part I. Object Relational Mapping with Cayenne</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="setup.html">Next</a></td></tr></table><hr></div><div class="part" title="Part I. Ob
ject Relational Mapping with Cayenne"><div class="titlepage"><div><div><h1 class="title"><a name="cayenne-guide-part1"></a>Part I. Object Relational Mapping with Cayenne</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="setup.html">1. Setup</a></span></dt><dd><dl><dt><span class="section"><a href="setup.html#system-requirements">System Requirements</a></span></dt><dt><span class="section"><a href="setup.html#running-cayennemodeler">Running CayenneModeler</a></span></dt></dl></dd><dt><span class="chapter"><a href="cayenne-mapping-structure.html">2. Cayenne Mapping Structure</a></span></dt><dd><dl><dt><span class="section"><a href="cayenne-mapping-structure.html#cayenne-project">Cayenne Project</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#datamap">DataMap</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#datanode">DataNode</a></span></dt><dt><
span class="section"><a href="cayenne-mapping-structure.html#dbentity">DbEntity</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#objentity">ObjEntity</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#embeddable">Embeddable</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#procedure">Procedure</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#query">Query</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#listeners-and-callbacks">Listeners and Callbacks</a></span></dt></dl></dd><dt><span class="chapter"><a href="cayennemodeler-application.html">3. CayenneModeler Application</a></span></dt><dd><dl><dt><span class="section"><a href="cayennemodeler-application.html#working-with-mapping-projects">Working with Mapping Projects</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#reverse-engineering-d
atabase">Reverse Engineering Database</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#generating-database-schema">Generating Database Schema</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#migrations">Migrations</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#generating-java-classes">Generating Java Classes</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#modeling-inheritance">Modeling Inheritance</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#modeling-generic-persistence-classes">Modeling Generic Persistent Classes</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#modeling-pk-generation-strategy">Modeling Primary Key Generation Strategy</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" alig
n="left"><a accesskey="p" href="index.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="setup.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Cayenne Guide </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 1. Setup</td></tr></table></div></body></html>
\ No newline at end of file
Added: websites/staging/cayenne/trunk/content/v31/cayenne-guide/cayenne-guide-part2.html
==============================================================================
--- websites/staging/cayenne/trunk/content/v31/cayenne-guide/cayenne-guide-part2.html (added)
+++ websites/staging/cayenne/trunk/content/v31/cayenne-guide/cayenne-guide-part2.html Wed Nov 7 12:36:58 2012
@@ -0,0 +1,3 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Part II. Cayenne Framework</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="index.html" title="Cayenne Guide"><link rel="prev" href="cayennemodeler-application.html" title="Chapter 3. CayenneModeler Application"><link rel="next" href="including-cayenne-in-project.html" title="Chapter 4. Including Cayenne in a Project"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part II. Cayenne Framework</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="cayennemodeler-application.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="including
-cayenne-in-project.html">Next</a></td></tr></table><hr></div><div class="part" title="Part II. Cayenne Framework"><div class="titlepage"><div><div><h1 class="title"><a name="cayenne-guide-part2"></a>Part II. Cayenne Framework</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="including-cayenne-in-project.html">4. Including Cayenne in a Project</a></span></dt><dd><dl><dt><span class="section"><a href="including-cayenne-in-project.html#jar-files-and-depdendencies">Jar Files and Dependencies</a></span></dt><dt><span class="section"><a href="including-cayenne-in-project.html#maven-projects">Maven Projects</a></span></dt><dt><span class="section"><a href="including-cayenne-in-project.html#ant-projects">Ant Projects</a></span></dt></dl></dd><dt><span class="chapter"><a href="starting-cayenne.html">5. Starting Cayenne</a></span></dt><dd><dl><dt><span class="section"><a href="starting-cayenne.html#startin
g-serverruntime">Starting and Stopping ServerRuntime</a></span></dt><dt><span class="section"><a href="starting-cayenne.html#d0e914">Merging Multiple Projects</a></span></dt><dt><span class="section"><a href="starting-cayenne.html#webapps">Web Applications</a></span></dt></dl></dd><dt><span class="chapter"><a href="persistent-objects-objectcontext.html">6. Persistent Objects and ObjectContext</a></span></dt><dd><dl><dt><span class="section"><a href="persistent-objects-objectcontext.html#objectcontext">ObjectContext</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#persistent-lifecycle">Persistent Object and its Lifecycle</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#persistent-operations">ObjectContext Persistence API</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#cayenne-helper-class">Cayenne Helper Class</a></span></dt><dt><span class="section"><a href="
persistent-objects-objectcontext.html#objectcontext-nesting">ObjectContext Nesting</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#generic-persistent-objects">Generic Persistent Objects</a></span></dt><dt><span class="section"><a href="persistent-objects-objectcontext.html#transactions">Transactions</a></span></dt></dl></dd><dt><span class="chapter"><a href="expressions.html">7. Expressions</a></span></dt><dd><dl><dt><span class="section"><a href="expressions.html#expressions-overview">Expressions Overview</a></span></dt><dt><span class="section"><a href="expressions.html#path-expressions">Path Expressions</a></span></dt><dt><span class="section"><a href="expressions.html#expressions-from-strings">Creating Expressions from Strings </a></span></dt><dt><span class="section"><a href="expressions.html#expressions-with-expressionfactory">Creating Expressions with API</a></span></dt><dt><span class="section"><a href="expressions.html#express
ions-in-memory">Evaluating Expressions in Memory</a></span></dt></dl></dd><dt><span class="chapter"><a href="orderings.html">8. Orderings</a></span></dt><dt><span class="chapter"><a href="queries.html">9. Queries</a></span></dt><dd><dl><dt><span class="section"><a href="queries.html#selectquery">SelectQuery</a></span></dt><dt><span class="section"><a href="queries.html#ejbqlquery">EJBQLQuery</a></span></dt><dt><span class="section"><a href="queries.html#sqltemplate">SQLTemplateQuery</a></span></dt><dt><span class="section"><a href="queries.html#procedurequery">ProcedureQuery</a></span></dt><dt><span class="section"><a href="queries.html#namedquery">NamedQuery</a></span></dt><dt><span class="section"><a href="queries.html#custom-queries">Custom Queries</a></span></dt></dl></dd><dt><span class="chapter"><a href="lifecycle-events.html">10. Lifecycle Events</a></span></dt><dd><dl><dt><span class="section"><a href="lifecycle-events.html#types-of-lifecycle-events">Types of Lifecyc
le Events</a></span></dt><dt><span class="section"><a href="lifecycle-events.html#lifecycle-callbacks-listeners">Lifecycle Callbacks and Listeners</a></span></dt></dl></dd><dt><span class="chapter"><a href="performance-tuning.html">11. Performance Tuning</a></span></dt><dd><dl><dt><span class="section"><a href="performance-tuning.html#prefetching">Prefetching</a></span></dt><dt><span class="section"><a href="performance-tuning.html#datarows">Data Rows</a></span></dt><dt><span class="section"><a href="performance-tuning.html#iterated-queries">Iterated Queries</a></span></dt><dt><span class="section"><a href="performance-tuning.html#paginated-queries">Paginated Queries</a></span></dt><dt><span class="section"><a href="performance-tuning.html#caching-and-fresh-data">Caching and Fresh Data</a></span></dt><dt><span class="section"><a href="performance-tuning.html#turning-off-synchronization-of-objectcontexts">Turning off Synchronization of ObjectContexts</a></span></dt></dl></dd>
<dt><span class="chapter"><a href="customizing-cayenne-runtime.html">12. Customizing Cayenne Runtime</a></span></dt><dd><dl><dt><span class="section"><a href="customizing-cayenne-runtime.html#depdendency-injection-container">Dependency Injection Container</a></span></dt><dt><span class="section"><a href="customizing-cayenne-runtime.html#ways-to-customize-runtime"> Customization Strategies</a></span></dt><dt><span class="section"><a href="customizing-cayenne-runtime.html#noteworthy-runtime-components">Noteworthy Built-in Services</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="cayennemodeler-application.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="including-cayenne-in-project.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 3. CayenneM
odeler Application </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 4. Including Cayenne in a Project</td></tr></table></div></body></html>
\ No newline at end of file
Added: websites/staging/cayenne/trunk/content/v31/cayenne-guide/cayenne-guide-part3.html
==============================================================================
--- websites/staging/cayenne/trunk/content/v31/cayenne-guide/cayenne-guide-part3.html (added)
+++ websites/staging/cayenne/trunk/content/v31/cayenne-guide/cayenne-guide-part3.html Wed Nov 7 12:36:58 2012
@@ -0,0 +1,3 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Part III. Cayenne Framework - Remote Object Persistence</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="index.html" title="Cayenne Guide"><link rel="prev" href="customizing-cayenne-runtime.html" title="Chapter 12. Customizing Cayenne Runtime"><link rel="next" href="introduction-to-rop.html" title="Chapter 13. Introduction to ROP"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part III. Cayenne Framework - Remote Object Persistence </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="customizing-cayenne-runtime.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="r
ight"> <a accesskey="n" href="introduction-to-rop.html">Next</a></td></tr></table><hr></div><div class="part" title="Part III. Cayenne Framework - Remote Object Persistence"><div class="titlepage"><div><div><h1 class="title"><a name="cayenne-guide-part3"></a>Part III. Cayenne Framework - Remote Object Persistence </h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="introduction-to-rop.html">13. Introduction to ROP</a></span></dt><dd><dl><dt><span class="section"><a href="introduction-to-rop.html#what-is-rop">What is ROP</a></span></dt><dt><span class="section"><a href="introduction-to-rop.html#main-features">Main Features</a></span></dt></dl></dd><dt><span class="chapter"><a href="rop-setup.html">14. ROP Setup</a></span></dt><dd><dl><dt><span class="section"><a href="rop-setup.html#rop-system-requirements">System Requirements</a></span></dt><dt><span class="section"><a href="rop-setup.html#rop-
jar-files-dependencies">Jar Files and Dependencies</a></span></dt></dl></dd><dt><span class="chapter"><a href="implementing-rop-server.html">15. Implementing ROP Server</a></span></dt><dt><span class="chapter"><a href="implementing-rop-client.html">16. Implementing ROP Client</a></span></dt><dt><span class="chapter"><a href="rop-deployment.html">17. ROP Deployment</a></span></dt><dd><dl><dt><span class="section"><a href="rop-deployment.html#deploying-rop-server">Deploying ROP Server</a></span></dt><dt><span class="section"><a href="rop-deployment.html#deploying-rop-client">Deploying ROP Client</a></span></dt><dt><span class="section"><a href="rop-deployment.html#rop-security">Security</a></span></dt></dl></dd><dt><span class="chapter"><a href="current-limitations.html">18. Current Limitations</a></span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="customizing-cayenne-ru
ntime.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="introduction-to-rop.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 12. Customizing Cayenne Runtime </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 13. Introduction to ROP</td></tr></table></div></body></html>
\ No newline at end of file
Added: websites/staging/cayenne/trunk/content/v31/cayenne-guide/cayenne-mapping-structure.html
==============================================================================
--- websites/staging/cayenne/trunk/content/v31/cayenne-guide/cayenne-mapping-structure.html (added)
+++ websites/staging/cayenne/trunk/content/v31/cayenne-guide/cayenne-mapping-structure.html Wed Nov 7 12:36:58 2012
@@ -0,0 +1,3 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Chapter 2. Cayenne Mapping Structure</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="cayenne-guide-part1.html" title="Part I. Object Relational Mapping with Cayenne"><link rel="prev" href="setup.html" title="Chapter 1. Setup"><link rel="next" href="cayennemodeler-application.html" title="Chapter 3. CayenneModeler Application"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 2. Cayenne Mapping Structure</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="setup.html">Prev</a> </td><th width="60%" align="center">Part I. Object Relational Mapping with Cayenne</th><td width=
"20%" align="right"> <a accesskey="n" href="cayennemodeler-application.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 2. Cayenne Mapping Structure"><div class="titlepage"><div><div><h2 class="title"><a name="cayenne-mapping-structure"></a>Chapter 2. Cayenne Mapping Structure</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="cayenne-mapping-structure.html#cayenne-project">Cayenne Project</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#datamap">DataMap</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#datanode">DataNode</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#dbentity">DbEntity</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#objentity">ObjEntity</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#emb
eddable">Embeddable</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#procedure">Procedure</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#query">Query</a></span></dt><dt><span class="section"><a href="cayenne-mapping-structure.html#listeners-and-callbacks">Listeners and Callbacks</a></span></dt></dl></div><div class="section" title="Cayenne Project"><div class="titlepage"><div><div><h2 class="title"><a name="cayenne-project"></a>Cayenne Project</h2></div></div></div></div><div class="section" title="DataMap"><div class="titlepage"><div><div><h2 class="title"><a name="datamap"></a>DataMap</h2></div></div></div></div><div class="section" title="DataNode"><div class="titlepage"><div><div><h2 class="title"><a name="datanode"></a>DataNode</h2></div></div></div></div><div class="section" title="DbEntity"><div class="titlepage"><div><div><h2 class="title"><a name="dbentity"></a>DbEntity</h2></div></div></div></div><di
v class="section" title="ObjEntity"><div class="titlepage"><div><div><h2 class="title"><a name="objentity"></a>ObjEntity</h2></div></div></div><div class="section" title="Mapping ObjAttributes to Custom Classes"><div class="titlepage"><div><div><h3 class="title"><a name="mapping-objattributes-to-custom-classes"></a>Mapping ObjAttributes to Custom Classes</h3></div></div></div></div></div><div class="section" title="Embeddable"><div class="titlepage"><div><div><h2 class="title"><a name="embeddable"></a>Embeddable</h2></div></div></div></div><div class="section" title="Procedure"><div class="titlepage"><div><div><h2 class="title"><a name="procedure"></a>Procedure</h2></div></div></div></div><div class="section" title="Query"><div class="titlepage"><div><div><h2 class="title"><a name="query"></a>Query</h2></div></div></div></div><div class="section" title="Listeners and Callbacks"><div class="titlepage"><div><div><h2 class="title"><a name="listeners-and-callbacks"></a>Listeners
and Callbacks</h2></div></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="setup.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="cayenne-guide-part1.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="cayennemodeler-application.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 1. Setup </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 3. CayenneModeler Application</td></tr></table></div></body></html>
\ No newline at end of file
Added: websites/staging/cayenne/trunk/content/v31/cayenne-guide/cayennemodeler-application.html
==============================================================================
--- websites/staging/cayenne/trunk/content/v31/cayenne-guide/cayennemodeler-application.html (added)
+++ websites/staging/cayenne/trunk/content/v31/cayenne-guide/cayennemodeler-application.html Wed Nov 7 12:36:58 2012
@@ -0,0 +1,13 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Chapter 3. CayenneModeler Application</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="cayenne-guide-part1.html" title="Part I. Object Relational Mapping with Cayenne"><link rel="prev" href="cayenne-mapping-structure.html" title="Chapter 2. Cayenne Mapping Structure"><link rel="next" href="cayenne-guide-part2.html" title="Part II. Cayenne Framework"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 3. CayenneModeler Application</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="cayenne-mapping-structure.html">Prev</a> </td><th width="60%" align="center">Part I. Object Re
lational Mapping with Cayenne</th><td width="20%" align="right"> <a accesskey="n" href="cayenne-guide-part2.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 3. CayenneModeler Application"><div class="titlepage"><div><div><h2 class="title"><a name="cayennemodeler-application"></a>Chapter 3. CayenneModeler Application</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="cayennemodeler-application.html#working-with-mapping-projects">Working with Mapping Projects</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#reverse-engineering-database">Reverse Engineering Database</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#generating-database-schema">Generating Database Schema</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#migrations">Migrations</a></span></dt><dt><span class="
section"><a href="cayennemodeler-application.html#generating-java-classes">Generating Java Classes</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#modeling-inheritance">Modeling Inheritance</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#modeling-generic-persistence-classes">Modeling Generic Persistent Classes</a></span></dt><dt><span class="section"><a href="cayennemodeler-application.html#modeling-pk-generation-strategy">Modeling Primary Key Generation Strategy</a></span></dt></dl></div><div class="section" title="Working with Mapping Projects"><div class="titlepage"><div><div><h2 class="title"><a name="working-with-mapping-projects"></a>Working with Mapping Projects</h2></div></div></div></div><div class="section" title="Reverse Engineering Database"><div class="titlepage"><div><div><h2 class="title"><a name="reverse-engineering-database"></a>Reverse Engineering Database</h2></div></div></div></div><div c
lass="section" title="Generating Database Schema"><div class="titlepage"><div><div><h2 class="title"><a name="generating-database-schema"></a>Generating Database Schema</h2></div></div></div></div><div class="section" title="Migrations"><div class="titlepage"><div><div><h2 class="title"><a name="migrations"></a>Migrations</h2></div></div></div></div><div class="section" title="Generating Java Classes"><div class="titlepage"><div><div><h2 class="title"><a name="generating-java-classes"></a>Generating Java Classes</h2></div></div></div></div><div class="section" title="Modeling Inheritance"><div class="titlepage"><div><div><h2 class="title"><a name="modeling-inheritance"></a>Modeling Inheritance</h2></div></div></div></div><div class="section" title="Modeling Generic Persistent Classes"><div class="titlepage"><div><div><h2 class="title"><a name="modeling-generic-persistence-classes"></a>Modeling Generic Persistent Classes</h2></div></div></div><p>Normally each ObjEntity is map
ped to a specific Java class (such as Artist or
+ Painting) that explicitly declare all entity properties as pairs of getters and setters.
+ However Cayenne allows to map a completly generic class to any number of entities. The
+ only expectation is that a generic class implements
+ <span class="emphasis"><em>org.apache.cayenne.DataObject</em></span>. So an ideal candidate for a
+ generic class is CayenneDataObject, or some custom subclass of CayenneDataObject.</p><p>If you don't enter anything for Java Class of an ObjEntity, Cayenne assumes generic
+ mapping and uses the following implicit rules to determine a class of a generic object.
+ If DataMap "Custom Superclass" is set, runtime uses this class to instantiate new
+ objects. If not, org.apache.cayenne.CayenneDataObject is used.</p><p>Class generation procedures (either done in the Modeler or with Ant or Maven) would
+ skip entities that are mapped to CayenneDataObject explicitly or have no class
+ mapping.</p></div><div class="section" title="Modeling Primary Key Generation Strategy"><div class="titlepage"><div><div><h2 class="title"><a name="modeling-pk-generation-strategy"></a>Modeling Primary Key Generation Strategy</h2></div></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="cayenne-mapping-structure.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="cayenne-guide-part1.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="cayenne-guide-part2.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 2. Cayenne Mapping Structure </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Part II. Cayenne Framework</td></tr></table></div></body></html>
\ No newline at end of file
Added: websites/staging/cayenne/trunk/content/v31/cayenne-guide/client-configuration-properties.html
==============================================================================
--- websites/staging/cayenne/trunk/content/v31/cayenne-guide/client-configuration-properties.html (added)
+++ websites/staging/cayenne/trunk/content/v31/cayenne-guide/client-configuration-properties.html Wed Nov 7 12:36:58 2012
@@ -0,0 +1,47 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Appendix B. Service Collections</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="index.html" title="Cayenne Guide"><link rel="prev" href="server-configuration-properties.html" title="Appendix A. Configuration Properties"><link rel="next" href="expressions-bnf.html" title="Appendix C. Expressions BNF"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix B. Service Collections</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="server-configuration-properties.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="expressions-bnf.h
tml">Next</a></td></tr></table><hr></div><div class="appendix" title="Appendix B. Service Collections"><div class="titlepage"><div><div><h2 class="title"><a name="client-configuration-properties"></a>Appendix B. Service Collections</h2></div></div></div><p>Note that the collection keys below are
+ defined as constants in <code class="code">org.apache.cayenne.configuration.Constants</code>
+ interface.</p><p>
+ </p><table frame="void" id="d0e2056"><caption>Table B.1. Service Collection Keys Present in ServerRuntime and/or ClientRuntime</caption><col width="100%"><tbody><tr>
+ <td><code class="code">cayenne.properties</code> - Map<String,String> of properties used by built-in
+ Cayenne services. The keys in this map are the property names from the table
+ in Appendix A. Separate copies of this map exist on the server and ROP
+ client.</td>
+ </tr><tr>
+ <td><code class="code">cayenne.server.adapter_detectors</code> - List<DbAdapterDetector> that contains
+ objects that can discover the type of current database and install the
+ correct DbAdapter in runtime.</td>
+ </tr><tr>
+ <td><code class="code">cayenne.server.domain_filters</code> - List<DataChannelFilter> storing DataDomain
+ filters.</td>
+ </tr><tr>
+ <td><code class="code">cayenne.server.project_locations</code> - List<String> storing
+ locations of the one of more project configuration files.</td>
+ </tr><tr>
+ <td><code class="code">cayenne.server.default_types</code> - List<ExtendedType> storing
+ default adapter-agnostic ExtendedTypes. Default ExtendedTypes can be
+ overridden / extended by DB-specific DbAdapters as well as by user-provided
+ types configured in another colltecion (see
+ "cayenne.server.user_types").</td>
+ </tr><tr>
+ <td><code class="code">cayenne.server.user_types</code> - List<ExtendedType> storing a
+ user-provided ExtendedTypes. This collection will be merged into a full list
+ of ExtendedTypes and would override any ExtendedTypes defined in a default
+ list, or by a DbAdapter.</td>
+ </tr><tr>
+ <td><code class="code">cayenne.server.type_factories</code> - List<ExtendedTypeFactory>
+ storing default and user-provided ExtendedTypeFactories. ExtendedTypeFactory
+ allows to define ExtendedTypes dynamically for the whole group of Java
+ classes. E.g. Cayenne supplies a factory to map all Enums regardless of
+ their type.</td>
+ </tr><tr>
+ <td><code class="code">cayenne.server.rop_event_bridge_properties</code> - Map<String,
+ String> storing event bridge properties passed to the ROP client on
+ bootstrap. This means that the map is configured by server DI, and passed to
+ the client via the wire. The properties in this map are specific to
+ EventBridgeFactory implementation (e.g JMS or XMPP connection prameters).
+ One common property is "cayenne.server.rop_event_bridge_factory" that
+ defines the type of the factory.</td>
+ </tr></tbody></table><p>
+ </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="server-configuration-properties.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="expressions-bnf.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix A. Configuration Properties </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix C. Expressions BNF</td></tr></table></div></body></html>
\ No newline at end of file
Added: websites/staging/cayenne/trunk/content/v31/cayenne-guide/css/cayenne-doc.css
==============================================================================
(empty)
Added: websites/staging/cayenne/trunk/content/v31/cayenne-guide/current-limitations.html
==============================================================================
--- websites/staging/cayenne/trunk/content/v31/cayenne-guide/current-limitations.html (added)
+++ websites/staging/cayenne/trunk/content/v31/cayenne-guide/current-limitations.html Wed Nov 7 12:36:58 2012
@@ -0,0 +1,3 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Chapter 18. Current Limitations</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="cayenne-guide-part3.html" title="Part III. Cayenne Framework - Remote Object Persistence"><link rel="prev" href="rop-deployment.html" title="Chapter 17. ROP Deployment"><link rel="next" href="server-configuration-properties.html" title="Appendix A. Configuration Properties"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 18. Current Limitations</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="rop-deployment.html">Prev</a> </td><th width="60%" align="center">Part III. Cayenne Framework -
Remote Object Persistence </th><td width="20%" align="right"> <a accesskey="n" href="server-configuration-properties.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 18. Current Limitations"><div class="titlepage"><div><div><h2 class="title"><a name="current-limitations"></a>Chapter 18. Current Limitations</h2></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="rop-deployment.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="cayenne-guide-part3.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="server-configuration-properties.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 17. ROP Deployment </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> A
ppendix A. Configuration Properties</td></tr></table></div></body></html>
\ No newline at end of file
Added: websites/staging/cayenne/trunk/content/v31/cayenne-guide/customizing-cayenne-runtime.html
==============================================================================
--- websites/staging/cayenne/trunk/content/v31/cayenne-guide/customizing-cayenne-runtime.html (added)
+++ websites/staging/cayenne/trunk/content/v31/cayenne-guide/customizing-cayenne-runtime.html Wed Nov 7 12:36:58 2012
@@ -0,0 +1,189 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Chapter 12. Customizing Cayenne Runtime</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="cayenne-guide-part2.html" title="Part II. Cayenne Framework"><link rel="prev" href="performance-tuning.html" title="Chapter 11. Performance Tuning"><link rel="next" href="cayenne-guide-part3.html" title="Part III. Cayenne Framework - Remote Object Persistence"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 12. Customizing Cayenne Runtime</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="performance-tuning.html">Prev</a> </td><th width="60%" align="center">Part II. Cayenne Framewo
rk</th><td width="20%" align="right"> <a accesskey="n" href="cayenne-guide-part3.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 12. Customizing Cayenne Runtime"><div class="titlepage"><div><div><h2 class="title"><a name="customizing-cayenne-runtime"></a>Chapter 12. Customizing Cayenne Runtime</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="customizing-cayenne-runtime.html#depdendency-injection-container">Dependency Injection Container</a></span></dt><dt><span class="section"><a href="customizing-cayenne-runtime.html#ways-to-customize-runtime"> Customization Strategies</a></span></dt><dt><span class="section"><a href="customizing-cayenne-runtime.html#noteworthy-runtime-components">Noteworthy Built-in Services</a></span></dt></dl></div><div class="section" title="Dependency Injection Container"><div class="titlepage"><div><div><h2 class="title"><a name="depdende
ncy-injection-container"></a>Dependency Injection Container</h2></div></div></div><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 instantiation, injecting correct
+ dependencies, maintaining service instances scope, and dispatching scope events to
+ services. </p><p>The services are configured in special Java classes called "modules". Each module
+ defines binding of service interfaces to implementation instances, implementation types
+ or providers of implementation instances. There are no XML configuration files, and all
+ the bindings are type-safe. The container supports injection into instance variables and
+ constructor parameters based on the <code class="code">@Inject</code> annotation. This mechanism is
+ very close to Google Guice.</p><p>The discussion later in this chapter demonstrates a standalone DI container. But keep in
+ mind that Cayenne already has a built-in Injector, and a set of default modules. A
+ Cayenne user would normally only use the API below to write custom extension modules
+ that will be loaded in that existing container when creating ServerRuntime. See
+ "Starting and Stopping ServerRuntime" chapter for an example of passing an extension
+ module to Cayenne.</p><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 it's 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 class="section" title="DI Bindings API"><div class="titlepage"><div><div><h3 class="title"><a name="di-bindings-api"></a>DI Bindings API</h3></div></div></div><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 depedencies. Let's start with service interfaces and
+ classes:</p><pre class="programlisting">public interface Service1 {
+ public String getString();
+}</pre><pre class="programlisting">public interface Service2 {
+ public int getInt();
+}</pre><p>A service implementation using instance variable
+ injection:</p><pre class="programlisting">public class Service1Impl implements Service1 {
+ @Inject
+ private Service2 service2;
+
+ public String getString() {
+ return service2.getInt() + "_Service1Impl";
+ }
+}</pre><p>Same
+ thing, but using constructor
+ injection:</p><pre class="programlisting">public class Service1Impl implements Service1 {
+
+ private Service2 service2;
+
+ public Service1Impl(@Inject Service2 service2) {
+ this.service2 = service2;
+ }
+
+ public String getString() {
+ return service2.getInt() + "_Service1Impl";
+ }
+}
+</pre><pre class="programlisting">public class Service2Impl implements Service2 {
+ private int i;
+
+ public int getInt() {
+ return i++;
+ }
+}</pre><p>Now let's create a module implementing
+ <code class="code">org.apache.cayenne.tutorial.di.Module</code> interface that will contain
+ DI configuration. A module binds service objects to keys that are reference. Binder
+ provided by container implements fluent API to connect the key to implementation,
+ and to configure various binding options (the options, such as scope, are
+ demonstrated later in this chapter). The simplest form of a key is a Java Class
+ object representing service interface. Here is a module that binds Service1 and
+ Service2 to corresponding default implementations:</p><p>
+ </p><pre class="programlisting">public class Module1 implements Module {
+
+ public void configure(Binder binder) {
+ binder.bind(Service1.class).to(Service1Impl.class);
+ binder.bind(Service2.class).to(Service2Impl.class);
+ }
+}</pre><p>
+ </p><p>Once we have at least one module, we can create a DI container.
+ <code class="code">org.apache.cayenne.di.Injector</code> is the container class in
+ Cayenne:</p><pre class="programlisting">Injector injector = DIBootstrap.createInjector(new Module1());</pre><p>Now that we have created the container, we can obtain services from it and call
+ their
+ methods:</p><pre class="programlisting">Service1 s1 = injector.getInstance(Service1.class);
+for (int i = 0; i < 5; i++) {
+ System.out.println("S1 String: " + s1.getString());
+}</pre><p>This outputs the following lines, demonstrating that s1 was Service1Impl and
+ Service2 injected into it was
+ Service2Impl:</p><pre class="programlisting">0_Service1Impl
+1_Service1Impl
+2_Service1Impl
+3_Service1Impl
+4_Service1Impl</pre><p>There are more flavors of bindings:
+ </p><pre class="programlisting">// binding to instance - allowing user to create and configure instance
+// inside the module class
+binder.bind(Service2.class).toInstance(new Service2Impl());
+
+// binding to provider - delegating instance creation to a special
+// provider class
+binder.bind(Service1.class).toProvider(Service1Provider.class);
+
+// binding to provider instance
+binder.bind(Service1.class).toProviderInstance(new Service1Provider());
+
+// multiple bindings of the same type using Key
+// injection can reference the key name in annotation:
+// @Inject("i1")
+// private Service2 service2;
+binder.bind(Key.get(Service2.class, "i1")).to(Service2Impl.class);
+binder.bind(Key.get(Service2.class, "i2")).to(Service2Impl.class);</pre><p>Another types of confiuguration that can be bound in the container are lists and
+ maps. They will be discussed in the following chapters. </p></div><div class="section" title="Service Lifecycle"><div class="titlepage"><div><div><h3 class="title"><a name="managing-services-lifecycle"></a>Service Lifecycle</h3></div></div></div><p>An important feature of the Cayenne DI container is instance <span class="italic">scope</span>. 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 class="code">Injector.getInstance(..)</code>, as well as injected into classes that
+ declare it as a dependency. </p><p>Singleton scope dispatches a "BeforeScopeEnd" event to interested services. This
+ event occurs before the scope is shutdown, i.e. when
+ <code class="code">Injector.shutdown()</code> is called. Note that the built-in Cayenne
+ injector is shutdown behind the scenes when <code class="code">ServerRuntime.shutdown()</code>
+ is invoked. Services may register as listeners for this event by annotating a
+ no-argument method with <code class="code">@BeforeScopeEnd</code> annotation. Such method should
+ be implemented if a service needs to clean up some resources, stop threads,
+ etc.</p><p>Another useful scope is "no scope", meaning that every time a container is asked to provide
+ a service instance for a given key, a new instance will be created and
+ returned:</p><pre class="programlisting">binder.bind(Service2.class).to(Service2Impl.class).withoutScope();</pre><p>Users
+ can also create their own scopes, e.g. a web application request scope or a session
+ scope. Most often than not custom scopes can be created as instances of
+ <code class="code">org.apache.cayenne.di.spi.DefaultScope</code> with startup and shutdown
+ managed by the application (e.g. singleton scope is a DefaultScope managed by the
+ Injector) . </p></div><div class="section" title="Overriding Services"><div class="titlepage"><div><div><h3 class="title"><a name="overriding-services"></a>Overriding Services</h3></div></div></div><p>Cayenne DI allows to override services already definied 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, followed by
+ optional user extension modules. This way the application can override the standard
+ services in Cayenne.</p></div></div><div class="section" title="Customization Strategies"><div class="titlepage"><div><div><h2 class="title"><a name="ways-to-customize-runtime"></a> Customization Strategies</h2></div></div></div><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 ServerRuntime, it is
+ important to understand how to build custom extensions to a preconfigured container. As
+ shown in "Starting and Stopping ServerRuntime" chapter, custom extensions are done by
+ writing an aplication DI module (or multiple modules) that configures service overrides.
+ This section shows all the configuration possibilities in detail, including changing
+ properties of the existing services, contributing services to standard service lists and
+ maps, and overriding service implementations. All the code examples later in this
+ section are assumed to be placed in an application module "configure" method:</p><pre class="programlisting">public class MyExtensionsModule implements Module {
+ public void configure(Binder binder) {
+ // customizations go here...
+ }
+}</pre><pre class="programlisting">Module extensions = new MyExtensionsModule();
+ServerRuntime runtime =
+ new ServerRuntime("com/example/cayenne-mydomain.xml", extensions);</pre><div class="section" title="Changing Properties of Existing Services"><div class="titlepage"><div><div><h3 class="title"><a name="changing-properties-of-existing-services"></a>Changing Properties of Existing Services</h3></div></div></div><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><p>There are two ways to set service properties. The most obvious one is to pass it
+ to the JVM with -D flag on startup.
+ E.g.</p><pre class="programlisting">java -Dorg.apache.cayenne.sync_contexts=false ...</pre><p>A second one is to contribute a property to
+ <code class="code">org.apache.cayenne.configuration.DefaultRuntimeProperties.properties
+ </code>map (see the next section on how to do that). This map contains the default
+ property values and can accept application-specific values, overrding the defaults. </p><p>Note that if a property value is a name of a Java class, when this Java class is
+ instantiated by Cayenne, the container performs injection of instance variables. So
+ even the dynamically specified Java classes can use @Inject annotation to get a hold
+ of other Cayenne services.</p><p>If the same property is specified both in the command line and in the properties
+ map, the command-line value takes precedence. The map value will be ignored. This
+ way Cayenne runtime can be reconfigured during deployment.</p></div><div class="section" title="Contributing to Service Collections"><div class="titlepage"><div><div><h3 class="title"><a name="contributing-to-service-lists-maps"></a>Contributing to Service Collections</h3></div></div></div><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 class="code">org.apache.cayenne.configuration.server.DefaultDbAdapterFactory.detectors</code>
+ list:</p><pre class="programlisting">public class MyDbAdapterDetector implements DbAdapterDetector {
+ public DbAdapter createAdapter(DatabaseMetaData md) throws SQLException {
+ // check if we support this database and retun custom adapter
+ ...
+ }
+}</pre><pre class="programlisting">// since build-in list for this key is a singleton, repeated
+// calls to 'bindList' will return the same instance
+binder.bindList(DefaultDbAdapterFactory.DETECTORS_LIST)
+ .add(MyDbAdapterDetector.class);</pre><p>Maps are customized using a similar "<code class="code">bindMap</code>" method.</p><p>The names of built-in collections are listed in "Appendix B".</p></div><div class="section" title="Alternative Service Implementations"><div class="titlepage"><div><div><h3 class="title"><a name="alternative-service-implementations"></a>Alternative Service Implementations</h3></div></div></div><p>As mentioned above, custom modules are loaded by ServerRuntime 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 class="code">org.apache.cayenne.configuration.server.ServerModule</code> - the main
+ built-in module in Cayenne. </p><p>Now an example of overriding <code class="code">QueryCache</code> service. The default
+ implementation of this service is provided by <code class="code">MapQueryCacheProvider</code>.
+ But if we want to use <code class="code">EhCacheQueryCache</code> (a Cayenne wrapper for the
+ EhCache framework), we can define it like
+ this:</p><pre class="programlisting">binder.bind(QueryCache.class).to(EhCacheQueryCache.class);</pre></div></div><div class="section" title="Noteworthy Built-in Services"><div class="titlepage"><div><div><h2 class="title"><a name="noteworthy-runtime-components"></a>Noteworthy Built-in Services</h2></div></div></div><div class="section" title="JdbcEventLogger"><div class="titlepage"><div><div><h3 class="title"><a name="jdbceventlogger"></a>JdbcEventLogger</h3></div></div></div><p><code class="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 class="code">org.apache.cayenne.log.CommonsJdbcEventLogger</code> that performs logging
+ via commons-logging library. Cayenne library includes another potentially useful
+ logger - <code class="code">org.apache.cayenne.log.FormattedCommonsJdbcEventLogger</code> that
+ produces formatted multiline SQL output that can be easier to read.</p></div><div class="section" title="DataSourceFactory"><div class="titlepage"><div><div><h3 class="title"><a name="datasourcefactory"></a>DataSourceFactory</h3></div></div></div></div><div class="section" title="DataChannelFilter"><div class="titlepage"><div><div><h3 class="title"><a name="datachannelfilter"></a>DataChannelFilter</h3></div></div></div></div><div class="section" title="QueryCache"><div class="titlepage"><div><div><h3 class="title"><a name="querycache"></a>QueryCache</h3></div></div></div></div><div class="section" title="ExtendedTypes"><div class="titlepage"><div><div><h3 class="title"><a name="extendedtypes"></a>ExtendedTypes</h3></div></div></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="performance-tuning.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" hr
ef="cayenne-guide-part2.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="cayenne-guide-part3.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 11. Performance Tuning </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Part III. Cayenne Framework - Remote Object Persistence </td></tr></table></div></body></html>
\ No newline at end of file
Added: websites/staging/cayenne/trunk/content/v31/cayenne-guide/expressions-bnf.html
==============================================================================
--- websites/staging/cayenne/trunk/content/v31/cayenne-guide/expressions-bnf.html (added)
+++ websites/staging/cayenne/trunk/content/v31/cayenne-guide/expressions-bnf.html Wed Nov 7 12:36:58 2012
@@ -0,0 +1,125 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Appendix C. Expressions BNF</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="index.html" title="Cayenne Guide"><link rel="prev" href="client-configuration-properties.html" title="Appendix B. Service Collections"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix C. Expressions BNF</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="client-configuration-properties.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> </td></tr></table><hr></div><div class="appendix" title="Appendix C. Expressions BNF"><div class="titlepage"><div><div><h2 class="titl
e"><a name="expressions-bnf"></a>Appendix C. Expressions BNF</h2></div></div></div><p>
+ </p><pre class="programlisting">
+TOKENS
+<DEFAULT> SKIP : {
+" "
+| "\t"
+| "\n"
+| "\r"
+}
+
+<DEFAULT> TOKEN : {
+<NULL: "null" | "NULL">
+| <TRUE: "true" | "TRUE">
+| <FALSE: "false" | "FALSE">
+}
+
+<DEFAULT> TOKEN : {
+<PROPERTY_PATH: <IDENTIFIER> ("." <IDENTIFIER>)*>
+}
+
+<DEFAULT> TOKEN : {
+<IDENTIFIER: <LETTER> (<LETTER> | <DIGIT>)* (["+"])?>
+| <#LETTER: ["_","a"-"z","A"-"Z"]>
+| <#DIGIT: ["0"-"9"]>
+}
+
+/**
+ * Quoted Strings, whose object value is stored in the token manager's
+ * "literalValue" field. Both single and double qoutes are allowed
+ */<DEFAULT> MORE : {
+"\'" : WithinSingleQuoteLiteral
+| "\"" : WithinDoubleQuoteLiteral
+}
+
+<WithinSingleQuoteLiteral> MORE : {
+<ESC: "\\" (["n","r","t","b","f","\\","\'","`","\""] | (["0"-"3"])? ["0"-"7"] (["0"-"7"])?)> : {
+| <~["\'","\\"]> : {
+}
+
+<WithinSingleQuoteLiteral> TOKEN : {
+<SINGLE_QUOTED_STRING: "\'"> : DEFAULT
+}
+
+<WithinDoubleQuoteLiteral> MORE : {
+<STRING_ESC: <ESC>> : {
+| <~["\"","\\"]> : {
+}
+
+<WithinDoubleQuoteLiteral> TOKEN : {
+<DOUBLE_QUOTED_STRING: "\""> : DEFAULT
+}
+
+/**
+ * Integer or real Numeric literal, whose object value is stored in the token manager's
+ * "literalValue" field.
+ */<DEFAULT> TOKEN : {
+<INT_LITERAL: ("0" (["0"-"7"])* | ["1"-"9"] (["0"-"9"])* | "0" ["x","X"] (["0"-"9","a"-"f","A"-"F"])+) (["l","L","h","H"])?> : {
+| <FLOAT_LITERAL: <DEC_FLT> (<EXPONENT>)? (<FLT_SUFF>)? | <DEC_DIGITS> <EXPONENT> (<FLT_SUFF>)? | <DEC_DIGITS> <FLT_SUFF>> : {
+| <#DEC_FLT: (["0"-"9"])+ "." (["0"-"9"])* | "." (["0"-"9"])+>
+| <#DEC_DIGITS: (["0"-"9"])+>
+| <#EXPONENT: ["e","E"] (["+","-"])? (["0"-"9"])+>
+| <#FLT_SUFF: ["d","D","f","F","b","B"]>
+}
+
+NON-TERMINALS
+ expression := orCondition <EOF>
+ orCondition := andCondition ( "or" andCondition )*
+ andCondition := notCondition ( "and" notCondition )*
+ notCondition := ( "not" | "!" ) simpleCondition
+ | simpleCondition
+ simpleCondition := <TRUE>
+ | <FALSE>
+ | scalarConditionExpression
+ ( simpleNotCondition
+ | ( "=" | "==" ) scalarExpression
+ | ( "!=" | "<>" ) scalarExpression
+ | "<=" scalarExpression
+ | "<" scalarExpression | ">" scalarExpression
+ | ">=" scalarExpression
+ | "like" scalarExpression
+ | "likeIgnoreCase" scalarExpression
+ | "in" ( namedParameter | "(" scalarCommaList ")" )
+ | "between" scalarExpression "and" scalarExpression
+ )?
+ simpleNotCondition := ( "not" | "!" )
+ ( "like" scalarExpression
+ | "likeIgnoreCase" scalarExpression
+ | "in" ( namedParameter | "(" scalarCommaList ")" )
+ | "between" scalarExpression "and" scalarExpression
+ )
+ scalarCommaList := ( scalarConstExpression ( "," scalarConstExpression )* )
+ scalarConditionExpression := scalarNumericExpression
+ | <SINGLE_QUOTED_STRING>
+ | <DOUBLE_QUOTED_STRING>
+ | <NULL>
+ scalarExpression := scalarConditionExpression
+ | <TRUE>
+ | <FALSE>
+ scalarConstExpression := <SINGLE_QUOTED_STRING>
+ | <DOUBLE_QUOTED_STRING>
+ | namedParameter
+ | <INT_LITERAL>
+ | <FLOAT_LITERAL>
+ | <TRUE>
+ | <FALSE>
+ scalarNumericExpression := multiplySubtractExp
+ ( "+" multiplySubtractExp | "-" multiplySubtractExp )*
+ multiplySubtractExp := numericTerm ( "*" numericTerm | "/" numericTerm )*
+ numericTerm := ( "+" )? numericPrimary
+ | "-" numericPrimary
+ numericPrimary := "(" orCondition ")"
+ | pathExpression
+ | namedParameter
+ | <INT_LITERAL>
+ | <FLOAT_LITERAL>
+ namedParameter := "$" <PROPERTY_PATH>
+ pathExpression := ( <PROPERTY_PATH>
+ | "obj:" <PROPERTY_PATH>
+ | "db:" <PROPERTY_PATH>
+ | "enum:" <PROPERTY_PATH> )
+
+</pre><p>
+ </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="client-configuration-properties.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">Appendix B. Service Collections </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
\ No newline at end of file
Added: websites/staging/cayenne/trunk/content/v31/cayenne-guide/expressions.html
==============================================================================
--- websites/staging/cayenne/trunk/content/v31/cayenne-guide/expressions.html (added)
+++ websites/staging/cayenne/trunk/content/v31/cayenne-guide/expressions.html Wed Nov 7 12:36:58 2012
@@ -0,0 +1,168 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Chapter 7. Expressions</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="cayenne-guide-part2.html" title="Part II. Cayenne Framework"><link rel="prev" href="persistent-objects-objectcontext.html" title="Chapter 6. Persistent Objects and ObjectContext"><link rel="next" href="orderings.html" title="Chapter 8. Orderings"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 7. Expressions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="persistent-objects-objectcontext.html">Prev</a> </td><th width="60%" align="center">Part II. Cayenne Framework</th><td width="20%" align="righ
t"> <a accesskey="n" href="orderings.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 7. Expressions"><div class="titlepage"><div><div><h2 class="title"><a name="expressions"></a>Chapter 7. Expressions</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="expressions.html#expressions-overview">Expressions Overview</a></span></dt><dt><span class="section"><a href="expressions.html#path-expressions">Path Expressions</a></span></dt><dt><span class="section"><a href="expressions.html#expressions-from-strings">Creating Expressions from Strings </a></span></dt><dt><span class="section"><a href="expressions.html#expressions-with-expressionfactory">Creating Expressions with API</a></span></dt><dt><span class="section"><a href="expressions.html#expressions-in-memory">Evaluating Expressions in Memory</a></span></dt></dl></div><div class="section" title="Expressions Overview"><d
iv class="titlepage"><div><div><h2 class="title"><a name="expressions-overview"></a>Expressions Overview</h2></div></div></div><p>Cayenne provides a simple yet powerful object-based expression language. The most common
+ usese of expressions are to build qualifiers and orderings of queries that are later
+ converted to SQL by Cayenne and to evaluate in-memory against specific objects (to
+ access certain values in the object graph or to perform in-memory object filtering and
+ sorting). Cayenne provides API to build expressions in the code and a parser to create
+ expressions from strings.</p></div><div class="section" title="Path Expressions"><div class="titlepage"><div><div><h2 class="title"><a name="path-expressions"></a>Path Expressions</h2></div></div></div><p>Before discussing how to build expressions, it is important to understand one group of
+ expressions widely used in Cayenne - path expressions. There are two types of path
+ expressions - object and database, used for navigating graphs of connected objects or
+ joined DB tables respectively. Object paths are much more commonly used, as after all
+ Cayenne is supposed to provide a degree of isolation of the object model from the
+ database. However database paths are helpful in certain situations. General structure of
+ path expressions is the following:</p><pre class="programlisting"> [db:]segment[+][.segment[+]...]</pre><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>"db:" is an optional prefix indicating that the following path is a DB
+ path. Otherwise it is an object path.</p></li><li class="listitem"><p>"segment" is a name of a property (relationship or attribute in Cayenne
+ terms) in the path. Path must have at least one segment; segments are
+ separated by dot (".").</p></li><li class="listitem"><p>"+" An "OUTER JOIN" path component. Currently "+" only has effect when
+ translated to SQL as OUTER JOIN. When evaluating expressions in memory, it
+ is ignored.</p></li></ul></div><p>An object path expression represents a chain of property names rooted in a certain
+ (unspecified during expression creation) object and "navigating" to its related value.
+ E.g. a path expression "artist.name" might be a property path starting from a Painting
+ object, pointing to the related Artist object, and then to its name attribute. A few
+ more examples:</p><p>
+ </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>"name" - can be used to navigate (read) the "name" property of a Person
+ (or any other type of object that has a "name" property).</p></li><li class="listitem"><p>"artist.exhibits.closingDate" - can be used to navigate to a closing date
+ of any of the exhibits of a Painting's Artist object.</p></li><li class="listitem"><p>"artist.exhibits+.closingDate" - same as the previous example, but when
+ translated into SQL, an OUTER JOIN will be used for "exhibits".</p></li></ul></div><p>
+ </p><p>Similarly a database path expression is a dot-separated path through DB table joins
+ and columns. In Cayenne joins are mapped as DbRelationships with some symbolic names
+ (the closest concept to DbRelationship name in the DB world is a named foreign key
+ constraint. But DbRelationship names are usually chosen arbitrarily, without regard to
+ constraints naming or even constraints presence). A database path therefore might look
+ like this - "db:dbrelationshipX.dbrelationshipY.COLUMN_Z". More specific examples:</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>"db:NAME" - can be used to navigate to the value of "NAME" column of some
+ unspecified table.</p></li><li class="listitem"><p>"db:artist.artistExhibits.exhibit.CLOSING_DATE" - can be used to match a
+ closing date of any of the exhibits of a related artist record.</p></li></ul></div><p>Cayenne supports "aliases" in path Expressions. E.g. the same expression can be
+ written using explicit path or an alias:</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>"artist.exhibits.closingDate" - full path</p></li><li class="listitem"><p>"e.closingDate" - alias "e" is used for "artist.exhibits".</p></li></ul></div><p>SelectQuery using the second form of the path expression must be made
+ aware of the alias via <span class="italic">"SelectQuery.aliasPathSplits(..)"</span>, otherwise an Exception will be
+ thrown. The main use of aliases is to allow users to control how SQL joins are generated
+ if the same path is encountered more than once in any given Expression. Each alias for
+ any given path would result in a separate join. Without aliases, a single join will be
+ used for a group of matching paths.</p></div><div class="section" title="Creating Expressions from Strings"><div class="titlepage"><div><div><h2 class="title"><a name="expressions-from-strings"></a>Creating Expressions from Strings </h2></div></div></div><p>While in most cases users are likely to rely on API from the following section for
+ expression creation, we'll start by showing String expressions, as this will help
+ understanding the semantics. A Cayenne expression can be represented as a String, which
+ can be later converted to an expression object using <code class="code">Expression.fromString</code>
+ static method. Here is an
+ example:</p><pre class="programlisting">String expString = "name like 'A%' and price < 1000";
+Expression exp = Expression.fromString(expString);</pre><p>This
+ particular expression may be used to match Paintings with names that start with "A" and
+ a price less than $1000. While this example is pretty self-explanatory, there are a few
+ points worth mentioning. "name" and "price" here are object paths discussed earlier. As
+ always, paths themselves are not attached to a specific root entity and can be applied
+ to any entity that has similarly named attributes or relationships. So when we are
+ saying that this expression "may be used to match Paintings", we are implying that there
+ may be other entities, for which this expression is valid. Now the expression details... </p><p><span class="italic">Character constants</span> that are not paths or numeric values
+ should be enclosed in single or double quotes. Two of the expressions below are
+ equivalent:</p><pre class="programlisting">name = 'ABC'
+
+// double quotes are escaped inside Java Strings of course
+name = \"ABC\"</pre><p><span class="italic">Case sensitivity.</span> Expression operators are all case
+ sensitive and are usually lowercase. Complex words follow the java camel-case
+ style:</p><pre class="programlisting">// valid
+name likeIgnoreCase 'A%'
+
+// invalid - will throw a parse exception
+name LIKEIGNORECASE 'A%'</pre><p><span class="italic">Grouping with
+ parenthesis</span>:</p><pre class="programlisting">value = (price + 250.00) * 3</pre><p><span class="italic">Path prefixes.</span> Object expressions are unquoted strings,
+ optionally prefixed by "obj:" (usually they are not prefixed at all actually). Database
+ expressions are always prefixed with "db:". A special kind of prefix, not discussed yet
+ is "enum:" that prefixes an enumeration
+ constant:</p><pre class="programlisting">// object path
+name = 'Salvador Dali'
+
+// same object path - a rarely used form
+obj:name = 'Salvador Dali'
+
+// multi-segment object path
+artist.name = 'Salvador Dali'
+
+// db path
+db:NAME = 'Salvador Dali'
+
+// enumeration constant
+name = enum:org.foo.EnumClass.VALUE1</pre><p>
+ <span class="italic">Binary conditions</span> are expressions that contain a path
+ on the left, a value on the right, and some operation between them, such as equals,
+ like, etc. They can be used as qualifiers in
+ SelectQueries:</p><pre class="programlisting">name like 'A%'</pre><p><span class="italic">Named parameters.</span> Expressions can have named parameters (names that
+ start with "$"). Parameterized expressions allow to create reusable expression
+ templates. Also if an Expression contains a complex object that doesn't have a simple
+ String representation (e.g. a Date, a DataObject, an ObjectId), parameterizing such
+ expression is the only way to represent it as String. Here are some
+ examples:</p><pre class="programlisting">Expression template = Expression.fromString("name = $name");
+...
+Map p1 = Collections.singletonMap("name", "Salvador Dali");
+Expression qualifier1 = template.expWithParameters(p1);
+...
+Map p2 = Collections.singletonMap("name", "Monet");
+Expression qualifier2 = template.expWithParameters(p2);</pre><p>To
+ create a named parameterized expression with a LIKE clause, SQL wildcards must be part
+ of the values in the Map and not the expression string
+ itself:</p><pre class="programlisting">Expression template = Expression.fromString("name like $name");
+...
+Map p1 = Collections.singletonMap("name", "Salvador%");
+Expression qualifier1 = template.expWithParameters(p1);</pre><p>When
+ matching on a relationship, parameters can be Persistent objects or
+ ObjectIds:</p><pre class="programlisting">Expression template = Expression.fromString("artist = $artist");
+...
+Artist dali = // asume we fetched this one already
+Map p1 = Collections.singletonMap("artist", dali);
+Expression qualifier1 = template.expWithParameters(p1);</pre><p>Uninitialized
+ parameters will be automatically pruned from expressions, so a user can omit some
+ parameters when creating an expression from a parameterized
+ template:</p><pre class="programlisting">Expression template = Expression.fromString("name like $name and dateOfBirth > $date");
+...
+Map p1 = Collections.singletonMap("name", "Salvador%");
+Expression qualifier1 = template.expWithParameters(p1);
+
+// qualifier1 is now equals to "name like 'Salvador%'", the 'dateOfBirth' condition was
+// pruned, as no value was specified for the $date parameter</pre><p><span class="italic">Null handling.</span> Handling of Java nulls as operands
+ is no different from normal values. Instead of using special conditional operators, like
+ SQL does (IS NULL, IS NOT NULL), "=" and "!=" expressions can be used directly with null
+ values. It is up to Cayenne to translate expressions with nulls to the valid SQL.</p><p>
+ </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>A formal definition of all possible valid expressions in a form of JavaCC
+ grammar is provided in Appendix C</p></div><p>
+ </p></div><div class="section" title="Creating Expressions with API"><div class="titlepage"><div><div><h2 class="title"><a name="expressions-with-expressionfactory"></a>Creating Expressions with API</h2></div></div></div><p>Creating expressions from Strings is a powerful and dynamic approach, however a safer
+ alternative is to use Java API. It provides some degree of compile-time checking of
+ expressions validity. The API is cenetred around ExpressionFactory class, and the
+ Expression class. ExpressionFactory contains a number of rather self-explanatory factory
+ methods. We won't be going over all of them in detail, but will rather show a few
+ general examples and some gotchas. </p><p>The following code recreates the expression from the previous chapter, but now using
+ expression
+ API:</p><pre class="programlisting">// String expression: name like 'A%' and price < 1000
+Expression e1 = ExpressionFactory.likeExp(Painting.NAME_PROPERTY, "A%");
+Expression e2 = ExpressionFactory.lessExp(Painting.PRICE_PROPERTY, 1000);
+Expression finalExp = e1.andExp(e2); </pre><p>This
+ is more verbose than creating it from String, but it is also more resilient to the
+ entity properties renaming and precludes semantic errors in the expression String.</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>The last line in the example above shows how to create a new expression by
+ "chaining" 2 other epxressions. A common error when chaining expressions is to
+ assume that "andExp" and "orExp" append another expression to the current
+ expression. In fact a new expression is created. I.e. Expression API treats
+ existing expressions as immutable.</p></div><p>As discussed earlier, Cayenne supports aliases in path Expressions, allowing to
+ control how SQL joins are generated if the same path is encountered more than once in
+ the same Expression. Two ExpressionFactory methods allow to implicitly generate aliases
+ to "split" match paths into individual joins if
+ needed:</p><pre class="programlisting">Expression matchAllExp(String path, Collection values)
+Expression matchAllExp(String path, Object... values)</pre><p>"Path" argument to both of these methods can use a split character (a pipe symbol '|')
+ instead of dot to indicate that relationship following a path should be split into a
+ separate set of joins, one per collection value. There can only be one split at most in
+ any given path. Split must always precede a relationship. E.g. "|exhibits.paintings",
+ "exhibits|paintings", etc. Internally Cayenne would generate distinct aliases for each
+ of the split expressions, forcing separate joins.</p></div><div class="section" title="Evaluating Expressions in Memory"><div class="titlepage"><div><div><h2 class="title"><a name="expressions-in-memory"></a>Evaluating Expressions in Memory</h2></div></div></div><p>When used in a query, an expression is converted to SQL WHERE clause (or ORDER BY
+ clause) by Cayenne during query execution. Thus the actual evaluation against the data
+ is done by the database engine. However the same expressions can also be used for
+ accessing object properties, calculating values, in-memory filtering. </p><p>Checking whether an object satisfies an
+ expression:</p><pre class="programlisting">Expression e = ExpressionFactory.inExp(User.NAME_PROPERTY, "John", "Bob");
+User user = ...
+if(e.match(user)) {
+ ...
+}</pre><p>Reading
+ property
+ value:</p><pre class="programlisting">Expression e = Expression.fromString(User.NAME_PROPERTY);
+String name = e.evaluate(user);</pre><p>Filtering a list of
+ objects:</p><pre class="programlisting">Expression e = ExpressionFactory.inExp(User.NAME_PROPERTY, "John", "Bob");
+List<User> unfiltered = ...
+List<User> filtered = e.filterObjects(unfiltered);</pre><p>
+ </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Current limitation of in-memory expressions is that no collections are
+ permitted in the property path.</p></div><p>
+ </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="persistent-objects-objectcontext.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="cayenne-guide-part2.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="orderings.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 6. Persistent Objects and ObjectContext </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 8. Orderings</td></tr></table></div></body></html>
\ No newline at end of file
Added: websites/staging/cayenne/trunk/content/v31/cayenne-guide/images/.gitignore
==============================================================================
(empty)
Added: websites/staging/cayenne/trunk/content/v31/cayenne-guide/implementing-rop-client.html
==============================================================================
--- websites/staging/cayenne/trunk/content/v31/cayenne-guide/implementing-rop-client.html (added)
+++ websites/staging/cayenne/trunk/content/v31/cayenne-guide/implementing-rop-client.html Wed Nov 7 12:36:58 2012
@@ -0,0 +1,3 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Chapter 16. Implementing ROP Client</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="cayenne-guide-part3.html" title="Part III. Cayenne Framework - Remote Object Persistence"><link rel="prev" href="implementing-rop-server.html" title="Chapter 15. Implementing ROP Server"><link rel="next" href="rop-deployment.html" title="Chapter 17. ROP Deployment"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 16. Implementing ROP Client</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="implementing-rop-server.html">Prev</a> </td><th width="60%" align="center">Part III. Cayenne Fram
ework - Remote Object Persistence </th><td width="20%" align="right"> <a accesskey="n" href="rop-deployment.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 16. Implementing ROP Client"><div class="titlepage"><div><div><h2 class="title"><a name="implementing-rop-client"></a>Chapter 16. Implementing ROP Client</h2></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="implementing-rop-server.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="cayenne-guide-part3.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="rop-deployment.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 15. Implementing ROP Server </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nb
sp;Chapter 17. ROP Deployment</td></tr></table></div></body></html>
\ No newline at end of file
Added: websites/staging/cayenne/trunk/content/v31/cayenne-guide/implementing-rop-server.html
==============================================================================
--- websites/staging/cayenne/trunk/content/v31/cayenne-guide/implementing-rop-server.html (added)
+++ websites/staging/cayenne/trunk/content/v31/cayenne-guide/implementing-rop-server.html Wed Nov 7 12:36:58 2012
@@ -0,0 +1,3 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Chapter 15. Implementing ROP Server</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="cayenne-guide-part3.html" title="Part III. Cayenne Framework - Remote Object Persistence"><link rel="prev" href="rop-setup.html" title="Chapter 14. ROP Setup"><link rel="next" href="implementing-rop-client.html" title="Chapter 16. Implementing ROP Client"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 15. Implementing ROP Server</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="rop-setup.html">Prev</a> </td><th width="60%" align="center">Part III. Cayenne Framework - Remote Object Pe
rsistence </th><td width="20%" align="right"> <a accesskey="n" href="implementing-rop-client.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 15. Implementing ROP Server"><div class="titlepage"><div><div><h2 class="title"><a name="implementing-rop-server"></a>Chapter 15. Implementing ROP Server</h2></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="rop-setup.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="cayenne-guide-part3.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="implementing-rop-client.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 14. ROP Setup </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 16. Implement
ing ROP Client</td></tr></table></div></body></html>
\ No newline at end of file