You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by aa...@apache.org on 2006/06/23 09:45:13 UTC

svn commit: r416596 [1/2] - in /incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide: Introduction/Guide to 1.1 Features/ Introduction/Guide to 1.1 features/ Queries/NamedQuery/ Queries/QueryChain/ Quick Start/ Quick St...

Author: aadamchik
Date: Fri Jun 23 00:45:11 2006
New Revision: 416596

URL: http://svn.apache.org/viewvc?rev=416596&view=rev
Log:
updating latest docs fom Wiki

Added:
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Introduction/Guide to 1.1 Features/
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Introduction/Guide to 1.1 Features/cayenne-data-map-1_2.dtd
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Introduction/Guide to 1.1 Features/cayenne-data-view-1_1.dtd
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Introduction/Guide to 1.1 Features/cayenne-driver-1_1.dtd
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Introduction/Guide to 1.1 Features/cayenne-project-1_1.dtd
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Introduction/Guide to 1.1 Features/index.html
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial DataContext/
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial DataContext/index.html
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial DataObjects/
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial DataObjects/index.html
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Delete/
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Delete/delete-rule.jpg   (with props)
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Delete/index.html
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Generate Database and Java Classes/
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Generate Database and Java Classes/class-generator.jpg   (with props)
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Generate Database and Java Classes/db-generator.jpg   (with props)
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Generate Database and Java Classes/eclipse-classes.jpg   (with props)
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Generate Database and Java Classes/index.html
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Mapping Query/
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Mapping Query/index.html
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Mapping Query/sql-template.jpg   (with props)
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Object Relational Mapping/
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Object Relational Mapping/database-schema.jpg   (with props)
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Object Relational Mapping/index.html
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Object Relational Mapping/modeler-artistid.jpg   (with props)
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Object Relational Mapping/modeler-dbrel-dialog.jpg   (with props)
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Object Relational Mapping/modeler-gallery.jpg   (with props)
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial SelectQuery/
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial SelectQuery/index.html
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Setup/
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Setup/eclipse-java-settings.jpg   (with props)
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Setup/eclipse-new-project.jpg   (with props)
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Setup/eclipse-project-settings.jpg   (with props)
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Setup/index.html
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Starting Mapping Project/
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Starting Mapping Project/eclipse-xmlfiles.jpg   (with props)
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Starting Mapping Project/index.html
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Starting Mapping Project/modeler-classpath.jpg   (with props)
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Starting Mapping Project/modeler-datadomain.jpg   (with props)
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Starting Mapping Project/modeler-datamap.jpg   (with props)
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Starting Mapping Project/modeler-datanode.jpg   (with props)
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Webapp/
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Webapp/artists.jpg   (with props)
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Webapp/index.html
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Webapp/jetty-run.jpg   (with props)
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Webapp/webapp1.jpg   (with props)
Removed:
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Introduction/Guide to 1.1 features/
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Cayenne Application/
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Command-Line Tutorial/
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Common Setup Steps/
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/JSP-Struts Tutorial/
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tapestry Tutorial/
Modified:
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Queries/NamedQuery/index.html
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Queries/QueryChain/index.html
    incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/index.html

Added: incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Introduction/Guide to 1.1 Features/cayenne-data-map-1_2.dtd
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User%20Guide/Introduction/Guide%20to%201.1%20Features/cayenne-data-map-1_2.dtd?rev=416596&view=auto
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Introduction/Guide to 1.1 Features/cayenne-data-map-1_2.dtd (added)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Introduction/Guide to 1.1 Features/cayenne-data-map-1_2.dtd Fri Jun 23 00:45:11 2006
@@ -0,0 +1,262 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!-- ===================================================
+Cayenne DataMap DTD, v 1.1
+
+Copyright (c) 2002-2005 Andrei Adamchik and individual authors. All rights reserved
+
+Author: Michael Shengaout
+Author: Andrei Adamchik
+Author: Andriy Shapochka
+
+Defines format of Cayenne DataMap XML files (*.map.xml).  DataMap files contain
+the metadata needed for Cayenne object-relational features. Multiple DataMaps
+are usually combined in one shared namespace, so the elements of the DataMap
+may reference objects from other DataMaps. 
+-->
+
+<!-- ===================================================
+A generic property used by other configuration objects.
+-->
+<!ELEMENT property EMPTY>
+<!ATTLIST property
+	name CDATA #REQUIRED
+	value CDATA #REQUIRED
+>
+
+<!-- ===================================================
+Root element.
+-->
+<!ELEMENT data-map (property*, db-entity*, obj-entity*, db-relationship*, obj-relationship*, procedure*, query*)>
+<!ATTLIST data-map
+	project-version CDATA #REQUIRED
+>
+
+<!-- ===================================================
+A descriptor of a DB table or view.
+-->
+<!ELEMENT db-entity (db-attribute+, db-attribute-derived+, db-key-generator?)>
+<!ATTLIST db-entity
+	name CDATA #REQUIRED
+	schema CDATA #IMPLIED
+	catalog CDATA #IMPLIED
+	parentName CDATA #IMPLIED
+>
+
+<!-- ===================================================
+A descriptor of a DB table column.
+-->
+<!ELEMENT db-attribute EMPTY>
+<!ATTLIST db-attribute
+	name CDATA #REQUIRED
+	isPrimaryKey (true | false) "false"
+	isMandatory (true | false) "false"
+	isGenerated (true|false) "false"
+	type CDATA #REQUIRED
+	length CDATA #IMPLIED
+	precision CDATA #IMPLIED
+>
+
+<!-- ===================================================
+A descriptor of a column of a "dynamic view" defined via a derived DbEntity.
+-->
+<!ELEMENT db-attribute-derived (db-attribute-ref*)>
+<!ATTLIST db-attribute-derived
+	name CDATA #REQUIRED
+	isPrimaryKey (true | false) "false"
+	isMandatory (true | false) "false"
+	type CDATA #REQUIRED
+	length CDATA #IMPLIED
+	precision CDATA #IMPLIED
+	isGroupBy (true | false) "false"
+	spec CDATA #IMPLIED
+>
+
+<!ELEMENT db-attribute-ref EMPTY>
+<!ATTLIST db-attribute
+	name CDATA #REQUIRED
+>
+
+<!-- =================================================== 
+Defines an ObjEntity - a metadata element describing a persistent Java 
+class. Since 1.1 allows "superEntityName" to specify a parent in the inheritance
+hierarchy.
+-->
+<!ELEMENT obj-entity (qualifier?, obj-attribute+)>
+<!ATTLIST obj-entity
+	name CDATA #REQUIRED
+	className CDATA #REQUIRED
+	dbEntityName CDATA #REQUIRED
+	superEntityName CDATA #IMPLIED
+	superClassName CDATA #IMPLIED
+	clientClassName CDATA #IMPLIED
+	clientSuperClassName CDATA #IMPLIED
+	readOnly (true | false) "false"
+	lock-type (optimistic | none) "none"
+>
+
+<!ELEMENT obj-attribute EMPTY>
+<!ATTLIST obj-attribute
+	name CDATA #REQUIRED
+	db-attribute-path CDATA #REQUIRED
+	type CDATA #REQUIRED
+	lock (true | false) "false"
+>
+
+<!ELEMENT obj-relationship EMPTY>
+<!ATTLIST obj-relationship
+	name CDATA #REQUIRED
+	source CDATA #REQUIRED
+	target CDATA #REQUIRED
+	toMany (true | false) "false"
+	lock (true | false) "false"
+	db-relationship-path CDATA #IMPLIED
+>
+
+<!ELEMENT db-relationship (db-attribute-pair+)>
+<!ATTLIST db-relationship
+	source CDATA #REQUIRED
+	target CDATA #REQUIRED
+	toMany (true | false) "false"
+	toDependentPK (true | false) "false"
+	name CDATA #REQUIRED
+>
+
+<!ELEMENT db-attribute-pair EMPTY>
+<!ATTLIST db-attribute-pair
+	source CDATA #REQUIRED
+	target CDATA #REQUIRED
+>
+
+<!ELEMENT procedure (procedure-parameter*)>
+<!ATTLIST procedure
+	name CDATA #REQUIRED
+	schema CDATA #IMPLIED
+	catalog CDATA #IMPLIED
+	returningValue (true | false) "false"
+>
+
+<!ELEMENT procedure-parameter EMPTY>
+<!ATTLIST procedure-parameter
+	name CDATA #REQUIRED
+	direction (in | in_out | out | void) "void"
+	type CDATA #REQUIRED
+	length CDATA #IMPLIED
+	precision CDATA #IMPLIED
+>
+
+<!-- =================================================== 
+Defines a Cayenne Query that can be either at the DataMap
+level, or linked to an entity or procedure.
+-->
+<!ELEMENT query (property*, result-column*, (sql* | (qualifier?, ordering*, prefetch*)?) >
+<!ATTLIST query
+        name CDATA #REQUIRED
+        factory CDATA #REQUIRED
+		root (db-entity | obj-entity | procedure | data-map | java-class) "data-map"
+        root-name CDATA #IMPLIED
+        result-class CDATA #IMPLIED
+        selecting (true | false) "true"
+>
+
+<!-- ===================================================
+Defines a query ResultSet column. This can be viewed as 
+a stripped down combination of ObjAttribute and DbAttribute. 
+-->
+<!ELEMENT result-column>
+<!ATTLIST result-column
+	label CDATA #IMPLIED
+	db-type CDATA #REQUIRED
+	java-type CDATA #REQUIRED
+>
+
+<!-- ===================================================
+Defines a query qualifier, normally an encoded expression
+wrapped in CDATA, like "abc.name != $param2 and salary > 
+$param2".
+-->
+<!ELEMENT qualifier (#PCDATA)>
+
+<!-- ===================================================
+Defines a query ordering.
+-->
+<!ELEMENT ordering (#PCDATA)>
+<!ATTLIST ordering
+	descending  (true | false) "false"
+	ignore-case  (true | false) "false"
+>
+
+<!-- ===================================================
+Defines a query relationship prefetching.
+-->
+<!ELEMENT prefetch (#PCDATA)>
+
+<!-- ===================================================
+Defines arbitrary SQL statement, normally wrapped in 
+CDATA section. Note that SQL statement can be customized
+for different SQL dialects per DbAdapter class. If no
+adapter-specific statement is found, the one with no
+adapter label is used by default
+-->
+<!ELEMENT sql (#PCDATA)>
+<!ATTLIST sql
+        adapter-class CDATA #IMPLIED
+>
+
+
+<!-- =================================================== 
+"db-key-generator"  optional tag is used to install the 
+Automatic Sequence/Key Generation facility for db-entity.
+
+Example:
+  <db-key-generator>
+    <db-generator-type>ORACLE</db-generator-type>
+    <db-generator-name>test_sequence</db-generator-name>
+    <db-key-cache-size>10</db-key-cache-size>
+  </db-key-generator>
+
+Notes: This feature is intended for use with Simple (non-Compound)
+       Integral Primary Keys.
+-->
+<!ELEMENT db-key-generator (
+    db-generator-type,
+    db-generator-name?,
+    db-key-cache-size?
+)>
+
+<!-- ===================================================
+Specifies the Key Generation Method that will be employed
+  'ORACLE'               - use Oracle's SEQUENCE
+  'NAMED_SEQUENCE_TABLE' - use USER designated SEQUENCE TABLE
+                               User specifies the name of a DBMS Table
+                               with the schema (sequence INT)
+                               which will be used to hold sequence values
+                               (not supported yet)
+-->
+<!ELEMENT db-generator-type (#PCDATA)>
+
+<!-- ===================================================
+If this is DBMS Key Generation,
+Then this may be used to specify the Name of the Generator,
+  e.g. for <db-generator-type>ORACLE
+           <db-generator-name> would be the name of the ORACLE SEQUENCE to use.
+                             the SEQUENCE is assumed to already exist in the Database.
+
+If this is <db-generator-type>NAMED_SEQUENCE_TABLE Key Generation,
+Then this would be used to specify the name of the SEQUENCE TABLE to use.
+ the NAMED_SEQUENCE_TABLE is assumed to already exist in the Database
+ with 1 row.
+-->
+<!ELEMENT db-generator-name (#PCDATA)>
+
+<!-- ===================================================
+Optional size of key cache.
+For <db-generator-type>ORACLE , this value MUST match the
+  Oracle SEQUENCE  INCREMENT value.  If there is a mismatch
+  between this value and the Oracle SEQUENCE INCREMENT value,
+  then there will likely be duplicate key problems.
+
+For <db-generator-type>NAMED_SEQUENCE_TABLE , this tells how many keys
+  the Container will fetch in a single DBMS call
+-->
+<!ELEMENT db-key-cache-size (#PCDATA)>

Added: incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Introduction/Guide to 1.1 Features/cayenne-data-view-1_1.dtd
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User%20Guide/Introduction/Guide%20to%201.1%20Features/cayenne-data-view-1_1.dtd?rev=416596&view=auto
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Introduction/Guide to 1.1 Features/cayenne-data-view-1_1.dtd (added)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Introduction/Guide to 1.1 Features/cayenne-data-view-1_1.dtd Fri Jun 23 00:45:11 2006
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!ELEMENT caption ( #PCDATA ) >
+
+<!ELEMENT data-view ( obj-entity-view+ ) >
+
+<!ELEMENT default-value ( #PCDATA ) >
+
+<!ELEMENT pattern ( #PCDATA ) >
+
+<!ELEMENT edit-format ( pattern? ) >
+<!ATTLIST edit-format class NMTOKEN #REQUIRED >
+
+
+<!ELEMENT display-format ( pattern? ) >
+<!ATTLIST display-format class NMTOKEN #REQUIRED >
+
+<!ELEMENT lookup EMPTY >
+<!ATTLIST lookup obj-entity-view-name NMTOKEN #REQUIRED >
+<!ATTLIST lookup field-name NMTOKEN #REQUIRED >
+
+<!ELEMENT field ( caption?, lookup?, edit-format?, 
+                  display-format?, default-value? ) >
+<!ATTLIST field obj-relationship-name NMTOKEN #IMPLIED >
+<!ATTLIST field pref-index NMTOKEN #IMPLIED >
+<!ATTLIST field name NMTOKEN #REQUIRED >
+<!ATTLIST field editable ( false | true ) #REQUIRED >
+<!ATTLIST field obj-attribute-name NMTOKEN #IMPLIED >
+<!ATTLIST field calc-type ( nocalc | lookup ) #REQUIRED >
+<!ATTLIST field data-type ( Object | String | Money | 
+                            Integer | Double | Percent | 
+                            Date | Datetime | Boolean ) #REQUIRED >
+<!ATTLIST field visible ( false | true ) #REQUIRED >
+
+<!ELEMENT obj-entity-view ( field+ ) >
+<!ATTLIST obj-entity-view name NMTOKEN #REQUIRED >
+<!ATTLIST obj-entity-view obj-entity-name NMTOKEN #IMPLIED >
+
+

Added: incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Introduction/Guide to 1.1 Features/cayenne-driver-1_1.dtd
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User%20Guide/Introduction/Guide%20to%201.1%20Features/cayenne-driver-1_1.dtd?rev=416596&view=auto
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Introduction/Guide to 1.1 Features/cayenne-driver-1_1.dtd (added)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Introduction/Guide to 1.1 Features/cayenne-driver-1_1.dtd Fri Jun 23 00:45:11 2006
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!-- =================================================== -->
+<!-- Cayenne Driver DTD,  v 1.1                          -->
+<!--                                                     -->
+<!-- Copyright (c) 2002-2005 Andrei Adamchik and         -->
+<!-- individual authors. All rights reserved             -->
+<!--                                                     -->
+<!-- Author: Andrei Adamchik                             -->
+<!--                                                     -->
+<!-- Describes Cayenne JDBC driver configuration files   -->
+<!-- usually called *.driver.xml. Note that driver files -->
+<!-- are only used when DataSource is NOT provided by    -->
+<!-- container.                                          -->
+<!-- =================================================== -->
+
+<!ELEMENT driver (url, connectionPool?, login?)>
+<!ATTLIST driver
+	class CDATA #REQUIRED
+>
+
+<!ELEMENT url EMPTY>
+<!ATTLIST url
+	value CDATA #REQUIRED
+>
+
+<!ELEMENT connectionPool>
+<!ATTLIST connectionPool
+	min CDATA #REQUIRED
+	max CDATA #REQUIRED
+>
+
+<!ELEMENT login>
+<!ATTLIST login
+	userName CDATA #REQUIRED
+	password CDATA #REQUIRED
+>

Added: incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Introduction/Guide to 1.1 Features/cayenne-project-1_1.dtd
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User%20Guide/Introduction/Guide%20to%201.1%20Features/cayenne-project-1_1.dtd?rev=416596&view=auto
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Introduction/Guide to 1.1 Features/cayenne-project-1_1.dtd (added)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Introduction/Guide to 1.1 Features/cayenne-project-1_1.dtd Fri Jun 23 00:45:11 2006
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!-- =================================================== -->
+<!-- Cayenne Project DTD, v 1.1                          -->
+<!--                                                     -->
+<!-- Copyright (c) 2002-2005 Andrei Adamchik and         -->
+<!-- individual authors. All rights reserved             -->
+<!--                                                     -->
+<!-- Author: Andrei Adamchik                             -->
+<!--                                                     -->
+<!-- Cayenne project files described by this DTD are     -->
+<!-- normally called "cayenne.xml" and describe          -->
+<!-- Cayenne deployment configuration for a particular   -->
+<!-- application.                                        -->
+<!-- =================================================== -->
+
+<!ELEMENT domains (domain*)>
+<!ATTLIST domains
+	project-version CDATA
+>
+
+<!ELEMENT domain (property*, map*, node*, view*)>
+<!ATTLIST domain
+	name CDATA #REQUIRED
+>
+
+<!ELEMENT property>
+<!ATTLIST property
+	name CDATA #REQUIRED
+	value CDATA #REQUIRED
+>
+
+<!ELEMENT map>
+<!ATTLIST map
+	name CDATA #REQUIRED
+	location CDATA #REQUIRED
+>
+
+<!ELEMENT node (map-ref*)>
+<!ATTLIST node
+	name CDATA #REQUIRED
+	factory CDATA #REQUIRED
+	datasource CDATA #REQUIRED
+	adapter CDATA #IMPLIED 
+>
+
+<!ELEMENT view>
+<!ATTLIST view
+	name CDATA #REQUIRED
+	location CDATA #REQUIRED
+>
+
+<!ELEMENT map-ref>
+<!ATTLIST map-ref
+	name CDATA #REQUIRED
+>
+

Added: incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Introduction/Guide to 1.1 Features/index.html
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User%20Guide/Introduction/Guide%20to%201.1%20Features/index.html?rev=416596&view=auto
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Introduction/Guide to 1.1 Features/index.html (added)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Introduction/Guide to 1.1 Features/index.html Fri Jun 23 00:45:11 2006
@@ -0,0 +1,191 @@
+<html>
+  <head>
+    <title>Cayenne Documentation - Guide to 1.1 Features</title>
+    <style type="text/css">@import "../../../../style.css";</style>
+  </head>
+<body>
+  <div class="header">
+    <div style="float: left;"><a href="http://objectstyle.org/cayenne/"><img src="../../../../images/logo.gif" align="absmiddle" border="0"></a></div>
+    <span class="logoSpaceLink"><a href="../../../../index.html">Cayenne User Documentation</a></span><br />
+    <span class="pagetitle">Guide to 1.1 Features</span>
+  </div>
+<div id="cayenne_toc">
+<ul>
+<li><a href="../../../../Documentation/User Guide/Introduction/index.html">Introduction</a><ul>
+<li><a href="../../../../Documentation/User Guide/Introduction/Acknowledgments/index.html">Acknowledgments</a></li>
+<li><a href="../../../../Documentation/User Guide/Introduction/License/index.html">License</a></li>
+<li><a href="../../../../Documentation/User Guide/Introduction/Guide to 1.1 Features/index.html">Guide to 1.1 Features</a><ul>
+</ul>
+</li>
+<li><a href="../../../../Documentation/User Guide/Introduction/Guide to 1.2 Features/index.html">Guide to 1.2 Features</a></li>
+</ul>
+</li>
+<li><a href="../../../../Documentation/User Guide/Installation/index.html">Installation</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/index.html">Quick Start</a></li>
+<li><a href="../../../../Documentation/User Guide/Design/index.html">Design</a></li>
+<li><a href="../../../../Documentation/User Guide/Generating Classes/index.html">Generating Classes</a></li>
+<li><a href="../../../../Documentation/User Guide/DataContext/index.html">DataContext</a></li>
+<li><a href="../../../../Documentation/User Guide/Queries/index.html">Queries</a></li>
+<li><a href="../../../../Documentation/User Guide/DataObjects/index.html">DataObjects</a></li>
+<li><a href="../../../../Documentation/User Guide/Stored Procedures/index.html">Stored Procedures</a></li>
+<li><a href="../../../../Documentation/User Guide/Expressions/index.html">Expressions</a></li>
+<li><a href="../../../../Documentation/User Guide/Performance Tuning/index.html">Performance Tuning</a></li>
+<li><a href="../../../../Documentation/User Guide/Deployment/index.html">Deployment</a></li>
+<li><a href="../../../../Documentation/User Guide/Ant Tasks/index.html">Ant Tasks</a></li>
+<li><a href="../../../../Documentation/User Guide/Access Stack Internals/index.html">Access Stack Internals</a></li>
+<li><a href="../../../../Documentation/User Guide/DataViews/index.html">DataViews</a></li>
+</ul>
+</div>
+<div id="ConfluenceContent"><p>Cayenne version 1.1 introduces a large number of new features and enhancements over 1.0. This chapter lists most of them, providing the links to more detailed information about each feature.</p>
+
+<h3><a name="Guideto1.1Features-DTDAdditions."></a>DTD Additions.</h3>
+
+<p>"cayenne.xml" and "*.map.xml" file formats were updated to support new features. 1.1 DTD files are located here:</p>
+<ul>
+	<li><span class="nobr"><a href="cayenne-project-1_1.dtd?version=1" title="cayenne-project-1_1.dtd attached to Guide to 1.1 Features">cayenne-project-1_1.dtd<sup><img class="rendericon" src="../../../../images/link_attachment_7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span></li>
+	<li><span class="nobr"><a href="cayenne-data-map-1_2.dtd?version=1" title="cayenne-data-map-1_2.dtd attached to Guide to 1.1 Features">cayenne-data-map-1_2.dtd<sup><img class="rendericon" src="../../../../images/link_attachment_7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span></li>
+	<li><span class="nobr"><a href="cayenne-data-view-1_1.dtd?version=1" title="cayenne-data-view-1_1.dtd attached to Guide to 1.1 Features">cayenne-data-view-1_1.dtd<sup><img class="rendericon" src="../../../../images/link_attachment_7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span></li>
+	<li><span class="nobr"><a href="cayenne-driver-1_1.dtd?version=1" title="cayenne-driver-1_1.dtd attached to Guide to 1.1 Features">cayenne-driver-1_1.dtd<sup><img class="rendericon" src="../../../../images/link_attachment_7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span></li>
+</ul>
+
+
+<table cellpadding='5' width='85%' cellspacing='8px' class='warningMacro' border="0" align='center'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../../images/emoticons/forbidden.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b class="strong">Upgrade Warning</b><br />Saving projects with CayenneModeler v.1.1 will render them uneditable with CayenneModeler v.1.0.</td></tr></table>
+
+<h3><a name="Guideto1.1Features-AdvancedLocalandDistributedCaching"></a>Advanced Local and Distributed Caching</h3>
+
+<p>Cayenne now provides a way to share its object cache between DataContexts in the same JVM and across JVMs. The following chapters in the user guide describe this feature:</p>
+<ul>
+	<li><a href="../../../../Documentation/User Guide/Design/How Information Is Stored in Cayenne/index.html" title="How Information Is Stored in Cayenne">How Information Is Stored in Cayenne</a></li>
+	<li><a href="../../../../Documentation/User Guide/Design/Understanding Caching/index.html" title="Understanding Caching">Understanding Caching</a></li>
+	<li><span class="error">&#91;Caching Query Result Lists&#93;</span></li>
+	<li><a href="../../../../Documentation/User Guide/Performance Tuning/Caching Lookup Tables/index.html" title="Caching Lookup Tables">Caching Lookup Tables</a></li>
+</ul>
+
+
+<h3><a name="Guideto1.1Features-OptimisticLocking"></a>Optimistic Locking</h3>
+
+<p>ObjAttributes and ObjRelationships can be marked to be used for "optimistic" locking. If an corresponding columns of the underlying database row are externally modified, an attempt to save an object results in OptimisticLockingException.</p>
+
+<h3><a name="Guideto1.1Features-DataObjectUtilsaneasywaytomapobjectsbyPK"></a>DataObjectUtils - an easy way to map objects by PK</h3>
+
+<p><a href="../../../../Documentation/User Guide/DataObjects/DataObjectUtils/index.html" title="DataObjectUtils">DataObjectUtils</a> is an often requested feature for easy retrieval of an object primary key, or locating an object for a known key. It works in a generic way for any type of DataObjects, even if a PK is not a class property.</p>
+
+<h3><a name="Guideto1.1Features-EntityInheritance"></a>Entity Inheritance</h3>
+
+<p>Cayenne now supports entity inheritance for entities rooted in the same DB table (single table inheritance).</p>
+
+<h3><a name="Guideto1.1Features-DataViewsandDVModeler"></a>Data Views and DVModeler</h3>
+
+<p><span class="error">&#91;Data Views&#93;</span> is a completely new addition to Cayenne. This is a framework and a Swing modeler tool to quickly build Swing applications based on Cayenne.</p>
+
+<h3><a name="Guideto1.1Features-GenericMultithreadedandDistributedEventsMechanism"></a>Generic Multithreaded and Distributed Events Mechanism</h3>
+
+<p>Cayenne now includes a generic <a href="../../../../Documentation/User Guide/Design/Event Package/index.html" title="Event Package">event package</a> "org.objectstyle.cayenne.event" for registering listeners and sending events, both locally and remotely. It supports both blocking and non-blocking listeners and dispatches. Supported remote transports include JMS and JavaGroups.</p>
+
+<h3><a name="Guideto1.1Features-DataObjectsValidation"></a>DataObjects Validation</h3>
+
+<p>DataContext now performs validation of DataObjects before committing them. There is a set of default validation checks being executed, based on the DataMap information. Developers can override DataObject validation methods to provide custom validation checks.</p>
+
+<p>See user guide chapter on <span class="error">&#91;object validation&#93;</span>.</p>
+
+<p>Original implementation was submitted by Fabricio Voznika.</p>
+
+<h3><a name="Guideto1.1Features-ExpressionAPIEnhancements"></a>Expression API Enhancements</h3>
+
+<p>There is a new expression parser that allows creation of complex expressions from strings ("Expression.fromString(..)"). This greatly reduces the amount of code needed to build an expression.</p>
+
+<p>In-memory evaluation API is improved, and now supports both boolean conditions (via "Expression.match" method) and generic expressions evaluation (via "Expression.evaluate" method), it also includes support for arithmetic operations.</p>
+<ul>
+	<li><a href="../../../../Documentation/User Guide/Expressions/index.html" title="Expressions">Expressions</a></li>
+</ul>
+
+
+<h3><a name="Guideto1.1Features-SQLTemplateADynamicRawSQLQuery"></a>SQLTemplate - A Dynamic Raw SQL Query</h3>
+
+<p>SQLTemplate replaces SqlSelectQuery and SqlModifyQuery and is a scriptable parameterized raw SQL query. It supports DataObjects and other features declared in GenericSelectQuery interface.</p>
+<ul>
+	<li><span class="error">&#91;SQLTemplate Overview&#93;</span></li>
+	<li><span class="error">&#91;SQLTemplate Scripting&#93;</span></li>
+</ul>
+
+
+<h3><a name="Guideto1.1Features-DataContextAPIforRunningParameterizedNamedQueries"></a>DataContext API for Running Parameterized Named Queries</h3>
+
+<p>DataContext now provides simple API to run SelectQuery, SQLTemplate and ProcedureQuery by name if such queries are mapped via CayenneModeler:</p>
+<ul>
+	<li><a href="../../../../Documentation/User Guide/DataContext/index.html" title="DataContext">DataContext Query API Overview</a></li>
+</ul>
+
+
+<h3><a name="Guideto1.1Features-SupportforSharedMappingNamespace"></a>Support for Shared Mapping Namespace</h3>
+
+<p>DataDomain now provides a shared mapping namespace. This means that all mapping objects can reference other mapping objects outside their DataMaps. For example two DbEntities can be located in different DataMaps and still have relationships to each other.</p>
+
+<p>Temporary limitation of the shared mapping namespace is that Queries stored in the DataMap can't have a "root" from a different DataMap.</p>
+
+<h3><a name="Guideto1.1Features-SnapshotEvents"></a>SnapshotEvents</h3>
+
+
+<h3><a name="Guideto1.1Features-DataContextDelegate"></a>DataContextDelegate</h3>
+
+
+<h3><a name="Guideto1.1Features-EntityRestrictingQualifier"></a>Entity Restricting Qualifier</h3>
+
+<p>ObjEntities now can hold a qualifier expression that is automatically appended to any query qualifiers, thus creating a global data filter for a given entity. This feature is used for inheritance mapping, however it has nothing to do with inheritance as such and can be used all by itself.</p>
+
+<h3><a name="Guideto1.1Features-ExplicitTransactionAPIandContainerManagedTransactions"></a>Explicit Transaction API and Container Managed Transactions</h3>
+
+<p>Cayenne now supports container-managed transactions. As a result it can be used inside EJBs out of the box. It also allows a high degree of transactions customization. The following user guide chapter explains Transactions design and behavior in details:</p>
+<ul>
+	<li><a href="http://www.objectstyle.org/confluence/confluence/display/CAYDOC/Design#Design-CayenneTransactions" title="Cayenne Transactions on Design">Understanding Transactions</a></li>
+</ul>
+
+
+<h3><a name="Guideto1.1Features-VariousPerformanceEnhancements"></a>Various Performance Enhancements</h3>
+
+<ul>
+	<li>Lazy Relationship Creation - when new objects are fetched, their relationships are not initialized immediately; a Fault singleton is used isntead as a placeholder. Of course in the past Cayenne also had "lazy" relationships, meaning that they didn't get resolved via a DB query until accessed. Current optimization goes further - it prevents a number of Java objects (such as empty Lists for to-many relationship, or "hollow" DataObjects for to-ones) from being created until absolutely necessary.</li>
+	<li>To-many relationships do not have to be fully resolved on modification - if an unresolved to-many relationship is modified (i.e. an object is added or removed from it), it is not resolved until the next "read" (i.e. until a call to "size()" or "iterator()" method). This is especially helpful with bi-directional one-to-many relationships. E.g. "painting.addToArtist(artist)" used to trigger the fetch of all paintings that belong to an artist. Not anymore.</li>
+</ul>
+
+
+<h3><a name="Guideto1.1Features-MoreDatabasesHaveCustomDbAdapters"></a>More Databases Have Custom DbAdapters</h3>
+
+<p>Cayenne features new database adapters:</p>
+<ul>
+	<li>OpenBase Adapter</li>
+	<li>MS SQL Server Adapter</li>
+</ul>
+
+
+<h3><a name="Guideto1.1Features-SupportforToOneRelationshipsNotPointingtoaPK."></a>Support for To-One Relationships Not Pointing to a PK.</h3>
+
+<p>Added support for one-to-one relationships between PK and non-PK columns of related tables. In the past this could only be modeled as one-to-many. CayenneModeler will create UNIQUE constraint for a non-PK columns during schema generation.</p>
+
+<h3><a name="Guideto1.1Features-SupportforQueriesinDataMapDTD."></a>Support for Queries in DataMap DTD.</h3>
+
+<p>Queries are made first-class mapping objects. They can be modeled in CayenneModeler and stored in DataMaps. Application code can then reuse such queries.</p>
+<ul>
+	<li><a href="../../../../Documentation/Modeler Guide/Modeling Queries/index.html" title="Modeling Queries">Modeling Queries</a></li>
+	<li><span class="error">&#91;Using Mapped Queries&#93;</span></li>
+</ul>
+
+
+<h3><a name="Guideto1.1Features-NonrefreshingSelectQueries"></a>Non-refreshing Select Queries</h3>
+
+
+<h3><a name="Guideto1.1Features-CayenneModelerEnhancements."></a>CayenneModeler Enhancements.</h3>
+
+<p>The following is an incomplete list of enhancements: new professional look and feel, preference engine, reenginnering of stored procedures, local DataSources, configurable locations of JDBC drivers, custom class generation templates, etc. A number of Modeler tasks and dialogs have been redesigned and improved to be more user-friendly and consistent.</p>
+
+<p>Also CayenneModeler supports mapping of all the new 1.1 framework features, such as DataMap queries, cache synchronization configuration, etc.</p></div>
+</div>
+  <div class="clearer">.</div>
+  <div style="height: 12px; background-image: url('../../../../images/border_bottom.gif'); background-repeat: repeat-x;"></div>
+
+  <div class="smalltext copyright">
+    Copyright &copy;2001-2006 ObjectStyle Group and content authors
+  </div>
+
+</body>
+</html>

Modified: incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Queries/NamedQuery/index.html
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User%20Guide/Queries/NamedQuery/index.html?rev=416596&r1=416595&r2=416596&view=diff
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Queries/NamedQuery/index.html (original)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Queries/NamedQuery/index.html Fri Jun 23 00:45:11 2006
@@ -49,14 +49,13 @@
 <div id="ConfluenceContent"><p><tt>NamedQuery</tt> is a query that is a reference to another query stored in the DataMap. It can hold named parameters that will be passed to the named query on execution.</p>
 
 <p>Assuming that there a query called "Login" was previously mapped in the Modeler, we can do this:</p>
-
 <div class="code"><div class="codeContent">
 <pre class="code-java"><span class="code-object">String</span>[] keys = <span class="code-keyword">new</span> <span class="code-object">String</span>[] {<span class="code-quote">"loginid"</span>, <span class="code-quote">"password"</span>};
 <span class="code-object">Object</span>[] values = <span class="code-keyword">new</span> <span class="code-object">String</span>[] {<span class="code-quote">"joe"</span>, <span class="code-quote">"secret"</span>};
 
 NamedQuery query = <span class="code-keyword">new</span> NamedQuery(<span class="code-quote">"Login"</span>, keys, values);
 
-List matchingUsers = context.performedQuery(query);</pre>
+List matchingUsers = context.performQuery(query);</pre>
 </div></div></div>
 </div>
   <div class="clearer">.</div>

Modified: incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Queries/QueryChain/index.html
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User%20Guide/Queries/QueryChain/index.html?rev=416596&r1=416595&r2=416596&view=diff
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Queries/QueryChain/index.html (original)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Queries/QueryChain/index.html Fri Jun 23 00:45:11 2006
@@ -47,12 +47,11 @@
 </ul>
 </div>
 <div id="ConfluenceContent"><p><tt>QueryChain</tt>, as the name implies, is a Query that is itself a collection of other queries. It simplifies an execution of multiple queries in a single batch. E.g.:</p>
-
 <div class="code"><div class="codeContent">
 <pre class="code-java">QueryChain query = <span class="code-keyword">new</span> QueryChain();
-query.addQuery(<span class="code-keyword">new</span> SQLTemplate(Project.class, <span class="code-quote">"delete from project"</span>, <span class="code-keyword">false</span>));
-query.addQuery(<span class="code-keyword">new</span> SQLTemplate(Project.class, <span class="code-quote">"delete from person"</span>, <span class="code-keyword">false</span>));
-query.addQuery(<span class="code-keyword">new</span> SQLTemplate(Project.class, <span class="code-quote">"delete from department"</span>, <span class="code-keyword">false</span>));
+query.addQuery(<span class="code-keyword">new</span> SQLTemplate(Project.class, <span class="code-quote">"delete from project"</span>));
+query.addQuery(<span class="code-keyword">new</span> SQLTemplate(Project.class, <span class="code-quote">"delete from person"</span>));
+query.addQuery(<span class="code-keyword">new</span> SQLTemplate(Project.class, <span class="code-quote">"delete from department"</span>));
 
 DataContext context = ...
 context.performNonSelectingQuery(query);</pre>

Added: incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial DataContext/index.html
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User%20Guide/Quick%20Start/Tutorial%20DataContext/index.html?rev=416596&view=auto
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial DataContext/index.html (added)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial DataContext/index.html Fri Jun 23 00:45:11 2006
@@ -0,0 +1,108 @@
+<html>
+  <head>
+    <title>Cayenne Documentation - Tutorial DataContext</title>
+    <style type="text/css">@import "../../../../style.css";</style>
+  </head>
+<body>
+  <div class="header">
+    <div style="float: left;"><a href="http://objectstyle.org/cayenne/"><img src="../../../../images/logo.gif" align="absmiddle" border="0"></a></div>
+    <span class="logoSpaceLink"><a href="../../../../index.html">Cayenne User Documentation</a></span><br />
+    <span class="pagetitle">Tutorial DataContext</span>
+  </div>
+<div id="cayenne_toc">
+<ul>
+<li><a href="../../../../Documentation/User Guide/Introduction/index.html">Introduction</a></li>
+<li><a href="../../../../Documentation/User Guide/Installation/index.html">Installation</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/index.html">Quick Start</a><ul>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Setup/index.html">Tutorial Setup</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Starting Mapping Project/index.html">Tutorial Starting Mapping Project</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Object Relational Mapping/index.html">Tutorial Object Relational Mapping</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Generate Database and Java Classes/index.html">Tutorial Generate Database and Java Classes</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial DataContext/index.html">Tutorial DataContext</a><ul>
+</ul>
+</li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial DataObjects/index.html">Tutorial DataObjects</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Mapping Query/index.html">Tutorial Mapping Query</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial SelectQuery/index.html">Tutorial SelectQuery</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Delete/index.html">Tutorial Delete</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Webapp/index.html">Tutorial Webapp</a></li>
+</ul>
+</li>
+<li><a href="../../../../Documentation/User Guide/Design/index.html">Design</a></li>
+<li><a href="../../../../Documentation/User Guide/Generating Classes/index.html">Generating Classes</a></li>
+<li><a href="../../../../Documentation/User Guide/DataContext/index.html">DataContext</a></li>
+<li><a href="../../../../Documentation/User Guide/Queries/index.html">Queries</a></li>
+<li><a href="../../../../Documentation/User Guide/DataObjects/index.html">DataObjects</a></li>
+<li><a href="../../../../Documentation/User Guide/Stored Procedures/index.html">Stored Procedures</a></li>
+<li><a href="../../../../Documentation/User Guide/Expressions/index.html">Expressions</a></li>
+<li><a href="../../../../Documentation/User Guide/Performance Tuning/index.html">Performance Tuning</a></li>
+<li><a href="../../../../Documentation/User Guide/Deployment/index.html">Deployment</a></li>
+<li><a href="../../../../Documentation/User Guide/Ant Tasks/index.html">Ant Tasks</a></li>
+<li><a href="../../../../Documentation/User Guide/Access Stack Internals/index.html">Access Stack Internals</a></li>
+<li><a href="../../../../Documentation/User Guide/DataViews/index.html">DataViews</a></li>
+</ul>
+</div>
+<div id="ConfluenceContent"><ul>
+	<li>In Eclipse create a new class called "Main" in the <tt>"cayenne.tutorial"</tt> package.</li>
+	<li>Create a standard "main" method to make it a runnable class:</li>
+</ul>
+
+
+<div class="code"><div class="codeHeader"><b>Main.java</b></div><div class="codeContent">
+<pre class="code-java"><span class="code-keyword">package</span> cayenne.tutorial;
+
+<span class="code-keyword">public</span> class Main {
+
+	<span class="code-keyword">public</span> <span class="code-keyword">static</span> void main(<span class="code-object">String</span>[] args) {
+
+	}
+}</pre>
+</div></div>
+
+<ul>
+	<li>The first thing you need to be able to access the database is a <tt><a href="../../../../Documentation/User Guide/DataContext/index.html" title="DataContext">DataContext</a></tt> instance. In this simple case of a standalone command line application, it can be obtained by calling a static method:</li>
+</ul>
+
+
+<div class="code"><div class="codeHeader"><b>Main.java</b></div><div class="codeContent">
+<pre class="code-java"><span class="code-keyword">package</span> cayenne.tutorial;
+
+<span class="code-keyword">import</span> org.objectstyle.cayenne.access.DataContext;
+
+<span class="code-keyword">public</span> class Main {
+
+	<span class="code-keyword">public</span> <span class="code-keyword">static</span> void main(<span class="code-object">String</span>[] args) {
+
+		DataContext context = DataContext.createDataContext();
+	}
+}</pre>
+</div></div>
+
+<p>DataContext is a single session a user needs to work with Cayenne. DataContext has methods to execute queries and manage persistent objects. We'll discuss them in the following chapters. When the first DataContext is created in the application, Cayenne loads XML mapping files and creates an access stack that can later be reused for other DataContexts. </p>
+
+<h3><a name="TutorialDataContext-RunningApplication"></a>Running Application</h3>
+
+<p>Let's check what happens when you run the application. First you need to close CayenneModeler (as Derby does not allow multiple applications accessing the same database in the embedded mode). After that right click the "Main" class in Eclipse and select <tt>"Run As &gt; Java Application"</tt>. In the console you'll see output similar to this, indicating that Cayenne stack has been started:</p>
+
+<div class="preformatted"><div class="preformattedContent">
+<pre>INFO  QueryLogger: Created connection pool: jdbc:derby:testdb;create=true
+	Driver class: org.apache.derby.jdbc.EmbeddedDriver
+	Min. connections in the pool: 1
+	Max. connections in the pool: 1</pre>
+</div></div>
+
+<p>The log omits most stack loading details. You can configure a more detailed output by following the instructions in the <a href="../../../../Documentation/User Guide/Deployment/Configuring Logging/index.html" title="Configuring Logging">logging chapter</a>.</p>
+
+<hr />
+<p><b>Next Step: <a href="../../../../Documentation/User Guide/Quick Start/Tutorial DataObjects/index.html" title="Tutorial DataObjects">Tutorial DataObjects</a></b></p>
+<hr /></div>
+</div>
+  <div class="clearer">.</div>
+  <div style="height: 12px; background-image: url('../../../../images/border_bottom.gif'); background-repeat: repeat-x;"></div>
+
+  <div class="smalltext copyright">
+    Copyright &copy;2001-2006 ObjectStyle Group and content authors
+  </div>
+
+</body>
+</html>

Added: incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial DataObjects/index.html
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User%20Guide/Quick%20Start/Tutorial%20DataObjects/index.html?rev=416596&view=auto
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial DataObjects/index.html (added)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial DataObjects/index.html Fri Jun 23 00:45:11 2006
@@ -0,0 +1,173 @@
+<html>
+  <head>
+    <title>Cayenne Documentation - Tutorial DataObjects</title>
+    <style type="text/css">@import "../../../../style.css";</style>
+  </head>
+<body>
+  <div class="header">
+    <div style="float: left;"><a href="http://objectstyle.org/cayenne/"><img src="../../../../images/logo.gif" align="absmiddle" border="0"></a></div>
+    <span class="logoSpaceLink"><a href="../../../../index.html">Cayenne User Documentation</a></span><br />
+    <span class="pagetitle">Tutorial DataObjects</span>
+  </div>
+<div id="cayenne_toc">
+<ul>
+<li><a href="../../../../Documentation/User Guide/Introduction/index.html">Introduction</a></li>
+<li><a href="../../../../Documentation/User Guide/Installation/index.html">Installation</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/index.html">Quick Start</a><ul>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Setup/index.html">Tutorial Setup</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Starting Mapping Project/index.html">Tutorial Starting Mapping Project</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Object Relational Mapping/index.html">Tutorial Object Relational Mapping</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Generate Database and Java Classes/index.html">Tutorial Generate Database and Java Classes</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial DataContext/index.html">Tutorial DataContext</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial DataObjects/index.html">Tutorial DataObjects</a><ul>
+</ul>
+</li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Mapping Query/index.html">Tutorial Mapping Query</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial SelectQuery/index.html">Tutorial SelectQuery</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Delete/index.html">Tutorial Delete</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Webapp/index.html">Tutorial Webapp</a></li>
+</ul>
+</li>
+<li><a href="../../../../Documentation/User Guide/Design/index.html">Design</a></li>
+<li><a href="../../../../Documentation/User Guide/Generating Classes/index.html">Generating Classes</a></li>
+<li><a href="../../../../Documentation/User Guide/DataContext/index.html">DataContext</a></li>
+<li><a href="../../../../Documentation/User Guide/Queries/index.html">Queries</a></li>
+<li><a href="../../../../Documentation/User Guide/DataObjects/index.html">DataObjects</a></li>
+<li><a href="../../../../Documentation/User Guide/Stored Procedures/index.html">Stored Procedures</a></li>
+<li><a href="../../../../Documentation/User Guide/Expressions/index.html">Expressions</a></li>
+<li><a href="../../../../Documentation/User Guide/Performance Tuning/index.html">Performance Tuning</a></li>
+<li><a href="../../../../Documentation/User Guide/Deployment/index.html">Deployment</a></li>
+<li><a href="../../../../Documentation/User Guide/Ant Tasks/index.html">Ant Tasks</a></li>
+<li><a href="../../../../Documentation/User Guide/Access Stack Internals/index.html">Access Stack Internals</a></li>
+<li><a href="../../../../Documentation/User Guide/DataViews/index.html">DataViews</a></li>
+</ul>
+</div>
+<div id="ConfluenceContent"><p>Persistent classes in Cayenne implement a <a href="../../../../Documentation/User Guide/DataObjects/index.html" title="DataObjects">DataObject interface</a>. If you inspect any of classes <a href="../../../../Documentation/User Guide/Quick Start/Tutorial Generate Database and Java Classes/index.html" title="Tutorial Generate Database and Java Classes">generated earlier</a> in this tutorial (e.g. <tt>cayenne.tutorial.Artist</tt>), you'll see that it extends a class with the name that starts with underscore (<tt>cayenne.tutorial.auto._Artist</tt>), which in turn extends from <tt>org.objectstyle.cayenne.CayenneDataObject</tt>. Splitting each persistent class into user-customizable subclass (Xyz) and a generated superclass (_Xyz) is a useful technique to avoid overwriting of the custom code when refreshing classes from the mapping model.</p>
+
+<p>Let's add a utility method to the Artist class that sets Artist date of birth, taking a string argument for the date:</p>
+<div class="code"><div class="codeHeader"><b>Artist.java</b></div><div class="codeContent">
+<pre class="code-java"><span class="code-keyword">package</span> cayenne.tutorial;
+
+<span class="code-keyword">import</span> java.text.ParseException;
+<span class="code-keyword">import</span> java.text.SimpleDateFormat;
+<span class="code-keyword">import</span> java.util.Date;
+
+<span class="code-keyword">import</span> cayenne.tutorial.auto._Artist;
+
+<span class="code-keyword">public</span> class Artist <span class="code-keyword">extends</span> _Artist {
+
+    <span class="code-keyword">static</span> <span class="code-keyword">final</span> <span class="code-object">String</span> DEFAULT_DATE_FORMAT = <span class="code-quote">"yyyyMMdd"</span>;
+
+    /**
+     * Sets date of birth using a string in format yyyyMMdd.
+     */
+    <span class="code-keyword">public</span> void setDateOfBirthString(<span class="code-object">String</span> yearMonthDay) {
+        <span class="code-keyword">if</span> (yearMonthDay == <span class="code-keyword">null</span>) {
+            setDateOfBirth(<span class="code-keyword">null</span>);
+        }
+        <span class="code-keyword">else</span> {
+            
+            Date date;
+            <span class="code-keyword">try</span> {
+                date = <span class="code-keyword">new</span> SimpleDateFormat(DEFAULT_DATE_FORMAT).parse(yearMonthDay);
+            }
+            <span class="code-keyword">catch</span> (ParseException e) {
+                <span class="code-keyword">throw</span> <span class="code-keyword">new</span> IllegalArgumentException(<span class="code-quote">"A date argument must be in format '"</span>
+                        + DEFAULT_DATE_FORMAT
+                        + <span class="code-quote">"': "</span>
+                        + yearMonthDay);
+            }
+
+            setDateOfBirth(date);
+        }
+    }
+}</pre>
+</div></div>
+
+
+<p>We'll continue by creating a bunch of new objects and saving them to the database.</p>
+
+<p>An object is created and registered with DataContext using "newObject" method. (Note that objects must be registered with DataContext to be persisted and to allow relationships with other objects.) Add this code to the "main" method:</p>
+
+<div class="code"><div class="codeHeader"><b>Main.java</b></div><div class="codeContent">
+<pre class="code-java">Artist picasso = (Artist) context.newObject(Artist.class);
+picasso.setName(<span class="code-quote">"Pablo Picasso"</span>);
+picasso.setDateOfBirthString(<span class="code-quote">"18811025"</span>);</pre>
+</div></div>
+
+<p>Note that at this point "picasso" object is only stored in memory and is not saved in teh database. Let's continue by adding a Metropolitan Museum gallery object and a few Picasso paintings:</p>
+
+<div class="code"><div class="codeHeader"><b>Main.java</b></div><div class="codeContent">
+<pre class="code-java">Gallery metropolitan = (Gallery) context.newObject(Gallery.class);
+metropolitan.setName(<span class="code-quote">"Metropolitan Museum of Art"</span>); 
+
+Painting girl = (Painting) context.newObject(Painting.class);
+girl.setName(<span class="code-quote">"Girl Reading at a Table"</span>);
+        
+Painting stein = (Painting) context.newObject(Painting.class);
+stein.setName(<span class="code-quote">"Gertrude Stein"</span>);</pre>
+</div></div>
+
+<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. <tt>picasso.addToPaintings(girl)</tt> has exactly the same effect as <tt>girl.setToArtist(picasso)</tt>).</p>
+
+<div class="code"><div class="codeHeader"><b>Main.java</b></div><div class="codeContent">
+<pre class="code-java">picasso.addToPaintings(girl);
+picasso.addToPaintings(stein);
+        
+girl.setGallery(metropolitan);
+stein.setGallery(metropolitan);</pre>
+</div></div>
+
+<p>Now lets save all five new objects:</p>
+
+<div class="code"><div class="codeHeader"><b>Main.java</b></div><div class="codeContent">
+<pre class="code-java">context.commitChanges();</pre>
+</div></div>
+
+<p>Now you can run the application again as described <a href="../../../../Documentation/User Guide/Quick Start/Tutorial DataContext/index.html" title="Tutorial DataContext">here</a>. The new output will look like this:</p>
+
+<div class="preformatted"><div class="preformattedContent">
+<pre>INFO  QueryLogger: Created connection pool: jdbc:derby:/Users/andrus/Desktop/testdb;create=true
+	Driver class: org.apache.derby.jdbc.EmbeddedDriver
+	Min. connections in the pool: 1
+	Max. connections in the pool: 1
+INFO  QueryLogger: Opening connection: jdbc:derby:/Users/andrus/Desktop/testdb;create=true
+	Login: null
+	Password: *******
+INFO  QueryLogger: +++ Connecting: SUCCESS.
+INFO  QueryLogger: Detected and installed adapter: org.objectstyle.cayenne.dba.derby.DerbyAdapter
+INFO  QueryLogger: SELECT NEXT_ID FROM AUTO_PK_SUPPORT WHERE TABLE_NAME = ? FOR UPDATE [bind: 'GALLERY']
+INFO  QueryLogger: --- transaction started.
+INFO  QueryLogger: SELECT NEXT_ID FROM AUTO_PK_SUPPORT WHERE TABLE_NAME = ? FOR UPDATE [bind: 'ARTIST']
+INFO  QueryLogger: SELECT NEXT_ID FROM AUTO_PK_SUPPORT WHERE TABLE_NAME = ? FOR UPDATE [bind: 'PAINTING']
+INFO  QueryLogger: --- will run 3 queries.
+INFO  QueryLogger: INSERT INTO GALLERY (ID, NAME) VALUES (?, ?)
+INFO  QueryLogger: [bind: 200, 'Metropolitan Museum of Art']
+INFO  QueryLogger: === updated 1 row.
+INFO  QueryLogger: INSERT INTO ARTIST (DATE_OF_BIRTH, ID, NAME) VALUES (?, ?, ?)
+INFO  QueryLogger: [bind: '1881-10-25 00:00:00.0', 200, 'Pablo Picasso']
+INFO  QueryLogger: === updated 1 row.
+INFO  QueryLogger: INSERT INTO PAINTING (ARTIST_ID, GALLERY_ID, ID, NAME) VALUES (?, ?, ?, ?)
+INFO  QueryLogger: [bind: 200, 200, 200, 'Girl Reading at a Table']
+INFO  QueryLogger: === updated 1 row.
+INFO  QueryLogger: [bind: 200, 200, 201, 'Gertrude Stein']
+INFO  QueryLogger: === updated 1 row.
+INFO  QueryLogger: +++ transaction committed.
+</pre>
+</div></div>
+
+<p>The first few SELECT's are done by Cayenne primary key generator (note that we did not assign any explicit PKs to the objects - Cayenne does this automatically). Following them are the statements generated to save the objects that we created.</p>
+
+<hr />
+<p><b>Next Step: <a href="../../../../Documentation/User Guide/Quick Start/Tutorial Mapping Query/index.html" title="Tutorial Mapping Query">Tutorial Mapping Query</a></b></p>
+<hr /></div>
+</div>
+  <div class="clearer">.</div>
+  <div style="height: 12px; background-image: url('../../../../images/border_bottom.gif'); background-repeat: repeat-x;"></div>
+
+  <div class="smalltext copyright">
+    Copyright &copy;2001-2006 ObjectStyle Group and content authors
+  </div>
+
+</body>
+</html>

Added: incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Delete/delete-rule.jpg
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User%20Guide/Quick%20Start/Tutorial%20Delete/delete-rule.jpg?rev=416596&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Delete/delete-rule.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Delete/index.html
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User%20Guide/Quick%20Start/Tutorial%20Delete/index.html?rev=416596&view=auto
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Delete/index.html (added)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Delete/index.html Fri Jun 23 00:45:11 2006
@@ -0,0 +1,109 @@
+<html>
+  <head>
+    <title>Cayenne Documentation - Tutorial Delete</title>
+    <style type="text/css">@import "../../../../style.css";</style>
+  </head>
+<body>
+  <div class="header">
+    <div style="float: left;"><a href="http://objectstyle.org/cayenne/"><img src="../../../../images/logo.gif" align="absmiddle" border="0"></a></div>
+    <span class="logoSpaceLink"><a href="../../../../index.html">Cayenne User Documentation</a></span><br />
+    <span class="pagetitle">Tutorial Delete</span>
+  </div>
+<div id="cayenne_toc">
+<ul>
+<li><a href="../../../../Documentation/User Guide/Introduction/index.html">Introduction</a></li>
+<li><a href="../../../../Documentation/User Guide/Installation/index.html">Installation</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/index.html">Quick Start</a><ul>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Setup/index.html">Tutorial Setup</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Starting Mapping Project/index.html">Tutorial Starting Mapping Project</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Object Relational Mapping/index.html">Tutorial Object Relational Mapping</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Generate Database and Java Classes/index.html">Tutorial Generate Database and Java Classes</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial DataContext/index.html">Tutorial DataContext</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial DataObjects/index.html">Tutorial DataObjects</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Mapping Query/index.html">Tutorial Mapping Query</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial SelectQuery/index.html">Tutorial SelectQuery</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Delete/index.html">Tutorial Delete</a><ul>
+</ul>
+</li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Webapp/index.html">Tutorial Webapp</a></li>
+</ul>
+</li>
+<li><a href="../../../../Documentation/User Guide/Design/index.html">Design</a></li>
+<li><a href="../../../../Documentation/User Guide/Generating Classes/index.html">Generating Classes</a></li>
+<li><a href="../../../../Documentation/User Guide/DataContext/index.html">DataContext</a></li>
+<li><a href="../../../../Documentation/User Guide/Queries/index.html">Queries</a></li>
+<li><a href="../../../../Documentation/User Guide/DataObjects/index.html">DataObjects</a></li>
+<li><a href="../../../../Documentation/User Guide/Stored Procedures/index.html">Stored Procedures</a></li>
+<li><a href="../../../../Documentation/User Guide/Expressions/index.html">Expressions</a></li>
+<li><a href="../../../../Documentation/User Guide/Performance Tuning/index.html">Performance Tuning</a></li>
+<li><a href="../../../../Documentation/User Guide/Deployment/index.html">Deployment</a></li>
+<li><a href="../../../../Documentation/User Guide/Ant Tasks/index.html">Ant Tasks</a></li>
+<li><a href="../../../../Documentation/User Guide/Access Stack Internals/index.html">Access Stack Internals</a></li>
+<li><a href="../../../../Documentation/User Guide/DataViews/index.html">DataViews</a></li>
+</ul>
+</div>
+<div id="ConfluenceContent"><p>Before we discuss the API for object deletion, lets go back to CayenneModeler and set up some <a href="../../../../Documentation/Modeler Guide/Modeling Object Layer/Delete Rules/index.html" title="Delete Rules">delete rules</a>. Doing this is optional but will simplify correct handling of the objects related to deleted  objects.</p>
+
+<ul>
+	<li>In the Modeler go to "Artist" ObjEntity, "Relationships" tab and select "Cascade" for the "paintings" relationship delete rule:</li>
+</ul>
+
+
+<p><img src="delete-rule.jpg" align="absmiddle" border="0" /></p>
+
+<ul>
+	<li>Repeat this step for Gallery (set "paintings" relationship to be "Cascade")</li>
+	<li>Repeat this step for Painting (set both relationships rules to "Nullify").</li>
+	<li>Save the mapping, and refresh the porject in Eclispe.</li>
+</ul>
+
+
+<ul>
+	<li>To delete an object we first need to get a hold of this object. Let's use utility class DataObjectUtils to find an artist:</li>
+</ul>
+
+
+<div class="code"><div class="codeHeader"><b>Main.java</b></div><div class="codeContent">
+<pre class="code-java">Expression qualifier = ExpressionFactory.matchExp(Artist.NAME_PROPERTY, <span class="code-quote">"Pablo Picasso"</span>);
+SelectQuery select = <span class="code-keyword">new</span> SelectQuery(Artist.class, qualifier);
+
+Artist picasso = (Artist) DataObjectUtils.objectForQuery(context, select);</pre>
+</div></div>
+
+<p>Now let's delete the artist:</p>
+<div class="code"><div class="codeHeader"><b>Main.java</b></div><div class="codeContent">
+<pre class="code-java"><span class="code-keyword">if</span> (picasso != <span class="code-keyword">null</span>) {
+    context.deleteObject(picasso);
+    context.commitChanges();
+}</pre>
+</div></div>
+
+<p>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:</p>
+
+<div class="preformatted"><div class="preformattedContent">
+<pre>INFO  QueryLogger: --- will run 2 queries.
+INFO  QueryLogger: --- transaction started.
+INFO  QueryLogger: DELETE FROM PAINTING WHERE ID = ?
+INFO  QueryLogger: [bind: 361]
+INFO  QueryLogger: === updated 1 row.
+INFO  QueryLogger: [bind: 360]
+INFO  QueryLogger: === updated 1 row.
+INFO  QueryLogger: DELETE FROM ARTIST WHERE ID = ?
+INFO  QueryLogger: [bind: 360]
+INFO  QueryLogger: === updated 1 row.
+INFO  QueryLogger: +++ transaction committed.</pre>
+</div></div>
+
+<hr />
+<p><b>Next Step: <a href="../../../../Documentation/User Guide/Quick Start/Tutorial Webapp/index.html" title="Tutorial Webapp">Tutorial Webapp</a></b></p>
+<hr /></div>
+</div>
+  <div class="clearer">.</div>
+  <div style="height: 12px; background-image: url('../../../../images/border_bottom.gif'); background-repeat: repeat-x;"></div>
+
+  <div class="smalltext copyright">
+    Copyright &copy;2001-2006 ObjectStyle Group and content authors
+  </div>
+
+</body>
+</html>

Added: incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Generate Database and Java Classes/class-generator.jpg
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User%20Guide/Quick%20Start/Tutorial%20Generate%20Database%20and%20Java%20Classes/class-generator.jpg?rev=416596&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Generate Database and Java Classes/class-generator.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Generate Database and Java Classes/db-generator.jpg
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User%20Guide/Quick%20Start/Tutorial%20Generate%20Database%20and%20Java%20Classes/db-generator.jpg?rev=416596&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Generate Database and Java Classes/db-generator.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Generate Database and Java Classes/eclipse-classes.jpg
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User%20Guide/Quick%20Start/Tutorial%20Generate%20Database%20and%20Java%20Classes/eclipse-classes.jpg?rev=416596&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Generate Database and Java Classes/eclipse-classes.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Generate Database and Java Classes/index.html
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User%20Guide/Quick%20Start/Tutorial%20Generate%20Database%20and%20Java%20Classes/index.html?rev=416596&view=auto
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Generate Database and Java Classes/index.html (added)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Generate Database and Java Classes/index.html Fri Jun 23 00:45:11 2006
@@ -0,0 +1,96 @@
+<html>
+  <head>
+    <title>Cayenne Documentation - Tutorial Generate Database and Java Classes</title>
+    <style type="text/css">@import "../../../../style.css";</style>
+  </head>
+<body>
+  <div class="header">
+    <div style="float: left;"><a href="http://objectstyle.org/cayenne/"><img src="../../../../images/logo.gif" align="absmiddle" border="0"></a></div>
+    <span class="logoSpaceLink"><a href="../../../../index.html">Cayenne User Documentation</a></span><br />
+    <span class="pagetitle">Tutorial Generate Database and Java Classes</span>
+  </div>
+<div id="cayenne_toc">
+<ul>
+<li><a href="../../../../Documentation/User Guide/Introduction/index.html">Introduction</a></li>
+<li><a href="../../../../Documentation/User Guide/Installation/index.html">Installation</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/index.html">Quick Start</a><ul>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Setup/index.html">Tutorial Setup</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Starting Mapping Project/index.html">Tutorial Starting Mapping Project</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Object Relational Mapping/index.html">Tutorial Object Relational Mapping</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Generate Database and Java Classes/index.html">Tutorial Generate Database and Java Classes</a><ul>
+</ul>
+</li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial DataContext/index.html">Tutorial DataContext</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial DataObjects/index.html">Tutorial DataObjects</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Mapping Query/index.html">Tutorial Mapping Query</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial SelectQuery/index.html">Tutorial SelectQuery</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Delete/index.html">Tutorial Delete</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Webapp/index.html">Tutorial Webapp</a></li>
+</ul>
+</li>
+<li><a href="../../../../Documentation/User Guide/Design/index.html">Design</a></li>
+<li><a href="../../../../Documentation/User Guide/Generating Classes/index.html">Generating Classes</a></li>
+<li><a href="../../../../Documentation/User Guide/DataContext/index.html">DataContext</a></li>
+<li><a href="../../../../Documentation/User Guide/Queries/index.html">Queries</a></li>
+<li><a href="../../../../Documentation/User Guide/DataObjects/index.html">DataObjects</a></li>
+<li><a href="../../../../Documentation/User Guide/Stored Procedures/index.html">Stored Procedures</a></li>
+<li><a href="../../../../Documentation/User Guide/Expressions/index.html">Expressions</a></li>
+<li><a href="../../../../Documentation/User Guide/Performance Tuning/index.html">Performance Tuning</a></li>
+<li><a href="../../../../Documentation/User Guide/Deployment/index.html">Deployment</a></li>
+<li><a href="../../../../Documentation/User Guide/Ant Tasks/index.html">Ant Tasks</a></li>
+<li><a href="../../../../Documentation/User Guide/Access Stack Internals/index.html">Access Stack Internals</a></li>
+<li><a href="../../../../Documentation/User Guide/DataViews/index.html">DataViews</a></li>
+</ul>
+</div>
+<div id="ConfluenceContent"><p>CayenneModeler can be used to generate both database schema and Java classes from the single XML model. Very often the database already exists and is maintained independently (e.g. by a DBA). In this case you won't have to go through the first part of this procedure.</p>
+
+<h3><a name="TutorialGenerateDatabaseandJavaClasses-CreatingDatabase"></a>Creating Database</h3>
+
+<ul>
+	<li>Click on the DataMap node on the left and then select <tt>"Tools &gt; Create Database Schema"</tt> from the menu. A connection dialog pops up with fields prefilled with the data you entered for the DataNode.</li>
+</ul>
+
+
+<ul>
+	<li>Leave it unchanged and click "Continue" - this will open a dialog with a SQL script and a number of generation options.</li>
+</ul>
+
+
+<ul>
+	<li>Leave the defaults on ("Create Tables", "Create FK Support", "Create Primary Key Support") and click "Generate" - the database with the tables mapped during previous steps will be created in the specified location. Since Derby uses a filesystem directory for the database, you can actually navigate to it and see that the database is there.</li>
+</ul>
+
+
+<p><img src="db-generator.jpg" align="absmiddle" border="0" /></p>
+
+<h3><a name="TutorialGenerateDatabaseandJavaClasses-CreatingJavaClasses"></a>Creating Java Classes</h3>
+
+<ul>
+	<li>Now select <tt>"Tools &gt; Generate Classes"</tt> menu.</li>
+	<li>For "Type" select "Standard Persistent Objects" if it is not already selected.</li>
+	<li>For the output directory select "cayenne-tutorial/src" directory of your Eclipse project</li>
+	<li>Click "Generate"</li>
+</ul>
+
+
+<p><img src="class-generator.jpg" align="absmiddle" border="0" /></p>
+
+<p>Note that often you start by generating classes from the Modeler, but at the later stages of the project the generation is usually automated via <a href="../../../../Documentation/User Guide/Ant Tasks/cgen/index.html" title="cgen">Ant cgen task</a>. Both methods are interchangeable.</p>
+
+<p>Now go back to Eclipse, right click on "cayenne-tutorial" project and select "Refresh" - you should see a pair of classes generated for each mapped entity. Note that you should not modify the classes whose names start with "_" (underscore), as they will be replaced on subsequent generator runs. Instead all custom logic should be placed in their subclasses located in <tt>"cayenne.tutorial"</tt> package - those will never be overwritten by the class generator.</p>
+
+<p><img src="eclipse-classes.jpg" align="absmiddle" border="0" /></p>
+
+<hr />
+<p><b>Next Step: <a href="../../../../Documentation/User Guide/Quick Start/Tutorial DataContext/index.html" title="Tutorial DataContext">Tutorial DataContext</a></b></p>
+<hr /></div>
+</div>
+  <div class="clearer">.</div>
+  <div style="height: 12px; background-image: url('../../../../images/border_bottom.gif'); background-repeat: repeat-x;"></div>
+
+  <div class="smalltext copyright">
+    Copyright &copy;2001-2006 ObjectStyle Group and content authors
+  </div>
+
+</body>
+</html>

Added: incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Mapping Query/index.html
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User%20Guide/Quick%20Start/Tutorial%20Mapping%20Query/index.html?rev=416596&view=auto
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Mapping Query/index.html (added)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-other/wiki-docs/Documentation/User Guide/Quick Start/Tutorial Mapping Query/index.html Fri Jun 23 00:45:11 2006
@@ -0,0 +1,119 @@
+<html>
+  <head>
+    <title>Cayenne Documentation - Tutorial Mapping Query</title>
+    <style type="text/css">@import "../../../../style.css";</style>
+  </head>
+<body>
+  <div class="header">
+    <div style="float: left;"><a href="http://objectstyle.org/cayenne/"><img src="../../../../images/logo.gif" align="absmiddle" border="0"></a></div>
+    <span class="logoSpaceLink"><a href="../../../../index.html">Cayenne User Documentation</a></span><br />
+    <span class="pagetitle">Tutorial Mapping Query</span>
+  </div>
+<div id="cayenne_toc">
+<ul>
+<li><a href="../../../../Documentation/User Guide/Introduction/index.html">Introduction</a></li>
+<li><a href="../../../../Documentation/User Guide/Installation/index.html">Installation</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/index.html">Quick Start</a><ul>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Setup/index.html">Tutorial Setup</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Starting Mapping Project/index.html">Tutorial Starting Mapping Project</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Object Relational Mapping/index.html">Tutorial Object Relational Mapping</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Generate Database and Java Classes/index.html">Tutorial Generate Database and Java Classes</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial DataContext/index.html">Tutorial DataContext</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial DataObjects/index.html">Tutorial DataObjects</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Mapping Query/index.html">Tutorial Mapping Query</a><ul>
+</ul>
+</li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial SelectQuery/index.html">Tutorial SelectQuery</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Delete/index.html">Tutorial Delete</a></li>
+<li><a href="../../../../Documentation/User Guide/Quick Start/Tutorial Webapp/index.html">Tutorial Webapp</a></li>
+</ul>
+</li>
+<li><a href="../../../../Documentation/User Guide/Design/index.html">Design</a></li>
+<li><a href="../../../../Documentation/User Guide/Generating Classes/index.html">Generating Classes</a></li>
+<li><a href="../../../../Documentation/User Guide/DataContext/index.html">DataContext</a></li>
+<li><a href="../../../../Documentation/User Guide/Queries/index.html">Queries</a></li>
+<li><a href="../../../../Documentation/User Guide/DataObjects/index.html">DataObjects</a></li>
+<li><a href="../../../../Documentation/User Guide/Stored Procedures/index.html">Stored Procedures</a></li>
+<li><a href="../../../../Documentation/User Guide/Expressions/index.html">Expressions</a></li>
+<li><a href="../../../../Documentation/User Guide/Performance Tuning/index.html">Performance Tuning</a></li>
+<li><a href="../../../../Documentation/User Guide/Deployment/index.html">Deployment</a></li>
+<li><a href="../../../../Documentation/User Guide/Ant Tasks/index.html">Ant Tasks</a></li>
+<li><a href="../../../../Documentation/User Guide/Access Stack Internals/index.html">Access Stack Internals</a></li>
+<li><a href="../../../../Documentation/User Guide/DataViews/index.html">DataViews</a></li>
+</ul>
+</div>
+<div id="ConfluenceContent"><p>Now that we've got a feel of how <a href="../../../../Documentation/User Guide/Quick Start/Tutorial DataContext/index.html" title="Tutorial DataContext">DataContext works</a> and how to <a href="../../../../Documentation/User Guide/Quick Start/Tutorial DataObjects/index.html" title="Tutorial DataObjects">create and save objects</a>, let's take a small diversion and implement a piece of code that will delete all data from the database every time the tutorial application is started. We'll learn how to map a raw SQL query with parameters using the modeler and then execute it in the code.</p>
+
+<ul>
+	<li>Open CayenneModeler, go to <tt>"File &gt; Recent Files"</tt> and choose the tutorial mapping file.</li>
+	<li>When the project opens, select the DataMap, and click on "Create Query" button (or select "<tt>Project &gt; Create Query</tt>" from the menu).</li>
+	<li>For the query type select "Raw SQL" and click "Create".</li>
+	<li>For "Query Name" enter "DeleteAll" - this will be the key used to reference query later in the code:</li>
+</ul>
+
+
+<p><img src="sql-template.jpg" align="absmiddle" border="0" /></p>
+
+<p>Ignore "Select Properties" settings as the query will not select anything. Rather it will delete all rows from the table with name specified as a parameter.  </p>
+
+<ul>
+	<li>Go to "SQL Scripts" tab and enter the following in the right panel:</li>
+</ul>
+
+
+<div class="preformatted"><div class="preformattedContent">
+<pre>delete from $table</pre>
+</div></div>
+
+<p>Note that "$table" is a variable that will be dynamically substituted by Cayenne in runtime with the table name. (Detailed discussion of SQLTemplate scripting options is provided <a href="../../../../Documentation/User Guide/Queries/Scripting SQLTemplate/index.html" title="Scripting SQLTemplate">here</a>).</p>
+
+<ul>
+	<li>Query mapping is complete. Save the project in the Modeler and go back to Eclipse.</li>
+	<li>In Eclipse, refresh the mapping by right-clicking on cayenne-tutorial project and selecting "Refresh".</li>
+	<li>Now add the following code inserting it after the DataContext creation line and before any other code:</li>
+</ul>
+
+
+<div class="code"><div class="codeHeader"><b>Main.java</b></div><div class="codeContent">
+<pre class="code-java">QueryChain chain = <span class="code-keyword">new</span> QueryChain();
+chain.addQuery(<span class="code-keyword">new</span> NamedQuery(<span class="code-quote">"DeleteAll"</span>, Collections.singletonMap(
+                <span class="code-quote">"table"</span>,
+                <span class="code-quote">"PAINTING"</span>)));
+chain.addQuery(<span class="code-keyword">new</span> NamedQuery(<span class="code-quote">"DeleteAll"</span>, Collections.singletonMap(
+                <span class="code-quote">"table"</span>,
+                <span class="code-quote">"ARTIST"</span>)));
+chain.addQuery(<span class="code-keyword">new</span> NamedQuery(<span class="code-quote">"DeleteAll"</span>, Collections.singletonMap(
+                <span class="code-quote">"table"</span>,
+                <span class="code-quote">"GALLERY"</span>)));
+
+context.performGenericQuery(chain);</pre>
+</div></div>
+
+<p>Note that since we need to run the same query three times with different sets of parameters, first we created a <tt><a href="../../../../Documentation/User Guide/Queries/QueryChain/index.html" title="QueryChain">QueryChain</a></tt> that can hold other queries. Then we added three <tt><a href="../../../../Documentation/User Guide/Queries/NamedQuery/index.html" title="NamedQuery">NamedQueries</a></tt> (the order is important - painting has to be deleted before artist or gallery due to the foreign key constraints). NamedQuery is a query that is a reference to another query mapped via CayenneModeler (in this case - a query called "DeleteAll" that we mapped above).</p>
+
+<p>Now we can re-run the application and see the following output in the beginning of the log:</p>
+
+<div class="preformatted"><div class="preformattedContent">
+<pre>INFO  QueryLogger: delete from PAINTING
+INFO  QueryLogger: === updated 2 rows.
+INFO  QueryLogger: delete from ARTIST
+INFO  QueryLogger: === updated 1 row.
+INFO  QueryLogger: delete from GALLERY
+INFO  QueryLogger: === updated 1 row.</pre>
+</div></div>
+
+<p>Note that raw sql queries above (aka <a href="../../../../Documentation/User Guide/Queries/SQLTemplate Query/index.html" title="SQLTemplate Query">SQLTemplates</a>) are run directly against the database bypassing Cayenne object layer. If instead of bulk delete you needed to delete individual objects, you should do so using <tt>DataContext.deleteObject(..)</tt> as discussed <a href="../../../../Documentation/User Guide/Quick Start/Tutorial Delete/index.html" title="Tutorial Delete">here</a>.</p>
+
+<hr />
+<p><b>Next Step: <a href="../../../../Documentation/User Guide/Quick Start/Tutorial SelectQuery/index.html" title="Tutorial SelectQuery">Tutorial SelectQuery</a></b></p>
+<hr /></div>
+</div>
+  <div class="clearer">.</div>
+  <div style="height: 12px; background-image: url('../../../../images/border_bottom.gif'); background-repeat: repeat-x;"></div>
+
+  <div class="smalltext copyright">
+    Copyright &copy;2001-2006 ObjectStyle Group and content authors
+  </div>
+
+</body>
+</html>