cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r843922 [5/5] - in /websites/staging/cayenne/trunk/content: ./ docs/3.1/cayenne-guide/ docs/3.1/cayenne-guide/css/ docs/3.1/tutorial/ docs/3.1/tutorial/css/
Date Wed, 26 Dec 2012 19:20:35 GMT
Modified: websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/starting-cayenne.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/starting-cayenne.html (original)
+++ websites/staging/cayenne/trunk/content/docs/3.1/cayenne-guide/starting-cayenne.html Wed Dec 26 19:20:35 2012
@@ -1,101 +1,101 @@
 <html><head>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-   <title>Chapter&nbsp;5.&nbsp;Starting 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="cayenne-guide-part2.html" title="Part&nbsp;II.&nbsp;Cayenne Framework"><link rel="prev" href="including-cayenne-in-project.html" title="Chapter&nbsp;4.&nbsp;Including Cayenne in a Project"><link rel="next" href="persistent-objects-objectcontext.html" title="Chapter&nbsp;6.&nbsp;Persistent Objects and ObjectContext"></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&nbsp;5.&nbsp;Starting Cayenne</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="including-cayenne-in-project.html">Prev</a>&nbsp;</td><th width="60%" align="center">Part&nbsp;II.&nbsp;Cay
 enne Framework</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="persistent-objects-objectcontext.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter&nbsp;5.&nbsp;Starting Cayenne"><div class="titlepage"><div><div><h2 class="title"><a name="starting-cayenne"></a>Chapter&nbsp;5.&nbsp;Starting Cayenne</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="starting-cayenne.html#starting-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></div><div class="section" title="Starting and Stopping ServerRuntime"><div class="titlepage"><div><div><h2 class="title"><a name="starting-serverruntime"></a>Starting and Stopping ServerRuntime</h2></div></div></div><p>In runtime Cay
 enne is accessed via
-				<code class="code">org.apache.cayenne.configuration.server.ServerRuntime</code>. ServerRuntime is
-			created simply by calling a
-			constructor:</p><pre class="programlisting">ServerRuntime runtime = 
-	new ServerRuntime("com/example/cayenne-project.xml");</pre><p>The parameter you pass to the constructor is a location of the main project file. Location
-			is a '/'-separated path (same path separator is used on UNIX and Windows) that is
-			resolved relative to the application classpath. The project file can be placed in the
-			root package or in a subpackage (e.g. in the code above it is in "com/example"
-			subpackage).</p><p>ServerRuntime encapsulates a single Cayenne stack. Most applications will just have one
-			ServerRuntime using it to create as many ObjectContexts as needed, access the Dependency
-			Injection (DI) container and work with other Cayenne features. Internally ServerRuntime
-			is just a thin wrapper around the DI container. Detailed features of the container are
-			discussed in "Customizing Cayenne Runtime" chapter. Here we'll just show an example of
-			how an application might replace a default implementation of a built-in Cayenne service
-			(in this case - QueryCache) with a different
-			class:</p><pre class="programlisting">public class MyExtensionsModule implements Module {
-	public void configure(Binder binder) {
-		binder.bind(QueryCache.class).to(EhCacheQueryCache.class);
-	}	
-}</pre><pre class="programlisting">Module extensions = new MyExtensionsModule();
+   <title>Chapter&nbsp;5.&nbsp;Starting 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="cayenne-guide-part2.html" title="Part&nbsp;II.&nbsp;Cayenne Framework"><link rel="prev" href="including-cayenne-in-project.html" title="Chapter&nbsp;4.&nbsp;Including Cayenne in a Project"><link rel="next" href="persistent-objects-objectcontext.html" title="Chapter&nbsp;6.&nbsp;Persistent Objects and ObjectContext"></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&nbsp;5.&nbsp;Starting Cayenne</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="including-cayenne-in-project.html">Prev</a>&nbsp;</td><th width="60%" align="center">Part&nbsp;II.&nbsp;Cay
 enne Framework</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="persistent-objects-objectcontext.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter&nbsp;5.&nbsp;Starting Cayenne"><div class="titlepage"><div><div><h2 class="title"><a name="starting-cayenne"></a>Chapter&nbsp;5.&nbsp;Starting Cayenne</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="starting-cayenne.html#starting-serverruntime">Starting and Stopping ServerRuntime</a></span></dt><dt><span class="section"><a href="starting-cayenne.html#d0e919">Merging Multiple Projects</a></span></dt><dt><span class="section"><a href="starting-cayenne.html#webapps">Web Applications</a></span></dt></dl></div><div class="section" title="Starting and Stopping ServerRuntime"><div class="titlepage"><div><div><h2 class="title"><a name="starting-serverruntime"></a>Starting and Stopping ServerRuntime</h2></div></div></div><p>In runtime Cay
 enne is accessed via
+                <code class="code">org.apache.cayenne.configuration.server.ServerRuntime</code>. ServerRuntime is
+            created simply by calling a
+            constructor:</p><pre class="programlisting">ServerRuntime runtime =
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">new</span> ServerRuntime(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-string">"com/example/cayenne-project.xml"</span>);</pre><p>The parameter you pass to the constructor is a location of the main project file. Location
+            is a '/'-separated path (same path separator is used on UNIX and Windows) that is
+            resolved relative to the application classpath. The project file can be placed in the
+            root package or in a subpackage (e.g. in the code above it is in "com/example"
+            subpackage).</p><p>ServerRuntime encapsulates a single Cayenne stack. Most applications will just have one
+            ServerRuntime using it to create as many ObjectContexts as needed, access the Dependency
+            Injection (DI) container and work with other Cayenne features. Internally ServerRuntime
+            is just a thin wrapper around the DI container. Detailed features of the container are
+            discussed in "Customizing Cayenne Runtime" chapter. Here we'll just show an example of
+            how an application might replace a default implementation of a built-in Cayenne service
+            (in this case - QueryCache) with a different
+            class:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span> MyExtensionsModule <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">implements</span> Module {
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">void</span> configure(Binder binder) {
+        binder.bind(QueryCache.<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span>).to(EhCacheQueryCache.<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span>);
+    }
+}</pre><pre class="programlisting">Module extensions = <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">new</span> MyExtensionsModule();
 ServerRuntime runtime = 
-	new ServerRuntime("com/example/cayenne-project.xml", extensions);</pre><p>It is a good idea to shut down the runtime when it is no longer needed, usually before the
-			application itself is shutdown: </p><pre class="programlisting">runtime.shutdown();</pre><p>When
-			a runtime object has the same scope as the application, this may not be always
-			necessary, however in some cases it is essential, and is generally considered a good
-			practice. E.g. in a web container hot redeploy of a webapp will cause resource leaks and
-			eventual OutOfMemoryError if the application fails to shutdown CayenneRuntime.</p></div><div class="section" title="Merging Multiple Projects"><div class="titlepage"><div><div><h2 class="title"><a name="d0e914"></a>Merging Multiple Projects</h2></div></div></div><p>ServerRuntime requires at least one mapping project to run. But it can also take multiple
-			projects and merge them together in a single configuration. This way different parts of
-			a database can be mapped independenlty from each other (even by different software
-			providers), and combined in runtime when assembling an application. Doing it is as easy
-			as passing multiple project locations to ServerRuntime constructor:</p><pre class="programlisting">ServerRuntime runtime = 
-	new ServerRuntime(new String[] {
-		"com/example/cayenne-project.xml",
-		"org/foo/cayenne-library1.xml",
-		"org/foo/cayenne-library2.xml"
-	}
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">new</span> ServerRuntime(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-string">"com/example/cayenne-project.xml"</span>, extensions);</pre><p>It is a good idea to shut down the runtime when it is no longer needed, usually before the
+            application itself is shutdown: </p><pre class="programlisting">runtime.shutdown();</pre><p>When
+            a runtime object has the same scope as the application, this may not be always
+            necessary, however in some cases it is essential, and is generally considered a good
+            practice. E.g. in a web container hot redeploy of a webapp will cause resource leaks and
+            eventual OutOfMemoryError if the application fails to shutdown CayenneRuntime.</p></div><div class="section" title="Merging Multiple Projects"><div class="titlepage"><div><div><h2 class="title"><a name="d0e919"></a>Merging Multiple Projects</h2></div></div></div><p>ServerRuntime requires at least one mapping project to run. But it can also take multiple
+            projects and merge them together in a single configuration. This way different parts of
+            a database can be mapped independenlty from each other (even by different software
+            providers), and combined in runtime when assembling an application. Doing it is as easy
+            as passing multiple project locations to ServerRuntime constructor:</p><pre class="programlisting">ServerRuntime runtime =
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">new</span> ServerRuntime(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">new</span> String[] {
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-string">"com/example/cayenne-project.xml"</span>,
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-string">"org/foo/cayenne-library1.xml"</span>,
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-string">"org/foo/cayenne-library2.xml"</span>
+    }
 );</pre><p>When the projects are merged, the following rules are applied:</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>The order of projects matters during merge. If there are two conflicting
-						metadata objects belonging to two projects, an object from the <span class="italic">last</span> project takes precedence over the object
-						from the first one. This makes possible to override pieces of metadata. This
-						is also similar to how DI modules are merged in Cayenne.</p></li><li class="listitem"><p>Runtime DataDomain name is set to the name of the last project in the
-						list.</p></li><li class="listitem"><p>Runtime DataDomain properties are the same as the properties of the last
-						project in the list. I.e. <span class="italic">properties are not
-							merged</span> to avoid invalid combinations and unexpected runtime
-						behavior.</p></li><li class="listitem"><p>If there are two or more DataMaps with the same name, only one DataMap is
-						used in the merged project, the rest are discarded. Same precedence rules
-						apply - DataMap from the project with the highest index in the project list
-						overrides all other DataMaps with the same name.</p></li><li class="listitem"><p>If there are two or more DataNodes with the same name, only one DataNodes
-						is used in the merged project, the rest are discarded. DataNode coming from
-						project with the highest index in the project list is chosen per precedence
-						rule above.</p></li><li class="listitem"><p>There is a notion of "default" DataNode. After the merge if any DataMaps
-						are not explicitly linked to DataNodes, their queries will be executed via a
-						default DataNode. This makes it possible to build mapping "libraries" that
-						are only associated with a specific database in runtime. If there's only one
-						DataNode in the merged project, it will be automatically chosen as default.
-						A possible way to explicitly designate a specific node as default is to
-						override <code class="code">DataDomainProvider.createAndInitDataDomain()</code>.</p></li></ul></div></div><div class="section" title="Web Applications"><div class="titlepage"><div><div><h2 class="title"><a name="webapps"></a>Web Applications</h2></div></div></div><p>Web applications can use a variety of mechanisms to configure and start the "services"
-			they need, Cayenne being one of such services. Configuration can be done within standard
-			Servlet specification objects like Servlets, Filters, or ServletContextListeners, or can
-			use Spring, JEE CDI, etc. This is a user's architectural choice and Cayenne is agnostic
-			to it and will happily work in any environment. As described above, all that is needed
-			is to create an instance of ServerRuntime somewhere and provide the application code
-			with means to access it. And shut it down when the application ends to avoid container
-			leaks.</p><p>Still Cayenne includes a piece of web app configuration code that can assist in
-			quickly setting up simple Cayenne-enabled web applications. We are talking about
-			CayenneFilter. It is declared in
-			web.xml:</p><pre class="programlisting">&lt;web-app&gt;
-	...
-	&lt;filter&gt;           
-		&lt;filter-name&gt;cayenne-project&lt;/filter-name&gt;
-		&lt;filter-class&gt;org.apache.cayenne.configuration.web.CayenneFilter&lt;/filter-class&gt;
+                        metadata objects belonging to two projects, an object from the <span class="italic">last</span> project takes precedence over the object
+                        from the first one. This makes possible to override pieces of metadata. This
+                        is also similar to how DI modules are merged in Cayenne.</p></li><li class="listitem"><p>Runtime DataDomain name is set to the name of the last project in the
+                        list.</p></li><li class="listitem"><p>Runtime DataDomain properties are the same as the properties of the last
+                        project in the list. I.e. <span class="italic">properties are not
+                            merged</span> to avoid invalid combinations and unexpected runtime
+                        behavior.</p></li><li class="listitem"><p>If there are two or more DataMaps with the same name, only one DataMap is
+                        used in the merged project, the rest are discarded. Same precedence rules
+                        apply - DataMap from the project with the highest index in the project list
+                        overrides all other DataMaps with the same name.</p></li><li class="listitem"><p>If there are two or more DataNodes with the same name, only one DataNodes
+                        is used in the merged project, the rest are discarded. DataNode coming from
+                        project with the highest index in the project list is chosen per precedence
+                        rule above.</p></li><li class="listitem"><p>There is a notion of "default" DataNode. After the merge if any DataMaps
+                        are not explicitly linked to DataNodes, their queries will be executed via a
+                        default DataNode. This makes it possible to build mapping "libraries" that
+                        are only associated with a specific database in runtime. If there's only one
+                        DataNode in the merged project, it will be automatically chosen as default.
+                        A possible way to explicitly designate a specific node as default is to
+                        override <code class="code">DataDomainProvider.createAndInitDataDomain()</code>.</p></li></ul></div></div><div class="section" title="Web Applications"><div class="titlepage"><div><div><h2 class="title"><a name="webapps"></a>Web Applications</h2></div></div></div><p>Web applications can use a variety of mechanisms to configure and start the "services"
+            they need, Cayenne being one of such services. Configuration can be done within standard
+            Servlet specification objects like Servlets, Filters, or ServletContextListeners, or can
+            use Spring, JEE CDI, etc. This is a user's architectural choice and Cayenne is agnostic
+            to it and will happily work in any environment. As described above, all that is needed
+            is to create an instance of ServerRuntime somewhere and provide the application code
+            with means to access it. And shut it down when the application ends to avoid container
+            leaks.</p><p>Still Cayenne includes a piece of web app configuration code that can assist in
+            quickly setting up simple Cayenne-enabled web applications. We are talking about
+            CayenneFilter. It is declared in
+            web.xml:</p><pre class="programlisting">&lt;web-app&gt;
+    ...
+    &lt;filter&gt;
+        &lt;filter-name&gt;cayenne-project&lt;/filter-name&gt;
+        &lt;filter-class&gt;org.apache.cayenne.configuration.web.CayenneFilter&lt;/filter-class&gt;
     &lt;/filter&gt;
      &lt;filter-mapping&gt;
         &lt;filter-name&gt;cayenne-project&lt;/filter-name&gt;
         &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;/filter-mapping&gt;
-	...
+    ...
  &lt;/web-app&gt;       </pre><p>When started by the web container, it creates a instance of ServerRuntime and stores
-			it in the ServletContext. Note that the name of Cayenne XML project file is derived from
-			the "filter-name". In the example above CayenneFilter will look for an XML file
-			"cayenne-project.xml". This can be overridden with "configuration-location" init
-			parameter.</p><p>When the application runs, all HTTP requests matching the filter url-pattern will have
-			access to a session-scoped ObjectContext like
-			this:</p><pre class="programlisting">ObjectContext context = BaseContext.getThreadObjectContext();</pre><p>Of
-			course the ObjectContext scope, and other behavior of the Cayenne runtime can be
-			customized via dependency injection. For this another filter init parameter called
-			"extra-modules" is used. "extra-modules" is a comma or space-separated list of class
-			names, with each class implementing Module interface. These optional custom modules are
-			loaded after the the standard ones, which allows users to override all standard
-			definitions.</p><p>For those interested in the DI container contents of the runtime created by CayenneFilter,
-			it is the same ServerRuntime as would've been created by other means, but with an extra
-				<code class="code">org.apache.cayenne.configuration.web.WebModule</code> module that provides
-				<code class="code">org.apache.cayenne.configuration.web.RequestHandler</code> service. This is
-			the service to override in the custom modules if you need to provide a different
-			ObjectContext scope, etc.</p><p>
-			</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>You should not think of CayenneFilter as the only way to start and use Cayenne in a web
-					application. In fact CayenneFilter is entirely optional. Use it if you don't
-					have any special design for application service management. If you do, simply
-					integrate Cayenne into that design.</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="including-cayenne-in-project.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="cayenne-guide-part2.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="persistent-objects-objectcontext.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;4.&nbsp;Including Cayenne in a Project&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Chapter&nbsp;6.&nbsp;Persistent Objects and ObjectContext</td></tr></table></div></body></html>
\ No newline at end of file
+            it in the ServletContext. Note that the name of Cayenne XML project file is derived from
+            the "filter-name". In the example above CayenneFilter will look for an XML file
+            "cayenne-project.xml". This can be overridden with "configuration-location" init
+            parameter.</p><p>When the application runs, all HTTP requests matching the filter url-pattern will have
+            access to a session-scoped ObjectContext like
+            this:</p><pre class="programlisting">ObjectContext context = BaseContext.getThreadObjectContext();</pre><p>Of
+            course the ObjectContext scope, and other behavior of the Cayenne runtime can be
+            customized via dependency injection. For this another filter init parameter called
+            "extra-modules" is used. "extra-modules" is a comma or space-separated list of class
+            names, with each class implementing Module interface. These optional custom modules are
+            loaded after the the standard ones, which allows users to override all standard
+            definitions.</p><p>For those interested in the DI container contents of the runtime created by CayenneFilter,
+            it is the same ServerRuntime as would've been created by other means, but with an extra
+                <code class="code">org.apache.cayenne.configuration.web.WebModule</code> module that provides
+                <code class="code">org.apache.cayenne.configuration.web.RequestHandler</code> service. This is
+            the service to override in the custom modules if you need to provide a different
+            ObjectContext scope, etc.</p><p>
+            </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>You should not think of CayenneFilter as the only way to start and use Cayenne in a web
+                    application. In fact CayenneFilter is entirely optional. Use it if you don't
+                    have any special design for application service management. If you do, simply
+                    integrate Cayenne into that design.</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="including-cayenne-in-project.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="cayenne-guide-part2.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="persistent-objects-objectcontext.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;4.&nbsp;Including Cayenne in a Project&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Chapter&nbsp;6.&nbsp;Persistent Objects and ObjectContext</td></tr></table></div></body></html>
\ No newline at end of file

Modified: websites/staging/cayenne/trunk/content/docs/3.1/tutorial/ch04.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/3.1/tutorial/ch04.html (original)
+++ websites/staging/cayenne/trunk/content/docs/3.1/tutorial/ch04.html Wed Dec 26 19:20:35 2012
@@ -15,21 +15,21 @@
             This is because our project does not include Cayenne as a Maven dependency yet. Let's
             fix it now by adding "cayenne-server" artifact in the bottom of the pom.xml file. The
             resulting POM should look like
-            this:</p><pre class="programlisting">&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 	
+            this:</p><pre class="programlisting">&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
-	&lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
-	&lt;groupId&gt;org.example.cayenne&lt;/groupId&gt;
-	&lt;artifactId&gt;tutorial&lt;/artifactId&gt;
-	&lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
+    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
+    &lt;groupId&gt;org.example.cayenne&lt;/groupId&gt;
+    &lt;artifactId&gt;tutorial&lt;/artifactId&gt;
+    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
 
-	&lt;dependencies&gt;
-		&lt;dependency&gt;
-			&lt;groupId&gt;org.apache.cayenne&lt;/groupId&gt;
-			&lt;artifactId&gt;cayenne-server&lt;/artifactId&gt;
+    &lt;dependencies&gt;
+        &lt;dependency&gt;
+            &lt;groupId&gt;org.apache.cayenne&lt;/groupId&gt;
+            &lt;artifactId&gt;cayenne-server&lt;/artifactId&gt;
    &lt;!-- Here specify the version of Cayenne you are actually using --&gt;
-			&lt;version&gt;3.1M3&lt;/version&gt;
-		&lt;/dependency&gt;
-	&lt;/dependencies&gt;
+            &lt;version&gt;3.1M3&lt;/version&gt;
+        &lt;/dependency&gt;
+    &lt;/dependencies&gt;
 &lt;/project&gt;</pre><p>Your computer must be connected to the internet. Once you save the pom.xml, Eclipse
             will download the needed Cayenne jar file and add it to the project build path. As a
             result, all the errors should disappear.</p><p><span class="inlinemediaobject"><img src="images/eclipse-generatedclasses.png"></span></p><p>Now let's check the entity class pairs. Each one is made of a superclass (e.g. Artist)

Modified: websites/staging/cayenne/trunk/content/docs/3.1/tutorial/ch05.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/3.1/tutorial/ch05.html (original)
+++ websites/staging/cayenne/trunk/content/docs/3.1/tutorial/ch05.html Wed Dec 26 19:20:35 2012
@@ -3,26 +3,26 @@
    <title>Chapter&nbsp;5.&nbsp;Getting started with ObjectContext</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="Getting Started with Cayenne"><link rel="up" href="getting-started-part3.html" title="Part&nbsp;III.&nbsp;Learning Cayenne API"><link rel="prev" href="getting-started-part3.html" title="Part&nbsp;III.&nbsp;Learning Cayenne API"><link rel="next" href="ch06.html" title="Chapter&nbsp;6.&nbsp;Getting started with persistent objects"></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&nbsp;5.&nbsp;Getting started with ObjectContext</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="getting-started-part3.html">Prev</a>&nbsp;</td><th width="60%" align="center">Part&nbsp;III.&
 nbsp;Learning Cayenne API</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch06.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter&nbsp;5.&nbsp;Getting started with ObjectContext"><div class="titlepage"><div><div><h2 class="title"><a name="d0e369"></a>Chapter&nbsp;5.&nbsp;Getting started with ObjectContext</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="ch05.html#creating-main-class">Creating the Main Class</a></span></dt><dt><span class="section"><a href="ch05.html#runnning-app">Running Application</a></span></dt></dl></div><p>In this section we'll write a simple main class to run our application, and get a brief
     introduction to Cayenne ObjectContext.</p><div class="section" title="Creating the Main Class"><div class="titlepage"><div><div><h2 class="title"><a name="creating-main-class"></a>Creating the Main Class</h2></div></div></div><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>In Eclipse create a new class called "Main" in the "org.example.cayenne"
                     package.</p></li><li class="listitem"><p>Create a standard "main" method to make it a runnable
-                    class:</p><pre class="programlisting">package org.example.cayenne;
+                    class:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">package</span> org.example.cayenne;
 
-public class Main {
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span> Main {
 
-    public static void main(String[] args) {
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">static</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">void</span> main(String[] args) {
 
     }
 }</pre></li><li class="listitem"><p>The first thing you need to be able to access the database is to create a
                     ServerRuntime object (which is essentially a wrapper around Cayenne stack) and
                     use it to obtain an instance of an
-                    ObjectContext.</p><pre class="programlisting">package org.example.cayenne;
+                    ObjectContext.</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">package</span> org.example.cayenne;
 
-import org.apache.cayenne.ObjectContext;
-import org.apache.cayenne.configuration.server.ServerRuntime;
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">import</span> org.apache.cayenne.ObjectContext;
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">import</span> org.apache.cayenne.configuration.server.ServerRuntime;
 
-public class Main {
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span> Main {
 
-    public static void main(String[] args) {
-        ServerRuntime cayenneRuntime = new ServerRuntime(
-                "cayenne-project.xml");
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">static</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">void</span> main(String[] args) {
+        ServerRuntime cayenneRuntime = <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">new</span> ServerRuntime(
+                <span xmlns="http://www.w3.org/1999/xhtml" class="hl-string">"cayenne-project.xml"</span>);
         ObjectContext context = cayenneRuntime.getContext();
     }
 }</pre><p>ObjectContext is an isolated "session" in Cayenne that provides all needed API
@@ -45,9 +45,9 @@ public class Main {
                 started:</p><pre class="programlisting">INFO: Loading XML configuration resource from file:cayenne-project.xml
 INFO: loading user name and password.
 INFO: Created connection pool: jdbc:derby:memory:testdb;create=true
-	Driver class: org.apache.derby.jdbc.EmbeddedDriver
-	Min. connections in the pool: 1
-	Max. connections in the pool: 1</pre><table border="1" id="d0e403"><col width="4%"><col width="96%"><tr>
+    Driver class: org.apache.derby.jdbc.EmbeddedDriver
+    Min. connections in the pool: 1
+    Max. connections in the pool: 1</pre><table border="1" id="d0e403"><col width="4%"><col width="96%"><tr>
                     <td valign="top">
                         <div class="mediaobject"><img src="images/warning.gif"></div>
                     </td>

Modified: websites/staging/cayenne/trunk/content/docs/3.1/tutorial/ch06.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/3.1/tutorial/ch06.html (original)
+++ websites/staging/cayenne/trunk/content/docs/3.1/tutorial/ch06.html Wed Dec 26 19:20:35 2012
@@ -10,34 +10,34 @@
             to avoid overwriting the custom code when refreshing classes from the mapping
             model.</p><p>Let's for instance add a utility method to the Artist class that sets Artist date of
             birth, taking a string argument for the date. It will be preserved even if the model
-            changes later:</p><pre class="programlisting">package org.example.cayenne.persistent;
+            changes later:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">package</span> org.example.cayenne.persistent;
 
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">import</span> java.text.ParseException;
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">import</span> java.text.SimpleDateFormat;
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">import</span> java.util.Date;
 
-import org.example.cayenne.persistent.auto._Artist;
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">import</span> org.example.cayenne.persistent.auto._Artist;
 
-public class Artist extends _Artist {
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span> Artist <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">extends</span> _Artist {
 
-    static final String DEFAULT_DATE_FORMAT = "yyyyMMdd";
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">static</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">final</span> String DEFAULT_DATE_FORMAT = <span xmlns="http://www.w3.org/1999/xhtml" class="hl-string">"yyyyMMdd"</span>;
 
-    /**
+    <strong xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">/**
      * Sets date of birth using a string in format yyyyMMdd.
-     */
-    public void setDateOfBirthString(String yearMonthDay) {
-        if (yearMonthDay == null) {
+     */</strong>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">void</span> setDateOfBirthString(String yearMonthDay) {
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">if</span> (yearMonthDay == null) {
             setDateOfBirth(null);
-        } else {
+        } <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">else</span> {
 
             Date date;
-            try {
-                date = new SimpleDateFormat(DEFAULT_DATE_FORMAT)
+            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">try</span> {
+                date = <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">new</span> SimpleDateFormat(DEFAULT_DATE_FORMAT)
                         .parse(yearMonthDay);
-            } catch (ParseException e) {
-                throw new IllegalArgumentException(
-                        "A date argument must be in format '"
-                        + DEFAULT_DATE_FORMAT + "': " + yearMonthDay);
+            } <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">catch</span> (ParseException e) {
+                <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">throw</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">new</span> IllegalArgumentException(
+                        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-string">"A date argument must be in format '"</span>
+                        + DEFAULT_DATE_FORMAT + <span xmlns="http://www.w3.org/1999/xhtml" class="hl-string">"': "</span> + yearMonthDay);
             }
 
             setDateOfBirth(date);
@@ -46,18 +46,18 @@ public class Artist extends _Artist {
 }</pre></div><div class="section" title="Create New Objects"><div class="titlepage"><div><div><h2 class="title"><a name="create-new-objects"></a>Create New Objects</h2></div></div></div><p>Now we'll create a bunch of objects and save them to the database. An object is
             created and registered with ObjectContext using "newObject" method. Objects <span class="bold"><strong>must</strong></span> be registered with DataContext to be persisted and to
             allow setting relationships with other objects. Add this code to the "main" method of
-            the Main class:</p><pre class="programlisting">Artist picasso = context.newObject(Artist.class);
-picasso.setName("Pablo Picasso");
-picasso.setDateOfBirthString("18811025");</pre><p>Note that at this point "picasso" object is only stored in memory and is not saved in
+            the Main class:</p><pre class="programlisting">Artist picasso = context.newObject(Artist.<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span>);
+picasso.setName(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-string">"Pablo Picasso"</span>);
+picasso.setDateOfBirthString(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-string">"18811025"</span>);</pre><p>Note that at this point "picasso" object is only stored in memory and is not saved in
             the database. Let's continue by adding a Metropolitan Museum "Gallery" object and a few
-            Picasso "Paintings":</p><pre class="programlisting">Gallery metropolitan = context.newObject(Gallery.class);
-metropolitan.setName("Metropolitan Museum of Art"); 
+            Picasso "Paintings":</p><pre class="programlisting">Gallery metropolitan = context.newObject(Gallery.<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span>);
+metropolitan.setName(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-string">"Metropolitan Museum of Art"</span>); 
 
-Painting girl = context.newObject(Painting.class);
-girl.setName("Girl Reading at a Table");
+Painting girl = context.newObject(Painting.<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span>);
+girl.setName(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-string">"Girl Reading at a Table"</span>);
         
-Painting stein = context.newObject(Painting.class);
-stein.setName("Gertrude Stein");</pre><p>Now we can link the objects together, establishing relationships. Note that in each
+Painting stein = context.newObject(Painting.<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span>);
+stein.setName(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-string">"Gertrude Stein"</span>);</pre><p>Now we can link the objects together, establishing relationships. Note that in each
             case below relationships are automatically estabslished in both directions (e.g.
             picasso.addToPaintings(girl) has exactly the same effect as
             girl.setToArtist(picasso)).</p><pre class="programlisting">picasso.addToPaintings(girl);
@@ -69,8 +69,8 @@ stein.setGallery(metropolitan);</pre><p>
 INFO: Loading XML configuration resource from file:cayenne-project.xml
 ... 
 INFO: Opening connection: jdbc:derby:memory:testdb;create=true
-	Login: null
-	Password: *******
+    Login: null
+    Password: *******
 INFO: +++ Connecting: SUCCESS.
 INFO: Detected and installed adapter: org.apache.cayenne.dba.derby.DerbyAdapter
 INFO: --- transaction started.

Modified: websites/staging/cayenne/trunk/content/docs/3.1/tutorial/ch07.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/3.1/tutorial/ch07.html (original)
+++ websites/staging/cayenne/trunk/content/docs/3.1/tutorial/ch07.html Wed Dec 26 19:20:35 2012
@@ -3,22 +3,22 @@
    <title>Chapter&nbsp;7.&nbsp;Selecting Objects</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="Getting Started with Cayenne"><link rel="up" href="getting-started-part3.html" title="Part&nbsp;III.&nbsp;Learning Cayenne API"><link rel="prev" href="ch06.html" title="Chapter&nbsp;6.&nbsp;Getting started with persistent objects"><link rel="next" href="ch08.html" title="Chapter&nbsp;8.&nbsp;Deleting Objects"></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&nbsp;7.&nbsp;Selecting Objects</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch06.html">Prev</a>&nbsp;</td><th width="60%" align="center">Part&nbsp;III.&nbsp;Learning Cayenne API</th><td width="20%" align="right">&nbsp;<a ac
 cesskey="n" href="ch08.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter&nbsp;7.&nbsp;Selecting Objects"><div class="titlepage"><div><div><h2 class="title"><a name="d0e465"></a>Chapter&nbsp;7.&nbsp;Selecting Objects</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="ch07.html#introducing-select-query">Introducing SelectQuery</a></span></dt></dl></div><p>This chapter shows how to select objects from the database using SelectQuery. </p><div class="section" title="Introducing SelectQuery"><div class="titlepage"><div><div><h2 class="title"><a name="introducing-select-query"></a>Introducing SelectQuery</h2></div></div></div><p>It was shown before how to persist new objects. Cayenne queries are used to access
             already saved objects. The primary query type used for selecting objects is <span class="italic">SelectQuery</span>. It can be mapped in CayenneModeler or created
             via the API. We'll use the later approach in this section. We don't have too much data
-            in the database yet, but we can still demonstrate the main principles below.</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>Select all paintings (the code, and the log output it generates):</p></li></ul></div><pre class="programlisting">SelectQuery select1 = new SelectQuery(Painting.class);
+            in the database yet, but we can still demonstrate the main principles below.</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>Select all paintings (the code, and the log output it generates):</p></li></ul></div><pre class="programlisting">SelectQuery select1 = <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">new</span> SelectQuery(Painting.<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span>);
 List paintings1 = context.performQuery(select1);</pre><pre class="programlisting">INFO: SELECT t0.GALLERY_ID, t0.ARTIST_ID, t0.NAME, t0.ID FROM PAINTING t0
 INFO: === returned 2 rows. - took 18 ms.</pre><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>Select paintings that start with "gi", ignoring case:</p></li></ul></div><pre class="programlisting">Expression qualifier2 = ExpressionFactory.likeIgnoreCaseExp(
                 Painting.NAME_PROPERTY,
-                "gi%");
-SelectQuery select2 = new SelectQuery(Painting.class, qualifier2);
+                <span xmlns="http://www.w3.org/1999/xhtml" class="hl-string">"gi%"</span>);
+SelectQuery select2 = <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">new</span> SelectQuery(Painting.<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span>, qualifier2);
 List paintings2 = context.performQuery(select2);</pre><pre class="programlisting">INFO: SELECT t0.GALLERY_ID, t0.NAME, t0.ARTIST_ID, t0.ID FROM PAINTING t0 WHERE UPPER(t0.NAME) LIKE UPPER(?)
       [bind: 1-&gt;NAME:'gi%'] - prepared in 6 ms.
 INFO: === returned 1 row. - took 18 ms.</pre><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>Select all paintings done by artists who were born more than a 100 years ago
                     (demonstrating using Expression.fromString(..) instead of
-                    ExpressionFactory):</p></li></ul></div><pre class="programlisting">Calendar c = new GregorianCalendar();
-c.set(c.get(Calendar.YEAR) - 100, 0, 1, 0, 0, 0);
+                    ExpressionFactory):</p></li></ul></div><pre class="programlisting">Calendar c = <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">new</span> GregorianCalendar();
+c.set(c.get(Calendar.YEAR) - <span xmlns="http://www.w3.org/1999/xhtml" class="hl-number">100</span>, <span xmlns="http://www.w3.org/1999/xhtml" class="hl-number">0</span>, <span xmlns="http://www.w3.org/1999/xhtml" class="hl-number">1</span>, <span xmlns="http://www.w3.org/1999/xhtml" class="hl-number">0</span>, <span xmlns="http://www.w3.org/1999/xhtml" class="hl-number">0</span>, <span xmlns="http://www.w3.org/1999/xhtml" class="hl-number">0</span>);
 
-Expression qualifier3 = Expression.fromString("artist.dateOfBirth &lt; $date");
-qualifier3 = qualifier3.expWithParameters(Collections.singletonMap("date", c.getTime()));
-SelectQuery select3 = new SelectQuery(Painting.class, qualifier3);
+Expression qualifier3 = Expression.fromString(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-string">"artist.dateOfBirth &lt; $date"</span>);
+qualifier3 = qualifier3.expWithParameters(Collections.singletonMap(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-string">"date"</span>, c.getTime()));
+SelectQuery select3 = <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">new</span> SelectQuery(Painting.<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span>, qualifier3);
 List paintings3 = context.performQuery(select3);</pre><pre class="programlisting">INFO: SELECT t0.GALLERY_ID, t0.NAME, t0.ARTIST_ID, t0.ID FROM PAINTING t0 JOIN ARTIST t1 ON (t0.ARTIST_ID = t1.ID)
       WHERE t1.DATE_OF_BIRTH &lt; ? [bind: 1-&gt;DATE_OF_BIRTH:'1911-01-01 00:00:00.493'] - prepared in 7 ms.
 INFO: === returned 2 rows. - took 25 ms.</pre></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch06.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="getting-started-part3.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch08.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;6.&nbsp;Getting started with persistent objects&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Chapter&nbsp;8.&nbsp;Deleting Objects</td></tr></table></div></body></html>
\ No newline at end of file

Modified: websites/staging/cayenne/trunk/content/docs/3.1/tutorial/ch08.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/3.1/tutorial/ch08.html (original)
+++ websites/staging/cayenne/trunk/content/docs/3.1/tutorial/ch08.html Wed Dec 26 19:20:35 2012
@@ -10,9 +10,9 @@
                     exist without being displayed in a gallery.</p></li><li class="listitem"><p>For Painting et both relationships rules to "Nullify".</p></li></ul></div><p>Now save the mapping, and refresh the project in Eclispe.</p></div><div class="section" title="Deleting Objects"><div class="titlepage"><div><div><h2 class="title"><a name="deleting-objects"></a>Deleting Objects</h2></div></div></div><p>While deleting objects is possible via SQL, qualifying a delete on one or more IDs, a
             more common way in Cayenne (or ORM in general) is to get a hold of the object first, and
             then delete it via the context. Let's use utility class Cayenne to find an
-            artist:</p><pre class="programlisting">Expression qualifier = ExpressionFactory.matchExp(Artist.NAME_PROPERTY, "Pablo Picasso");
-SelectQuery select = new SelectQuery(Artist.class, qualifier);
-Artist picasso = (Artist) Cayenne.objectForQuery(context, select);</pre><p>Now let's delete the artist:</p><pre class="programlisting">if (picasso != null) {
+            artist:</p><pre class="programlisting">Expression qualifier = ExpressionFactory.matchExp(Artist.NAME_PROPERTY, <span xmlns="http://www.w3.org/1999/xhtml" class="hl-string">"Pablo Picasso"</span>);
+SelectQuery select = <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">new</span> SelectQuery(Artist.<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span>, qualifier);
+Artist picasso = (Artist) Cayenne.objectForQuery(context, select);</pre><p>Now let's delete the artist:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">if</span> (picasso != null) {
     context.deleteObject(picasso);
     context.commitChanges();
 }</pre><p>Since we set up "Cascade" delete rule for the Artist.paintings relationships, Cayenne

Modified: websites/staging/cayenne/trunk/content/docs/3.1/tutorial/ch09.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/3.1/tutorial/ch09.html (original)
+++ websites/staging/cayenne/trunk/content/docs/3.1/tutorial/ch09.html Wed Dec 26 19:20:35 2012
@@ -69,7 +69,7 @@
             } %&gt;
         &lt;hr&gt;
         &lt;p&gt;&lt;a href="detail.jsp"&gt;Create new artist...&lt;/a&gt;&lt;/p&gt;
-    &lt;/body&gt;	
+    &lt;/body&gt;
 &lt;/html&gt; </pre></li><li class="listitem"><p>Create the artist editor page src/main/webapp/detail.jsp with the following
                     content: </p><p><span class="bold"><strong>webapp/detail.jsp</strong></span>
                     </p><pre class="programlisting">&lt;%@ page language="java" contentType="text/html" %&gt;
@@ -137,7 +137,7 @@
                 &lt;/tr&gt;  
             &lt;/table&gt;
         &lt;/form&gt;
-    &lt;/body&gt;	
+    &lt;/body&gt;
 &lt;/html&gt;</pre></li></ul></div></div><div class="section" title="Running Web Application"><div class="titlepage"><div><div><h2 class="title"><a name="running-webapp"></a>Running Web Application</h2></div></div></div><p>To run the web application we'll use "maven-jetty-plugin". To activate it, let's add
             the following piece of code to the "pom.xml" file, following the "dependencies" section
             and save the POM:</p><pre class="programlisting">&lt;build&gt;
@@ -177,12 +177,12 @@ INFO::Started SelectChannelConnector@0.0
                             the following output in the Eclipse console:</p><pre class="programlisting">INFO: Loading XML configuration resource from file:/.../tutorial/target/classes/cayenne-project.xml
 INFO: loading user name and password.
 INFO: Created connection pool: jdbc:derby:memory:testdb;create=true
-	Driver class: org.apache.derby.jdbc.EmbeddedDriver
-	Min. connections in the pool: 1
-	Max. connections in the pool: 1
+    Driver class: org.apache.derby.jdbc.EmbeddedDriver
+    Min. connections in the pool: 1
+    Max. connections in the pool: 1
 INFO: Opening connection: jdbc:derby:memory:testdb;create=true
-	Login: null
-	Password: *******
+    Login: null
+    Password: *******
 INFO: +++ Connecting: SUCCESS.
 INFO: Detected and installed adapter: org.apache.cayenne.dba.derby.DerbyAdapter
 INFO: --- transaction started.

Modified: websites/staging/cayenne/trunk/content/docs/3.1/tutorial/css/cayenne-doc.css
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/3.1/tutorial/css/cayenne-doc.css (original)
+++ websites/staging/cayenne/trunk/content/docs/3.1/tutorial/css/cayenne-doc.css Wed Dec 26 19:20:35 2012
@@ -0,0 +1,134 @@
+@IMPORT url("highlight.css");
+
+html {
+    padding:       0pt;
+    margin:        0pt;
+}
+
+body, td {
+    margin-left:   10%;
+    margin-right:  10%;
+    font-family:   "Lucida Grande","Trebuchet MS",Verdana,sans-serif;
+    font-size: small;
+}
+
+div {
+    margin:        0pt;
+}
+
+p {
+    text-align:    justify;
+}
+
+hr {
+    border:        1px solid gray;
+    background:    gray;
+}
+
+h1, h2, h3, h4 {
+    font-family: "Trebuchet MS","Lucida Grande",Verdana,sans-serif;
+    font-weight: normal;
+    line-height: normal;
+    margin: 1em 0 0.5em;
+}
+
+h2 {
+    color: #660000;
+    font-size: 170%;
+    padding: 0;
+}
+
+h3 {
+    border-bottom: 1px solid #EAEAEA;
+    color: #CC4400;
+    font-size: 135%;
+    padding-bottom: 3px;
+}
+
+h4 {
+    color: #AAAA99;
+    font-size: 130%;
+}
+
+pre {
+    line-height:   1.0;
+    color:         black;
+
+    -moz-tab-size: 4;
+    -o-tab-size:   4;
+    tab-size:      4;
+}
+
+pre.programlisting {
+    font-size:     10pt;
+    padding:       7pt 3pt;
+    border:        1pt solid black;
+    background:    #F9F9F6;
+    clear:         both;
+}
+
+div.table {
+    margin:        1em;
+    padding:       0.5em;
+    text-align:    center;
+}
+
+table[frame=void] {
+    display:       table;
+    width:         100%;
+    border:        1px black solid;
+    border-collapse: collapse;
+    border-spacing: 0;
+}
+
+table[frame=void] td {
+    padding-left:  7px;
+    padding-right: 7px;
+    border:        1px black solid;
+}
+
+table[frame=void] th {
+    padding-left:  7px;
+    padding-right: 7px;
+    border:        1px black solid;
+}
+
+.sidebar {
+    float: right;
+    margin: 10px 0 10px 30px;
+    padding: 10px 20px 20px 20px;
+    width: 33%;
+    border: 1px solid black;
+    background-color: #F4F4F4;
+    font-size: 14px;
+}
+
+.code {
+    font-family: Courier New,monospace;
+}
+
+.mediaobject {
+    padding-top: 30px;
+    padding-bottom: 30px;
+}
+
+.legalnotice {
+    font-size: 12px;
+    font-style: italic;
+}
+
+p.releaseinfo {
+    font-size: 100%;
+    font-weight: bold;
+    padding-top: 10px;
+}
+
+p.pubdate {
+    font-size: 120%;
+    font-weight: bold;
+}
+
+span.productname {
+    font-size: 200%;
+    font-weight: bold;
+}
\ No newline at end of file

Added: websites/staging/cayenne/trunk/content/docs/3.1/tutorial/css/highlight.css
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/3.1/tutorial/css/highlight.css (added)
+++ websites/staging/cayenne/trunk/content/docs/3.1/tutorial/css/highlight.css Wed Dec 26 19:20:35 2012
@@ -0,0 +1,35 @@
+/*
+   code highlight CSS resemblign the Eclipse IDE default color schema
+   @author Costin Leau
+*/
+
+.hl-keyword {
+    color: #7F0055;
+    font-weight: bold;
+}
+
+.hl-comment {
+    color: #3F5F5F;
+    font-style: italic;
+}
+
+.hl-multiline-comment {
+    color: #3F5FBF;
+    font-style: italic;
+}
+
+.hl-tag {
+    color: #3F7F7F;
+}
+
+.hl-attribute {
+    color: #7F007F;
+}
+
+.hl-value {
+    color: #2A00FF;
+}
+
+.hl-string {
+    color: #2A00FF !important;
+}
\ No newline at end of file



Mime
View raw message