You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by dk...@apache.org on 2011/09/28 15:49:13 UTC

svn commit: r1176882 - in /cayenne/main/trunk/docs/docbook/getting-started/src: docbkx/ images/

Author: dkazimirchyk
Date: Wed Sep 28 13:49:13 2011
New Revision: 1176882

URL: http://svn.apache.org/viewvc?rev=1176882&view=rev
Log:
Docbook: Getting Started with Cayenne correction to correspond to 3.1 changes

Added:
    cayenne/main/trunk/docs/docbook/getting-started/src/images/modeler-deleterule.png   (with props)
Modified:
    cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/delete.xml
    cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/java-classes.xml
    cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/object-context.xml
    cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/object-relational-mapping.xml
    cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/persistent-objects.xml
    cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/select-query.xml
    cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/starting-project.xml
    cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/webapp.xml

Modified: cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/delete.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/delete.xml?rev=1176882&r1=1176881&r2=1176882&view=diff
==============================================================================
--- cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/delete.xml (original)
+++ cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/delete.xml Wed Sep 28 13:49:13 2011
@@ -3,7 +3,7 @@
 <chapter xmlns="http://docbook.org/ns/docbook"
     xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
     <title>Deleting objects...</title>
-    <para>This section explains how to model relationship delete rules and how to delete individual
+    <para>This chapter explains how to model relationship delete rules and how to delete individual
         objects as well as sets of objects. Also demonstrated the use of Cayenne class to run a
         query.</para>
     <section xml:id="setup-delete-rules">
@@ -13,7 +13,12 @@
             objects related to deleted objects.</para>
         <para>In the Modeler go to "Artist" ObjEntity, "Relationships" tab and select "Cascade" for
             the "paintings" relationship delete rule:</para>
-        <para> Unable to render embedded object: File (modeler-deleterule.png) not found. </para>
+        <para><inlinemediaobject>
+                <imageobject>
+                    <imagedata fileref="images/modeler-deleterule.png" scalefit="1" width="100%"/>
+                </imageobject>
+            </inlinemediaobject>
+        </para>
         <para>Repeat this step for other relationships:</para>
         <itemizedlist>
             <listitem>
@@ -43,20 +48,18 @@ Artist picasso = (Artist) Cayenne.object
         <para>Since we set up "Cascade" delete rule for the Artist.paintings relationships, Cayenne
             will automatically delete all paintings of this artist. So when your run the app you'll
             see this output:</para>
-        <programlisting>INFO: SELECT t0.DATE_OF_BIRTH, t0.ID, t0.NAME FROM ARTIST t0 WHERE t0.NAME = ? 
- [bind: 1-&gt;NAME:'Pablo Picasso']
-INFO: === returned 1 row. - took 5 ms.
+        <programlisting>INFO: SELECT t0.DATE_OF_BIRTH, t0.NAME, t0.ID FROM ARTIST t0 
+      WHERE t0.NAME = ? [bind: 1->NAME:'Pablo Picasso'] - prepared in 6 ms.
+INFO: === returned 1 row. - took 18 ms.
 INFO: +++ transaction committed.
-INFO: --- will run 2 queries.
 INFO: --- transaction started.
 INFO: DELETE FROM PAINTING WHERE ID = ?
-INFO: [batch bind: 1-&gt;ID:2]
-INFO: [batch bind: 1-&gt;ID:1]
+INFO: [batch bind: 1->ID:200]
+INFO: [batch bind: 1->ID:201]
 INFO: === updated 2 rows.
 INFO: DELETE FROM ARTIST WHERE ID = ?
-INFO: [batch bind: 1-&gt;ID:1]
+INFO: [batch bind: 1->ID:200]
 INFO: === updated 1 row.
-INFO: +++ transaction committed.
-</programlisting>
+INFO: +++ transaction committed.</programlisting>
     </section>
 </chapter>

Modified: cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/java-classes.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/java-classes.xml?rev=1176882&r1=1176881&r2=1176882&view=diff
==============================================================================
--- cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/java-classes.xml (original)
+++ cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/java-classes.xml Wed Sep 28 13:49:13 2011
@@ -21,12 +21,12 @@
             </listitem>
             <listitem>
                 <para>For the "Output Directory" select "src/main/java" folder under your Eclipse
-                    project folder (this is a "peer" location to the cayenne.xml location we
+                    project folder (this is a "peer" location to the cayenne-*.xml location we
                     selected before).</para>
             </listitem>
             <listitem>
-                <para>Click on "Entities" tab and check the "Check All Entities" checkbox (unless it
-                    is already checked and reads "Uncheck all Entities").</para>
+                <para>Click on "Entities" tab and check the "Check All Classes" checkbox (unless it
+                    is already checked and reads "Uncheck all Classes").</para>
             </listitem>
             <listitem>
                 <para>Click "Generate"</para>
@@ -50,7 +50,7 @@
 			&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.1M1&lt;/version&gt;
+			&lt;version&gt;3.1M3&lt;/version&gt;
 		&lt;/dependency&gt;
 	&lt;/dependencies&gt;
 &lt;/project&gt;</programlisting></para>
@@ -64,23 +64,21 @@
             in "org.example.cayenne.persistent" package - those will never be overwritten by the
             class generator.</para>
         <para>
-            <informaltable>
+            <informaltable border="1">
                 <col width="4%"/>
                 <col width="96%"/>
                 <tr>
                     <td rowspan="1" colspan="1" valign="top">
                         <mediaobject>
                             <imageobject>
-                                <imagedata
-                                    fileref="images/warning.gif"
-                                    depth="16" width="16"/>
+                                <imagedata fileref="images/warning.gif" depth="16" width="16"/>
                             </imageobject>
                         </mediaobject>
                     </td>
                     <td rowspan="1" colspan="1"><emphasis role="bold">Class Generation
-                            Hint</emphasis>Often you'd start by generating classes from the Modeler,
-                        but at the later stages of the project the generation is usually automated
-                        either via Ant cgen task or Maven cgen mojo. All three methods are
+                            Hint</emphasis> Often you'd start by generating classes from the
+                        Modeler, but at the later stages of the project the generation is usually
+                        automated either via Ant cgen task or Maven cgen mojo. All three methods are
                         interchangeable, however Ant and Maven methods would ensure that you never
                         forget to regenerate classes on mapping changes, as they are integrated into
                         the build cycle.</td>

Modified: cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/object-context.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/object-context.xml?rev=1176882&r1=1176881&r2=1176882&view=diff
==============================================================================
--- cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/object-context.xml (original)
+++ cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/object-context.xml Wed Sep 28 13:49:13 2011
@@ -18,9 +18,9 @@
 
 public class Main {
 
-	public static void main(String[] args) {
+    public static void main(String[] args) {
 
-	}
+    }
 }</programlisting></para>
             </listitem>
             <listitem>
@@ -30,15 +30,15 @@ public class Main {
                     ObjectContext.<programlisting>package org.example.cayenne;
 
 import org.apache.cayenne.ObjectContext;
-import org.apache.cayenne.access.DataContext;
+import org.apache.cayenne.configuration.server.ServerRuntime;
 
 public class Main {
 
-	public static void main(String[] args) {
-                ServerRuntime cayenneRuntime = new ServerRuntime(
-				"cayenne-UntitledDomain.xml");
-		ObjectContext context = cayenneRuntime.getContext();
-	}
+    public static void main(String[] args) {
+        ServerRuntime cayenneRuntime = new ServerRuntime(
+                "cayenne-project.xml");
+        ObjectContext context = cayenneRuntime.getContext();
+    }
 }</programlisting></para>
                 <para>ObjectContext is an isolated "session" in Cayenne that provides all needed API
                     to work with data. ObjectContext has methods to execute queries and manage
@@ -58,42 +58,30 @@ public class Main {
             jars:<programlisting>&lt;dependency&gt;
    &lt;groupId&gt;org.apache.derby&lt;/groupId&gt;
    &lt;artifactId&gt;derby&lt;/artifactId&gt;
-   &lt;version&gt;10.5.3.0_1&lt;/version&gt;
+   &lt;version&gt;10.8.1.2&lt;/version&gt;
 &lt;/dependency&gt;</programlisting>Now
             we are ready to run. Right click the "Main" class in Eclipse and select "Run As &gt;
             Java Application". In the console you'll see output similar to this, indicating that
-            Cayenne stack has been started:<programlisting>INFO: started configuration loading.
-INFO: loaded domain: UntitledDomain
-INFO: loaded &lt;map name='UntitledDomainMap' location='UntitledDomainMap.map.xml'&gt;.
-INFO: loading &lt;node name='UntitledDomainNode' datasource='UntitledDomainNode.driver.xml' 
-factory='org.apache.cayenne.conf.DriverDataSourceFactory' 
-schema-update-strategy='org.apache.cayenne.access.dbsync.CreateIfNoSchemaStrategy'&gt;.
-INFO: using factory: org.apache.cayenne.conf.DriverDataSourceFactory
-INFO: loading driver information from 'UntitledDomainNode.driver.xml'.
-INFO: loading driver org.apache.derby.jdbc.EmbeddedDriver
+            Cayenne stack has been
+                started:<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 
+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
-INFO: loaded datasource.
-INFO: no adapter set, using automatic adapter.
-INFO: loaded map-ref: UntitledDomainMap.
-INFO: finished configuration loading in 396 ms.</programlisting><informaltable>
+	Max. connections in the pool: 1</programlisting><informaltable
+                border="1">
                 <col width="4%"/>
                 <col width="96%"/>
                 <tr>
                     <td rowspan="1" colspan="1" valign="top">
                         <mediaobject>
                             <imageobject>
-                                <imagedata
-                                    fileref="images/warning.gif"
-                                    depth="16" width="16"/>
+                                <imagedata fileref="images/warning.gif" depth="16" width="16"/>
                             </imageobject>
                         </mediaobject>
                     </td>
                     <td rowspan="1" colspan="1"><emphasis role="bold">How to Configure Cayenne
-                            Logging</emphasis>You can tweak more or less detailed output by
+                            Logging</emphasis> You can tweak more or less detailed output by
                         following the instructions in the logging chapter.</td>
                 </tr>
             </informaltable>Nothing much happened here, but we've been able to create a working

Modified: cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/object-relational-mapping.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/object-relational-mapping.xml?rev=1176882&r1=1176881&r2=1176882&view=diff
==============================================================================
--- cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/object-relational-mapping.xml (original)
+++ cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/object-relational-mapping.xml Wed Sep 28 13:49:13 2011
@@ -13,16 +13,14 @@
     </inlinemediaobject>
     </para>
     <para>
-        <informaltable>
+        <informaltable border="1">
             <col width="4%"/>
             <col width="96%"/>
             <tr>
                 <td rowspan="1" colspan="1" valign="top">
                     <mediaobject>
                         <imageobject>
-                            <imagedata
-                                fileref="images/warning.gif"
-                                depth="16" width="16"/>
+                            <imagedata fileref="images/warning.gif" depth="16" width="16"/>
                         </imageobject>
                     </mediaobject>
                 </td>
@@ -55,16 +53,14 @@
         <para>Similarly add NAME VARCHAR(200) and DATE_OF_BIRTH DATE attributes. After that repeat
             this procedure for PAINTING and GALLERY entities to match DB schema shown above.</para>
         <para>
-            <informaltable>
+            <informaltable border="1">
                 <col width="4%"/>
                 <col width="96%"/>
                 <tr>
                     <td rowspan="1" colspan="1" valign="top">
                         <mediaobject>
                             <imageobject>
-                                <imagedata
-                                    fileref="images/warning.gif"
-                                    depth="16" width="16"/>
+                                <imagedata fileref="images/warning.gif" depth="16" width="16"/>
                             </imageobject>
                         </mediaobject>
                     </td>

Modified: cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/persistent-objects.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/persistent-objects.xml?rev=1176882&r1=1176881&r2=1176882&view=diff
==============================================================================
--- cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/persistent-objects.xml (original)
+++ cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/persistent-objects.xml Wed Sep 28 13:49:13 2011
@@ -28,29 +28,29 @@ import org.example.cayenne.persistent.au
 
 public class Artist extends _Artist {
 
-	static final String DEFAULT_DATE_FORMAT = "yyyyMMdd";
+    static final String DEFAULT_DATE_FORMAT = "yyyyMMdd";
 
-	/**
-	 * Sets date of birth using a string in format yyyyMMdd.
-	 */
-	public void setDateOfBirthString(String yearMonthDay) {
-		if (yearMonthDay == null) {
-			setDateOfBirth(null);
-		} else {
-
-			Date date;
-			try {
-				date = new SimpleDateFormat(DEFAULT_DATE_FORMAT)
-						.parse(yearMonthDay);
-			} catch (ParseException e) {
-				throw new IllegalArgumentException(
-				  "A date argument must be in format '"
-				+ DEFAULT_DATE_FORMAT + "': " + yearMonthDay);
-			}
-
-			setDateOfBirth(date);
-		}
-	}
+    /**
+     * Sets date of birth using a string in format yyyyMMdd.
+     */
+    public void setDateOfBirthString(String yearMonthDay) {
+        if (yearMonthDay == null) {
+            setDateOfBirth(null);
+        } else {
+
+            Date date;
+            try {
+                date = new SimpleDateFormat(DEFAULT_DATE_FORMAT)
+                        .parse(yearMonthDay);
+            } catch (ParseException e) {
+                throw new IllegalArgumentException(
+                        "A date argument must be in format '"
+                        + DEFAULT_DATE_FORMAT + "': " + yearMonthDay);
+            }
+
+            setDateOfBirth(date);
+        }
+    }
 }</programlisting>
     </section>
     <section xml:id="create-new-objects">
@@ -87,27 +87,24 @@ stein.setGallery(metropolitan);</program
         <programlisting>context.commitChanges();</programlisting>
         <para>Now you can run the application again as described in the previous chapter. The new
             output will show a few actual DB operations:</para>
-        <programlisting>Dec 20, 2009 11:11:37 PM org.apache.cayenne.conf.RuntimeLoadDelegate startedLoading
-INFO: started configuration loading.
+        <programlisting>Sep 28, 2011 1:08:23 PM org.apache.cayenne.configuration.XMLDataChannelDescriptorLoader load
+INFO: Loading XML configuration resource from file:cayenne-project.xml
 ... 
-INFO: Opening connection: jdbc:derby:memory:testdb;create=true 
+INFO: Opening connection: jdbc:derby:memory:testdb;create=true
 	Login: null
 	Password: *******
 INFO: +++ Connecting: SUCCESS.
-INFO: --- transaction started.
 INFO: Detected and installed adapter: org.apache.cayenne.dba.derby.DerbyAdapter
-INFO: --- will run 3 queries.
+INFO: --- transaction started.
 INFO: No schema detected, will create mapped tables
-INFO: CREATE TABLE ARTIST (DATE_OF_BIRTH DATE, ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY, 
- NAME VARCHAR (200), PRIMARY KEY (ID))
-INFO: CREATE TABLE GALLERY (ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY, NAME VARCHAR (200), 
- PRIMARY KEY (ID))
-INFO: CREATE TABLE PAINTING (ARTIST_ID INTEGER, GALLERY_ID INTEGER, ID INTEGER NOT NULL 
- GENERATED BY DEFAULT AS IDENTITY, NAME VARCHAR (200), PRIMARY KEY (ID))
+INFO: CREATE TABLE GALLERY (ID INTEGER NOT NULL, NAME VARCHAR (200), PRIMARY KEY (ID))
+INFO: CREATE TABLE ARTIST (DATE_OF_BIRTH DATE, ID INTEGER NOT NULL, NAME VARCHAR (200), PRIMARY KEY (ID))
+INFO: CREATE TABLE PAINTING (ARTIST_ID INTEGER, GALLERY_ID INTEGER, ID INTEGER NOT NULL, 
+      NAME VARCHAR (200), PRIMARY KEY (ID))
 INFO: ALTER TABLE PAINTING ADD FOREIGN KEY (ARTIST_ID) REFERENCES ARTIST (ID)
 INFO: ALTER TABLE PAINTING ADD FOREIGN KEY (GALLERY_ID) REFERENCES GALLERY (ID)
-INFO: CREATE TABLE AUTO_PK_SUPPORT (  TABLE_NAME CHAR(100) NOT NULL,  NEXT_ID BIGINT NOT NULL,  
-PRIMARY KEY(TABLE_NAME))
+INFO: CREATE TABLE AUTO_PK_SUPPORT (  
+      TABLE_NAME CHAR(100) NOT NULL,  NEXT_ID BIGINT NOT NULL,  PRIMARY KEY(TABLE_NAME))
 INFO: DELETE FROM AUTO_PK_SUPPORT WHERE TABLE_NAME IN ('ARTIST', 'GALLERY', 'PAINTING')
 INFO: INSERT INTO AUTO_PK_SUPPORT (TABLE_NAME, NEXT_ID) VALUES ('ARTIST', 200)
 INFO: INSERT INTO AUTO_PK_SUPPORT (TABLE_NAME, NEXT_ID) VALUES ('GALLERY', 200)
@@ -115,19 +112,15 @@ INFO: INSERT INTO AUTO_PK_SUPPORT (TABLE
 INFO: SELECT NEXT_ID FROM AUTO_PK_SUPPORT WHERE TABLE_NAME = ? FOR UPDATE [bind: 1:'ARTIST']
 INFO: SELECT NEXT_ID FROM AUTO_PK_SUPPORT WHERE TABLE_NAME = ? FOR UPDATE [bind: 1:'GALLERY']
 INFO: SELECT NEXT_ID FROM AUTO_PK_SUPPORT WHERE TABLE_NAME = ? FOR UPDATE [bind: 1:'PAINTING']
-INFO: --- will run 3 queries.
-INFO: INSERT INTO ARTIST (DATE_OF_BIRTH, ID, NAME) VALUES (?, ?, ?)
-INFO: [batch bind: 1-&gt;DATE_OF_BIRTH:'1881-10-25 00:00:00.0', 2-&gt;ID:200, 
-3-&gt;NAME:'Pablo Picasso']
-INFO: === updated 1 row.
 INFO: INSERT INTO GALLERY (ID, NAME) VALUES (?, ?)
-INFO: [batch bind: 1-&gt;ID:200, 2-&gt;NAME:'Metropolitan Museum of Art']
+INFO: [batch bind: 1->ID:200, 2->NAME:'Metropolitan Museum of Art']
+INFO: === updated 1 row.
+INFO: INSERT INTO ARTIST (DATE_OF_BIRTH, ID, NAME) VALUES (?, ?, ?)
+INFO: [batch bind: 1->DATE_OF_BIRTH:'1881-10-25 00:00:00.0', 2->ID:200, 3->NAME:'Pablo Picasso']
 INFO: === updated 1 row.
 INFO: INSERT INTO PAINTING (ARTIST_ID, GALLERY_ID, ID, NAME) VALUES (?, ?, ?, ?)
-INFO: [batch bind: 1-&gt;ARTIST_ID:200, 2-&gt;GALLERY_ID:200, 3-&gt;ID:200, 
-4-&gt;NAME:'Girl Reading at a Table']
-INFO: [batch bind: 1-&gt;ARTIST_ID:200, 2-&gt;GALLERY_ID:200, 3-&gt;ID:201, 
-4-&gt;NAME:'Gertrude Stein']
+INFO: [batch bind: 1->ARTIST_ID:200, 2->GALLERY_ID:200, 3->ID:200, 4->NAME:'Gertrude Stein']
+INFO: [batch bind: 1->ARTIST_ID:200, 2->GALLERY_ID:200, 3->ID:201, 4->NAME:'Girl Reading at a Table']
 INFO: === updated 2 rows.
 INFO: +++ transaction committed.
 </programlisting>

Modified: cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/select-query.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/select-query.xml?rev=1176882&r1=1176881&r2=1176882&view=diff
==============================================================================
--- cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/select-query.xml (original)
+++ cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/select-query.xml Wed Sep 28 13:49:13 2011
@@ -3,7 +3,7 @@
 <chapter xmlns="http://docbook.org/ns/docbook"
     xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
     <title>Selecting objects...</title>
-    <para>This section shows how to select objects from the database using SelectQuery. </para>
+    <para>This chapter shows how to select objects from the database using SelectQuery. </para>
     <section xml:id="introducing-select-query">
         <title>Introducing SelectQuery</title>
         <para>It was shown before how to persist new objects. Cayenne queries are used to access
@@ -30,9 +30,9 @@ INFO: === returned 2 rows. - took 18 ms.
                 "gi%");
 SelectQuery select2 = new SelectQuery(Painting.class, qualifier2);
 List paintings2 = context.performQuery(select2);</programlisting>
-        <programlisting>INFO: SELECT t0.GALLERY_ID, t0.ARTIST_ID, t0.NAME, t0.ID FROM PAINTING t0 
-WHERE UPPER(t0.NAME) LIKE UPPER(?) [bind: 1-&gt;NAME:'gi%']
-INFO: === returned 1 row. - took 12 ms.</programlisting>
+        <programlisting>INFO: SELECT t0.GALLERY_ID, t0.NAME, t0.ARTIST_ID, t0.ID FROM PAINTING t0 WHERE UPPER(t0.NAME) LIKE UPPER(?)
+      [bind: 1->NAME:'gi%'] - prepared in 6 ms.
+INFO: === returned 1 row. - took 18 ms.</programlisting>
         <itemizedlist>
             <listitem>
                 <para>Select all paintings done by artists who were born more than a 100 years ago
@@ -47,9 +47,8 @@ Expression qualifier3 = Expression.fromS
 qualifier3 = qualifier3.expWithParameters(Collections.singletonMap("date", c.getTime()));
 SelectQuery select3 = new SelectQuery(Painting.class, qualifier3);
 List paintings3 = context.performQuery(select3);</programlisting>
-        <programlisting>SELECT t0.GALLERY_ID, t0.ARTIST_ID, t0.NAME, 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:'1909-01-01 00:00:00.378']
-INFO: === returned 2 rows. - took 19 ms.</programlisting>
+        <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->DATE_OF_BIRTH:'1911-01-01 00:00:00.493'] - prepared in 7 ms.
+INFO: === returned 2 rows. - took 25 ms.</programlisting>
     </section>
 </chapter>

Modified: cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/starting-project.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/starting-project.xml?rev=1176882&r1=1176881&r2=1176882&view=diff
==============================================================================
--- cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/starting-project.xml (original)
+++ cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/starting-project.xml Wed Sep 28 13:49:13 2011
@@ -41,16 +41,14 @@
             get access to the CayenneModeler tool. 
         </para>
         <para>
-            <informaltable>
+            <informaltable border="1">
                 <col width="4%"/>
                 <col width="96%"/>
                 <tr>
                     <td rowspan="1" colspan="1" valign="top">
                         <mediaobject>
                             <imageobject>
-                                <imagedata
-                                    fileref="images/warning.gif"
-                                    depth="16" width="16"/>
+                                <imagedata fileref="images/warning.gif" depth="16" width="16"/>
                             </imageobject>
                         </mediaobject>
                     </td>
@@ -83,9 +81,8 @@
         <para>The next project object you will create is a <emphasis role="bold"
             >DataNode</emphasis>. DataNode is a descriptor of a single database your application
             will connect to. Cayenne mapping project can use more than one database, but for now,
-            we'll only use one. With "UntitledDomain" selected on the left, click on "Create
-            DataNode" button on the toolbar (or select "Project &gt; Create DataNode" from the
-            menu.</para>
+            we'll only use one. With "project" selected on the left, click on "Create DataNode"
+            button on the toolbar (or select "Project &gt; Create DataNode" from the menu.</para>
         <para>A new DataNode is displayed. Now you need to specify JDBC connection parameters. For
             an in-memory Derby database you can enter the following settings: <itemizedlist>
                 <listitem>
@@ -96,16 +93,14 @@
                 </listitem>
             </itemizedlist></para>
         <para>
-            <informaltable>
+            <informaltable border="1">
                 <col width="4%"/>
                 <col width="96%"/>
                 <tr>
                     <td rowspan="1" colspan="1" valign="top">
                         <mediaobject>
                             <imageobject>
-                                <imagedata
-                                    fileref="images/warning.gif"
-                                    depth="16" width="16"/>
+                                <imagedata fileref="images/warning.gif" depth="16" width="16"/>
                             </imageobject>
                         </mediaobject>
                     </td>
@@ -159,7 +154,7 @@
                 </imageobject>
             </inlinemediaobject></para>
         <para>Note that the location of the XML files is not coincidental. Cayenne runtime looks for
-            "cayenne.xml" file in the application CLASSPATH and "src/main/resources" folder should
+            "cayenne-*.xml" file in the application CLASSPATH and "src/main/resources" folder should
             already be a "class folder" in Eclipse for our project (and is also a standard location
             that Maven would copy to a jar file, if we were using Maven from command-line).</para>
     </section>

Modified: cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/webapp.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/webapp.xml?rev=1176882&r1=1176881&r2=1176882&view=diff
==============================================================================
--- cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/webapp.xml (original)
+++ cayenne/main/trunk/docs/docbook/getting-started/src/docbkx/webapp.xml Wed Sep 28 13:49:13 2011
@@ -3,7 +3,7 @@
 <chapter xmlns="http://docbook.org/ns/docbook"
     xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
     <title>Converting to web application...</title>
-    <para>This sections shows how to work with Cayenne in a web application.</para>
+    <para>This chapter shows how to work with Cayenne in a web application.</para>
     <section xml:id="converting-to-webapp">
         <title>Converting Tutorial to a Web Application</title>
         <para>The web part of the web application tutorial is done in JSP, which is the least common
@@ -50,11 +50,11 @@
          as it points it to the right named configuration file.
     --&gt;
     &lt;filter&gt;
-        &lt;filter-name&gt;cayenne-UntitledDomain&lt;/filter-name&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-UntitledDomain&lt;/filter-name&gt;
+        &lt;filter-name&gt;cayenne-project&lt;/filter-name&gt;
         &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
     &lt;/filter-mapping&gt;
     &lt;welcome-file-list&gt;
@@ -181,13 +181,13 @@
             the following piece of code to the "pom.xml" file, following the "dependencies" section
             and save the POM:</para>
         <programlisting>&lt;build&gt;
-	&lt;plugins&gt;
-		&lt;plugin&gt;
-			&lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;
-			&lt;artifactId&gt;maven-jetty-plugin&lt;/artifactId&gt;
-			&lt;version&gt;6.1.22&lt;/version&gt;
-		&lt;/plugin&gt;
-	&lt;/plugins&gt;
+    &lt;plugins&gt;
+        &lt;plugin&gt;
+            &lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;
+            &lt;artifactId&gt;maven-jetty-plugin&lt;/artifactId&gt;
+            &lt;version&gt;6.1.22&lt;/version&gt;
+        &lt;/plugin&gt;
+    &lt;/plugins&gt;
 &lt;/build&gt;</programlisting>
         <itemizedlist>
             <listitem>
@@ -235,29 +235,29 @@ INFO: loading driver information from 'U
 INFO: loading driver org.apache.derby.jdbc.EmbeddedDriver
 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: loaded datasource.
 INFO: no adapter set, using automatic adapter.
 INFO: loaded map-ref: UntitledDomainMap.
 INFO: finished configuration loading in 355 ms.
 2009-12-22 14:08:07.081::INFO:  Started SelectChannelConnector@0.0.0.0:8080
 [INFO] Started Jetty Server</programlisting>
+                </listitem>
+        </itemizedlist>
         <itemizedlist>
-            <listitem>
+        <listitem>
                 <para>So the Jetty container just started and loaded Cayenne.</para>
             </listitem>
             <listitem>
                 <para>Now go to <emphasis role="italic">http://localhost:8080/tutorial/</emphasis>
                             URL. You should see "No artists found message" in the web browser and
                             the following output in the Eclipse console:</para>
-            </listitem>
-        </itemizedlist>
         <programlisting>INFO: --- will run 1 query.
 INFO: Opening connection: jdbc:derby:memory:testdb;create=true 
-	Login: null
-	Password: *******
+    Login: null
+    Password: *******
 INFO: +++ Connecting: SUCCESS.
 INFO: --- transaction started.
 INFO: Detected and installed adapter: org.apache.cayenne.dba.derby.DerbyAdapter

Added: cayenne/main/trunk/docs/docbook/getting-started/src/images/modeler-deleterule.png
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/docbook/getting-started/src/images/modeler-deleterule.png?rev=1176882&view=auto
==============================================================================
Binary file - no diff available.

Propchange: cayenne/main/trunk/docs/docbook/getting-started/src/images/modeler-deleterule.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream