cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r829552 [2/6] - in /cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation: ./ Cayenne Guide/Ant Tasks/ Cayenne Guide/Ant Tasks/cdataport/ Cayenne Guide/Ant Tasks/cdbgen/ Cayenne Guide/Ant Tasks/cdbimport/ Cayenne Guide/Ant Tasks/...
Date Sun, 25 Oct 2009 12:06:25 GMT
Modified: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/Accessing PK and FK Values/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/DataObjects/Accessing%20PK%20and%20FK%20Values/index.html?rev=829552&r1=829551&r2=829552&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/Accessing PK and FK Values/index.html (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/Accessing PK and FK Values/index.html Sun Oct 25 12:06:20 2009
@@ -63,19 +63,20 @@
 </div>
 <div id="ConfluenceContent"><p>Normally it is not advisable to map primary and foreign key columns (PK and FK) as Java class properties (ObjAttributes). When reverse engineering of the database is done using CayenneModeler, the generated mapping will reflect that PKs and FKs will not be included in the Java class. However, sometimes an application requires access to these values.</p>
 
-<table cellpadding='5' width='85%' cellspacing='8px' class='infoMacro' border="0" align='center'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../../images/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>For an easier way to obtain an object primary key or to find an object from a known PK, skip to the chapter on the <a href="../../../../Documentation/Cayenne Guide/DataObjects/DataObjectUtils/index.html" title="DataObjectUtils">DataObjectUtils</a> class.</td></tr></table>
+<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../../images/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>For an easier way to obtain an object primary key or to find an object from a known PK, skip to the chapter on the <a href="../../../../Documentation/Cayenne Guide/DataObjects/DataObjectUtils/index.html" title="DataObjectUtils">DataObjectUtils</a> class.</td></tr></table></div>
 
 <p>Cayenne provides a generic way to access primary and foreign keys by creating custom get* methods in the DataObject subclass. Lets take a Painting class as an example. The following code is generated by CayenneModeler:</p>
 
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java"><span class="code-keyword">package</span> org.apache.art;
 
 <span class="code-keyword">public</span> class Painting <span class="code-keyword">extends</span> org.apache.art.auto._Painting {
 
-}</pre>
+}
+</pre>
 </div></div>
 
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java"><span class="code-keyword">package</span> org.apache.art.auto;
 
 /** <span class="code-object">Class</span> _Painting was generated by Cayenne.
@@ -108,14 +109,15 @@
         <span class="code-keyword">return</span> (<span class="code-object">String</span>)readProperty(<span class="code-quote">"paintingTitle"</span>);
     }
 ...
-}</pre>
+}
+</pre>
 </div></div>
 
 <p>The following custom methods should be added to the Painting class to access the values of ARTIST_ID and PAINTING_ID:</p>
 
-<table cellpadding='5' width='85%' cellspacing='8px' class='infoMacro' border="0" align='center'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../../images/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>If you perform class generation using Ant, you can customize class generation templates to generate these methods for you. Eventually CayenneModeler will support this too as optional functionality.</td></tr></table>
+<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../../images/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>If you perform class generation using Ant, you can customize class generation templates to generate these methods for you. Eventually CayenneModeler will support this too as optional functionality.</td></tr></table></div>
 
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java"><span class="code-keyword">package</span> org.apache.art;
 
 <span class="code-keyword">public</span> class Painting <span class="code-keyword">extends</span> org.apache.art.auto._Painting {
@@ -133,7 +135,8 @@
                ? (<span class="code-object">Integer</span>)artist.getObjectId().getIdSnapshot().get(Artist.ARTIST_ID_PK_COLUMN) 
                : <span class="code-keyword">null</span>;
    }
-}</pre>
+}
+</pre>
 </div></div></div>
 </div>
   <div class="clearer">.</div>

Modified: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/DataObject Validation/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/DataObjects/DataObject%20Validation/index.html?rev=829552&r1=829551&r2=829552&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/DataObject Validation/index.html (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/DataObject Validation/index.html Sun Oct 25 12:06:20 2009
@@ -90,7 +90,7 @@
 
 <p>Custom validation method implementation would normally append any failures to the provided ValidationResult instance. After validating all non-committed objects, DataContext (or rather its ObjectStore) will check if the ValidationResult is not empty, and throw an exception if there is at least one failure. Typical custom validation method would look like that:</p>
 
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java"><span class="code-keyword">public</span> class Painting <span class="code-keyword">extends</span> _Painting {
    ...
    <span class="code-keyword">protected</span> void validateForSave(ValidationResult validationResult) {
@@ -105,7 +105,8 @@
 </span>      }
    }
    ...
-}</pre>
+}
+</pre>
 </div></div>
 
 <h2><a name="DataObjectValidation-ValidationMethodswithSideEffects"></a>Validation Methods with Side Effects</h2>

Modified: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/DataObjectUtils/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/DataObjects/DataObjectUtils/index.html?rev=829552&r1=829551&r2=829552&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/DataObjectUtils/index.html (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/DataObjectUtils/index.html Sun Oct 25 12:06:20 2009
@@ -63,18 +63,19 @@
 </div>
 <div id="ConfluenceContent"><p>DataObjectUtils class provides an important and easy to use facility to obtain a primary key value from a DataObject and to locate a DataObject in the database for a known primary key. Both operations work in a generic fashion and do not require primary key to be an object property.</p>
 
-<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">Security Warning</b><br />DataObjectUtils make it very easy to use a primary key value as a universal "code" for an object in web forms and URLs. This opens a potential security hole in the interface. If application code is not careful enough, a malicious user can gain access to the information she is not allowed to see (e.g. other people's accounts) simply by trying a series of sequential numbers. So, for example, it is probably okay to use product PK to build a bookmarkable link to a catalog product, but it may not be appropriate to do that for a private user profile record.</td></tr></table>
+<div class='panelMacro'><table class='warningMacro'><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>Security Warning</b><br />DataObjectUtils make it very easy to use a primary key value as a universal "code" for an object in web forms and URLs. This opens a potential security hole in the interface. If application code is not careful enough, a malicious user can gain access to the information she is not allowed to see (e.g. other people's accounts) simply by trying a series of sequential numbers. So, for example, it is probably okay to use product PK to build a bookmarkable link to a catalog product, but it may not be appropriate to do that for a private user profile record.</td></tr></table></div>
 
 <p>DataObjectUtils API is really straightforward and self-explanatory. It supports the most common case of a single column integer primary key, but also a more generic case of an arbitrary PK (that can also be compound, i.e. consist of more than one column). Here is an example:</p>
 
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java"><span class="code-comment">// obtain PK to build a bookmarkable artist page URL
 </span>Artist artist = ...;
 <span class="code-object">int</span> artistID = DataObjectUtils.intPKForObject(artist);
-<span class="code-object">String</span> artistURL = <span class="code-quote">"http:<span class="code-comment">//www.example.org/catalogapp/artists?a="</span> + artistID;</span></pre>
+<span class="code-object">String</span> artistURL = <span class="code-quote">"http:<span class="code-comment">//www.example.org/catalogapp/artists?a="</span> + artistID;</span>
+</pre>
 </div></div>
 
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java"><span class="code-comment">// find an artist from URL parameters
 </span>HttpServletRequest request = ...;
 DataContext context = ...;
@@ -82,7 +83,8 @@
 
 <span class="code-keyword">if</span>(idString != <span class="code-keyword">null</span>) {
   Artist artist = DataObjectUtils.objectForPK(context, Artist.class, <span class="code-object">Integer</span>.parseInt(idString));
-}</pre>
+}
+</pre>
 </div></div></div>
 </div>
   <div class="clearer">.</div>

Modified: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/DataObjects Example/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/DataObjects/DataObjects%20Example/index.html?rev=829552&r1=829551&r2=829552&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/DataObjects Example/index.html (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/DataObjects Example/index.html Sun Oct 25 12:06:20 2009
@@ -62,7 +62,7 @@
 </ul>
 </div>
 <div id="ConfluenceContent"><p>As discussed in <a href="../../../../Documentation/Cayenne Guide/DataObjects/index.html" title="DataObjects">DataContext</a> chapter, any changes made to the DataObjects via "set*" methods are synchronized with the database by calling <tt>DataContext.commitChanges</tt>. Here is an example showing how the <tt>Painting</tt> object is fetched, modified and saved back. The following modifications are performed: the price of the first retrieved painting is doubled, a new painting is added that belongs to the same artist as the painting fetched before:</p>
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java"><span class="code-keyword">import</span> java.math.BigDecimal;
 <span class="code-keyword">import</span> java.util.List;
 <span class="code-keyword">import</span> org.apache.cayenne.access.DataContext;
@@ -106,10 +106,11 @@
   <span class="code-comment">// save all the changes we've made so far
 </span>  ctxt.commitChanges();
 }
-...</pre>
+...
+</pre>
 </div></div>
 <p>If SQL tracing is turned on, and depending on the preexisting data in the database, the following SQL statements might be printed to console during the commit phase:</p>
-<div class="preformatted"><div class="preformattedContent">
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
 <pre>[main 12-22 15:50:19] QueryLogger: --- will run 2 queries.
 [main 12-22 15:50:19] QueryLogger: INSERT INTO PAINTING (PAINTING_ID, PAINTING_TITLE, ESTIMATED_PRICE,
  ARTIST_ID) VALUES (?, ?, ?, ?) [params: 200, 'Sunset as it is', 5000000, 10]

Modified: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/Deleting Objects/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/DataObjects/Deleting%20Objects/index.html?rev=829552&r1=829551&r2=829552&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/Deleting Objects/index.html (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/Deleting Objects/index.html Sun Oct 25 12:06:20 2009
@@ -61,27 +61,29 @@
 <li><a href="../../../../Documentation/Cayenne Guide/Customization/index.html">Customization</a></li>
 </ul>
 </div>
-<div id="ConfluenceContent"><p>As discussed before, an object must be deleted in the DataContext to trigger a removal of the corresponding row from the database on commit. There are few simple ways to delete individual objects and collections of objects. Quite naturally, a delete operation changes the object state to PersistenceState.DELETED. However there maybe other consequences of such operation for the overall object graph. Such consequences are controlled via <a href="../../../../Documentation/Modeler Guide/Modeling Object Layer/Delete Rules/index.html" title="Delete Rules">delete rules</a> configured for object relationships. Properly configuring delete rules will simplify the application code, as you no longer need to track related objects and do the right thing with them. Other delete rule effects are discussed for each DataContext deletion method individually.</p>
+<div id="ConfluenceContent"><p>As discussed before, an object must be deleted in the DataContext to trigger a removal of the corresponding row from the database on commit. There are few simple ways to delete individual objects and collections of objects. Quite naturally, a delete operation changes the object state to PersistenceState.DELETED. However there maybe other consequences of such operation for the overall object graph. Such consequences are controlled via <a href="../../../../Documentation/Modeler Guide/Modeling Object Layer/Delete Rules/index.html" title="Delete Rules">Delete Rules</a> configured for object relationships. Properly configuring delete rules will simplify the application code, as you no longer need to track related objects and do the right thing with them. Other delete rule effects are discussed for each DataContext deletion method individually.</p>
 
 <h5><a name="DeletingObjects-Deletingasingleobject"></a>Deleting a single object</h5>
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">DataContext context = ...;
 Artist artist = ....;
 
 <span class="code-comment">// <span class="code-keyword">this</span> will trigger delete rules <span class="code-keyword">for</span> artist, <span class="code-keyword">if</span> any
-</span>context.deleteObject(artist);</pre>
+</span>context.deleteObject(artist);
+</pre>
 </div></div>
 <h5><a name="DeletingObjects-Deletingacollectionofobjects"></a>Deleting a collection of objects</h5>
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">DataContext context = ...;
 Artist artist = ....;
 
-context.deleteObjects(artist.getPaintings());</pre>
+context.deleteObjects(artist.getPaintings());
+</pre>
 </div></div>
 <h5><a name="DeletingObjects-DeletinginanIterator"></a>Deleting in an Iterator</h5>
 <p>This case can be complicated if an iteration is performed over a relationship list and an object being deleted has a nullify delete rule. Such combination may result in ConcurrencyModificationExceptions as collection underlying the iterator is being modified. If ALL objects in the collection have to be deleted, use "deleteObjects()" method shown above - it will do the right thing. If only a subset of collection objects has to be deleted, you can use the following technique:</p>
 
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">DataContext context = ...;
 Artist artist = ....;
 
@@ -96,7 +98,8 @@
       <span class="code-comment">// now <span class="code-keyword">do</span> the actual delete
 </span>      context.deleteObject(object); 
    }
-}</pre>
+}
+</pre>
 </div></div></div>
 </div>
   <div class="clearer">.</div>

Modified: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/Flattened Relationships/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/DataObjects/Flattened%20Relationships/index.html?rev=829552&r1=829551&r2=829552&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/Flattened Relationships/index.html (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/Flattened Relationships/index.html Sun Oct 25 12:06:20 2009
@@ -61,9 +61,24 @@
 <li><a href="../../../../Documentation/Cayenne Guide/Customization/index.html">Customization</a></li>
 </ul>
 </div>
-<div id="ConfluenceContent">
-<p>Flattened relationships represent relationship between two types of DataObjects that is not direct in the underlying relational storage. Instead it is mapped across one or more "join" tables. Still from the application point of view there is no diffrence in working with flattened relationships compared to the "normal" ones. Cayenne internally figures out how to build the needed query joins to retrieve related objects. On adding or removing an object to/from a flattened relationship via a corresponding "addTo..." / "removeFrom..." method an appropriate join record is created or removed.</p>
-<table cellpadding='5' width='85%' cellspacing='8px' class='infoMacro' border="0" align='center'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../../images/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b class="strong">Flattened Relationships Limitations</b><br />Currently only many-to-many flattened relatationships with a single join table can be modified. All other types of flattened relationships can be used as "read-only". This is reflected in the DataObject code generated for such relationships - no set/addTo/RemoveFrom methods are created for read-only relationships.</td></tr></table></div>
+<div id="ConfluenceContent"><p>Flattened relationships are a fancy term for a relationship which involves three or more tables in the database. Lets say you have Artists and Exhibits. They are joined with a many-many join table called Artist_Exhibit, because many Artists could collaborate on one Exhibit and each Artist might be part of many Exhibits. Now you could map these as separate joins and end up with Java code which looks like this:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">artist.getArtistExhibits().getExhibits()
+</pre>
+</div></div>
+
+<p>but with a flattened join, it is even simpler:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">artist.getExhibits()
+</pre>
+</div></div>
+
+<p>From the application point of view there is no difference in working with flattened relationships compared to the "normal" ones. Cayenne internally figures out how to build the needed query joins to retrieve related objects. On adding or removing an object to/from a flattened relationship via a corresponding "addTo..." / "removeFrom..." method an appropriate join record is created or removed.</p>
+<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../../images/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Flattened Relationships Limitations</b><br />Only many-to-many flattened relatationships with a single join table can be modified. All other types of flattened relationships can be used as "read-only". This is reflected in the DataObject code generated for such relationships - no set/addTo/RemoveFrom methods are created for read-only relationships.</td></tr></table></div>
+
+<p>See this documentation on how to <a href="../../../../Documentation/Modeler Guide/Modeling Object Layer/CayenneModeler Flattened Relationships/index.html" title="CayenneModeler Flattened Relationships">create flattened relationships in Cayenne Modeler</a></p></div>
 </div>
   <div class="clearer">.</div>
   <div style="height: 12px; background-image: url('../../../../images/border_bottom.gif'); background-repeat: repeat-x;"></div>

Modified: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/Generic Persistent Class/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/DataObjects/Generic%20Persistent%20Class/index.html?rev=829552&r1=829551&r2=829552&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/Generic Persistent Class/index.html (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/Generic Persistent Class/index.html Sun Oct 25 12:06:20 2009
@@ -65,15 +65,14 @@
 
 <p>Each kind of persistent objects (such as "Artist" or "Painting") is described in Cayenne by a single ObjEntity. The most common and useful scenario is mapping an ObjEntity to a "specialized" Java class, one class per entity. But there is an alternative - use a single generic persistent object class to map any entity.</p>
 
-<table cellpadding='5' width='85%' cellspacing='8px' class='tipMacro' border="0" align='center'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../../images/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b class="strong">Generic DataObject hints</b><br />
-<ul>
+<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../../images/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Generic DataObject hints</b><br /><ul>
 	<li>Accessing generic objects is done via DataObject API (see examples below).</li>
 	<li>The simplest "generic" object class for all practical purposes is <tt>CayenneDataObject</tt>.</li>
 	<li>"Concrete" DataObject classes are by definition "generic" as they implement <tt>DataObject</tt>.</li>
 </ul>
-</td></tr></table>
+</td></tr></table></div>
 
-<table cellpadding='5' width='85%' cellspacing='8px' class='tipMacro' border="0" align='center'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../../images/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b class="strong">When to Use Generic Objects</b><br />Generic objects are not type-safe and are not convenient for manual coding. Most applications should stick to concrete classes. Generic objects are useful in cases when all persistent properties are not fully known at compile time. It is also possible to use a hybrid approach when new persistent properties are added to the existing concrete class at runtime.</td></tr></table>
+<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../../images/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>When to Use Generic Objects</b><br />Generic objects are not type-safe and are not convenient for manual coding. Most applications should stick to concrete classes. Generic objects are useful in cases when all persistent properties are not fully known at compile time. It is also possible to use a hybrid approach when new persistent properties are added to the existing concrete class at runtime.</td></tr></table></div>
 
 <h2><a name="GenericPersistentClass-MappinginCayenneModeler"></a>Mapping in CayenneModeler</h2>
 
@@ -90,53 +89,60 @@
 
 <p>Create a new object:</p>
 
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">DataContext context = ...;
-DataObject author = (DataObject) context.newObject(<span class="code-quote">"Person"</span>);</pre>
+DataObject author = (DataObject) context.newObject(<span class="code-quote">"Person"</span>);
+</pre>
 </div></div>
 
 <p>Create a new object when using a generic ObjectContext that does not define "newObject(String)" method. In this case we must set ObjectId explicitly - this will tell Cayenne what entity the generic object belongs to:</p>
 
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">ObjectContext context = ...;
 DataObject author = <span class="code-keyword">new</span> CayenneDataObject();
 author.setObjectId(<span class="code-keyword">new</span> ObjectId(<span class="code-quote">"Person"</span>));
-context.registerNewObject(author);</pre>
+context.registerNewObject(author);
+</pre>
 </div></div>
 
 
 <p>Build SelectQuery:</p>
 
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">Expression e = ExpressionFactory.likeIgnoreCaseExp(<span class="code-quote">"subject"</span>, <span class="code-quote">"%first%"</span>);
-SelectQuery q = <span class="code-keyword">new</span> SelectQuery(<span class="code-quote">"Message"</span>, e);</pre>
+SelectQuery q = <span class="code-keyword">new</span> SelectQuery(<span class="code-quote">"Message"</span>, e);
+</pre>
 </div></div>
 
 <h4><a name="GenericPersistentClass-UseDataObjectAPItoread%2Fwritethevaluesinsteadorgetters%2Fsetters."></a>Use DataObject API to read/write the values instead or getters/setters.</h4>
 
 <p>Determine object entity name:</p>
 
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">DataObject object = ...;
-<span class="code-object">String</span> entityName = object.getObjectId().getEntityName();</pre>
+<span class="code-object">String</span> entityName = object.getObjectId().getEntityName();
+</pre>
 </div></div>
 
 <p>Read a simple property value (attribute or relationship):</p>
 
-<div class="code"><div class="codeContent">
-<pre class="code-java"><span class="code-object">String</span> subject = (<span class="code-object">String</span>) object.readProperty(<span class="code-quote">"subject"</span>);</pre>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java"><span class="code-object">String</span> subject = (<span class="code-object">String</span>) object.readProperty(<span class="code-quote">"subject"</span>);
+</pre>
 </div></div>
 
 <p>Read a "nested" property value spanning a chain of DataObjects:</p>
 
-<div class="code"><div class="codeContent">
-<pre class="code-java"><span class="code-object">String</span> name = (<span class="code-object">String</span>) object.readNestedProperty(<span class="code-quote">"author.lastName"</span>);</pre>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java"><span class="code-object">String</span> name = (<span class="code-object">String</span>) object.readNestedProperty(<span class="code-quote">"author.lastName"</span>);
+</pre>
 </div></div>
 
 <p>Modify a property value:</p>
 
-<div class="code"><div class="codeContent">
-<pre class="code-java">object.writeProperty(<span class="code-quote">"subject"</span>, <span class="code-quote">"Post On Topic"</span>);</pre>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">object.writeProperty(<span class="code-quote">"subject"</span>, <span class="code-quote">"Post On Topic"</span>);
+</pre>
 </div></div></div>
 </div>
   <div class="clearer">.</div>

Modified: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/Handling Inheritance/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/DataObjects/Handling%20Inheritance/index.html?rev=829552&r1=829551&r2=829552&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/Handling Inheritance/index.html (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/Handling Inheritance/index.html Sun Oct 25 12:06:20 2009
@@ -61,58 +61,24 @@
 <li><a href="../../../../Documentation/Cayenne Guide/Customization/index.html">Customization</a></li>
 </ul>
 </div>
-<div id="ConfluenceContent">
-<p>"Inheritance" is an Object Oriented concept absent in traditional RDBMS. Cayenne however allows to map a hierarchical class tree to a single base table (so called "single table inheritance"). Such mapping is described in detail in the <a href="../../../../Documentation/Modeler Guide/Modeling Object Layer/Modeling Inheritance/index.html" title="Modeling Inheritance">Modeler Guide</a>. The idea of single table inheritance is that a "class" of a database row is determined from the values in one or more columns of the base table. These columns are called "class designator columns".</p>
-
-<table cellpadding='5' width='85%' cellspacing='8px' class='infoMacro' border="0" align='center'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../../images/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b class="strong">Initial Values of the Classs Designator Columns</b><br />Assigning correct values to the "class designator columns" mentioned above is one task that is not yet automated in Cayenne and requires user code in the DataObject, as discussed in the next subsection. In the future versions this will likely be handled in the mapping and completely outside of the Java classes, so the advise below will become obsolete.</td></tr></table>
+<div id="ConfluenceContent"><p>"Inheritance" is an Object Oriented concept absent in traditional RDBMS. Cayenne however allows to map a hierarchical class tree to a single base table (so called "single table inheritance"). Such mapping is described in detail in the <a href="../../../../Documentation/Modeler Guide/Modeling Object Layer/Modeling Inheritance/index.html" title="Modeling Inheritance">Modeler Guide</a>. The idea of single table inheritance is that a "class" of a database row is determined from the values in one or more columns of the base table. These columns are called "class designator columns".</p>
 
 <h3><a name="HandlingInheritance-InheritanceandnewDataObjects"></a>Inheritance and new DataObjects</h3>
 <p>Consider the following class hierarchy (also used in the Modeler Guide example):<br/>
 <img src="inheritance-diagram.jpg" align="absmiddle" border="0" /></p>
 
-<p>If a class designator column is "PERSON_TYPE", AbstractPerson class should define an attribute (for instance called "personType") that maps to PERSON_TYPE. This attribute is redundant and meanigless in Java, since person type is defined already by the Java class of the object, however we still have to keep it around so that when the new objects are saved, correct PERSON_TYPE data is stored in the database. Currently it is a developer responsibility to set "personType" value (or values of any other attributes that map to "class designator columns") when the new object is registered with DataContext. One way to take care of this is to override "setPersistenceState(..)" method on each DataObject class in the inheritance hierarchy to catch when the object is registered with DataContext:</p>
+<p>If a class designator column is "PERSON_TYPE", AbstractPerson class should define an attribute (for instance called "personType") that maps to PERSON_TYPE. This attribute is redundant and meanigless in Java, since person type is defined already by the Java class of the object, however we still have to keep it around so that when the new objects are saved, correct PERSON_TYPE data is stored in the database. </p>
 
-<div class="code"><div class="codeContent">
-<pre class="code-java"><span class="code-keyword">public</span> class Employee <span class="code-keyword">extends</span> _Employee {
-    <span class="code-keyword">public</span> void setPersistenceState(<span class="code-object">int</span> state) {
-        <span class="code-keyword">super</span>.setPersistenceState(state);
-        
-        <span class="code-comment">// <span class="code-keyword">if</span> object was just created
-</span>        <span class="code-keyword">if</span>(state == PersistenceState.NEW) {
-           setPersonType(<span class="code-quote">"EMPLOYEE"</span>);
-        }
-    }
-...
-}
+<p>Cayenne 3.0 has an ability to inject values of designator columns in new objects automatically. In the example above, if ObjEntity Employee has declared qualifier "personType='EMPLOYEE'", a new Employee instance, created using "context.newObject(Employee.class)" will already have a personType attribute set to "EMPLOYEE".</p>
 
-<span class="code-keyword">public</span> class Manager <span class="code-keyword">extends</span> _Manager {
-    <span class="code-keyword">public</span> void setPersistenceState(<span class="code-object">int</span> state) {
-        <span class="code-keyword">super</span>.setPersistenceState(state);
-        
-        <span class="code-comment">// <span class="code-keyword">if</span> object was just created
-</span>        <span class="code-keyword">if</span>(state == PersistenceState.NEW) {
-           setPersonType(<span class="code-quote">"MANAGER"</span>);
-        }
-    }
-...
-}
+<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../../images/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Auto-Injection Limitations</b><br />The mechanism of injecting values of class designator columns currently supports qualifiers of form "attr=value [AND attr=value]*". Thus, flattened paths, db-paths and other than equality comparisons are not supported. Cayenne will try inject as much as possible, e.g. if ObjEntity "GoodEmployee" has qualifier "personType='EMPLOYEE' and salary&gt;10000", only personType attribute value will be injected.</td></tr></table></div>
+
+<p>Whenever manual injecting is required, it is a good practice to perform such operations <a href="../../../../Documentation/Cayenne Guide/Lifecycle Callbacks/index.html" title="Lifecycle Callbacks">in PrePersist lifecycle listeners or callbacks</a></p>
 
-<span class="code-keyword">public</span> class CustomerContact <span class="code-keyword">extends</span> _CustomerContact {
-    <span class="code-keyword">public</span> void setPersistenceState(<span class="code-object">int</span> state) {
-        <span class="code-keyword">super</span>.setPersistenceState(state);
-        
-        <span class="code-comment">// <span class="code-keyword">if</span> object was just created
-</span>        <span class="code-keyword">if</span>(state == PersistenceState.NEW) {
-           setPersonType(<span class="code-quote">"CUSTOMER"</span>);
-        }
-    }
-...
-}</pre>
-</div></div>
 
 <h3><a name="HandlingInheritance-InheritanceandSelectQueries"></a>Inheritance and SelectQueries</h3>
 <p>When performing SelectQuery on a table that maps to inheritance hierarchy, Cayenne will only return rows that belong to root class of the query and all its subclasses. No superclasses or objects from parallel inheritance branches will be returned. For example executing a SelectQuery with Employee class as root will potentially return a mix of Employees and Managers (who are also Employees of course), but no CustomerContact objects:</p>
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">DataContext context;
 ...
 SelectQuery query = <span class="code-keyword">new</span> SelectQuery(Employee.class);
@@ -125,12 +91,13 @@
    <span class="code-keyword">if</span>(e <span class="code-keyword">instanceof</span> Manager) {
    	<span class="code-comment">// <span class="code-keyword">do</span> something with manager...
 </span>   }
-}</pre>
+}
+</pre>
 </div></div>
 
 <p>The need to determine the correct class for each fetched database row makes queries on entities that use inheritance less efficient than the regular queries. If an application doesn't care about the query root class subclasses, the query can be optimized by explicitly turning off inheritance resolution. If this is done, the example above will return all Managers as instances of Employee class, not Manager class:</p>
 
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">DataContext context;
 ...
 SelectQuery query = <span class="code-keyword">new</span> SelectQuery(Employee.class);
@@ -141,12 +108,13 @@
 List employees = context.performQuery(query);
  
 <span class="code-comment">// employees list will contain no Manager instances...
-</span><span class="code-comment">// all Managers will be returned as regular Employees</span></pre>
+</span><span class="code-comment">// all Managers will be returned as regular Employees</span>
+</pre>
 </div></div>
 
-<table cellpadding='5' width='85%' cellspacing='8px' class='infoMacro' border="0" align='center'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../../images/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>Whenever an object is obtained via a relationship, it is always fully resolved to the lowest possible subclass in an entity inheritance tree.</td></tr></table>
+<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../../images/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>Whenever an object is obtained via a relationship, it is always fully resolved to the lowest possible subclass in an entity inheritance tree.</td></tr></table></div>
 
-<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>Use <tt>setResolvingInherited(false)</tt> with caution, and only if you never plan to work with subclasses. The downside of it is that the DataContext may end up with two objects pointing to the same database row, thus violating uniquing principle. With the above example, this may happen if at a later time user decides to fetch Managers directly, or if a Manager object is obtained via a relationship.</td></tr></table></div>
+<div class='panelMacro'><table class='warningMacro'><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>Use <tt>setResolvingInherited(false)</tt> with caution, and only if you never plan to work with subclasses. The downside of it is that the DataContext may end up with two objects pointing to the same database row, thus violating uniquing principle. With the above example, this may happen if at a later time user decides to fetch Managers directly, or if a Manager object is obtained via a relationship.</td></tr></table></div></div>
 </div>
   <div class="clearer">.</div>
   <div style="height: 12px; background-image: url('../../../../images/border_bottom.gif'); background-repeat: repeat-x;"></div>

Modified: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/Relationships/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/DataObjects/Relationships/index.html?rev=829552&r1=829551&r2=829552&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/Relationships/index.html (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/DataObjects/Relationships/index.html Sun Oct 25 12:06:20 2009
@@ -66,7 +66,7 @@
 <h3><a name="Relationships-ToOneRelationships"></a>To-One Relationships</h3>
 
 <p>"Get" methods for to-one relationships return the target Persistent object. If the object is not in memory yet, it will be fetched on first access. Modifying to-one relationships is no different from modifying attributes - just a simple call to a "set" method:</p>
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">Painting painting;
 
 <span class="code-comment">// obtain artist <span class="code-keyword">for</span> a given painting
@@ -77,17 +77,17 @@
 painting.setToArtist(newArtist);
 
 <span class="code-comment">// or remove Artist at all...
-</span><span class="code-comment">// painting.setToArtist(<span class="code-keyword">null</span>);</span></pre>
+</span><span class="code-comment">// painting.setToArtist(<span class="code-keyword">null</span>);</span>
+</pre>
 </div></div>
-<table cellpadding='5' width='85%' cellspacing='8px' class='infoMacro' border="0" align='center'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../../images/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>
-<p>When adding or removing an object from any kind of relationship, Cayenne will locate and modify an existing reverse relationship as appropriate.</p></td></tr></table>
+<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../../images/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><p>When adding or removing an object from any kind of relationship, Cayenne will locate and modify an existing reverse relationship as appropriate.</p></td></tr></table></div>
 
 <h3><a name="Relationships-ToManyRelationships"></a>To-Many Relationships</h3>
 
 <p>"Get" methods for to-many relationships return various collections of Persistent objects. To-many relationships can be mapped as Lists (default), Collections, Sets or Maps. Below we may refer to all four types of mappings as "collections", although strictly speaking Map is not a Collection in Java.</p>
 
 <p>Just like individual Persistent objects, relationship collections are also resolved on first access (e.g. when a user tries to read an element from a collection or obtains an Iterator). For modification there are special "addTo..." and "removeFrom..." methods:</p>
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">Artist artist;
 
 <span class="code-comment">// obtain a list of paintings
@@ -101,12 +101,13 @@
 
 <span class="code-comment">// add a <span class="code-keyword">new</span> painting
 </span>Painting newPainting = (Painting)context.newObject(Painting.class);
-artist.addToPaintingArray(newPainting);</pre>
+artist.addToPaintingArray(newPainting);
+</pre>
 </div></div>
 
 <p>Not much difference in managing Map relationships. Let's assume that Artist's paintings are modeled as a map, keyed by painting name:</p>
 
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">Artist artist;
 
 <span class="code-comment">// obtain a map of paintings
@@ -127,12 +128,13 @@
 </span><span class="code-comment">// unless the key is object id:
 </span>newPainting.setName(<span class="code-quote">"New Painting"</span>);
 
-artist.addToPaintingMap(newPainting);</pre>
+artist.addToPaintingMap(newPainting);
+</pre>
 </div></div>
 
 <p>There's one caveat though - if an object property that is used as a map key changes, the object is remapped in the relationship only after the context is committed:</p>
 
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">Painting girl = (Painting) paintings.get(<span class="code-quote">"Girl"</span>);
 girl.setName(<span class="code-quote">"New Name"</span>);
 
@@ -160,7 +162,9 @@
 
 <span class="code-keyword">if</span>(paintings.get(<span class="code-quote">"New Name"</span>) != <span class="code-keyword">null</span>) {
    <span class="code-comment">// now <span class="code-keyword">true</span>
-</span>}</pre>
+</span>}
+
+</pre>
 </div></div>
 
 

Modified: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Configuring Logging/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Deployment/Configuring%20Logging/index.html?rev=829552&r1=829551&r2=829552&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Configuring Logging/index.html (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Configuring Logging/index.html Sun Oct 25 12:06:20 2009
@@ -58,9 +58,9 @@
 <li><a href="../../../../Documentation/Cayenne Guide/Customization/index.html">Customization</a></li>
 </ul>
 </div>
-<div id="ConfluenceContent"><p>Cayenne logging is based on Jakarta Apache <span class="nobr"><a href="http://jakarta.apache.org/commons/logging/" title="Visit page outside Confluence" rel="nofollow">commons-logging package<sup><img class="rendericon" src="../../../../images/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span>. Commons-logging allows users to choose their own logging provider, such as Log4J or <tt>java.util.logging</tt>. Below is an example of a <span class="nobr"><a href="http://logging.apache.org/log4j/docs/" title="Visit page outside Confluence" rel="nofollow">Log4J-based<sup><img class="rendericon" src="../../../../images/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> configuration of the most important Cayenne logger that turns on and off SQL tracing:</p>
+<div id="ConfluenceContent"><p>Cayenne logging is based on Jakarta Apache <a href="http://jakarta.apache.org/commons/logging/" rel="nofollow">commons-logging package</a>. Commons-logging allows users to choose their own logging provider, such as Log4J or <tt>java.util.logging</tt>. Below is an example of a <a href="http://logging.apache.org/log4j/docs/" rel="nofollow">Log4J-based</a> configuration of the most important Cayenne logger that turns on and off SQL tracing:</p>
 
-<div class="preformatted"><div class="preformattedContent">
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
 <pre># Turn SQL tracing on
 log4j.logger.org.apache.cayenne.access.QueryLogger = INFO
 
@@ -71,7 +71,7 @@
 
 <p>Another example shows how to trace Cayenne configuration loading. Cayenne XML files may contain errors, or maybe missing or inaccessible by the application; there maybe lots of other reasons why Cayenne fails to startup, from missing JDBC drivers to misspelled database URLs. This logger helps you to debug it:</p>
 
-<div class="preformatted"><div class="preformattedContent">
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
 <pre>log4j.logger.org.apache.cayenne.conf = DEBUG
 log4j.logger.org.apache.cayenne.util = DEBUG
 </pre>

Modified: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Customizing Configuration/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Deployment/Customizing%20Configuration/index.html?rev=829552&r1=829551&r2=829552&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Customizing Configuration/index.html (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Customizing Configuration/index.html Sun Oct 25 12:06:20 2009
@@ -61,11 +61,12 @@
 <div id="ConfluenceContent"><p>A user can create her own subclass of Configuration and use it instead of the classes provided by Cayenne. Custom subclasses are usually created to load configuration files from non-standard locations, to automatically configure Cayenne during certain events that happen in deployment containers, etc. Cayenne provides a few implementations of Configuration discussed later in this chapter.</p>
 
 <p>To ensure that Cayenne uses the correct Configuration class, it must be initialized properly before any calls to Configuration are made:</p>
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java"><span class="code-keyword">import</span> org.apache.cayenne.conf.Configuration
 ...
 <span class="code-object">Class</span> myConfigSubclass = my.<span class="code-keyword">package</span>.ConfigSubclass.class;
-Configuration.initializeSharedConfiguration(myConfigSubclass);</pre>
+Configuration.initializeSharedConfiguration(myConfigSubclass);
+</pre>
 </div></div>
 <p>After this code is executed, any subsequent calls to <tt>Configuration.getSharedConfiguration()</tt> will return an instance of the custom class instead of <tt>DefaultConfiguration</tt>.</p>
 
@@ -74,39 +75,43 @@
 <h3><a name="CustomizingConfiguration-DefaultConfiguration"></a>DefaultConfiguration</h3>
 
 <p><tt>DefaultConfiguration</tt> uses the application's class path for locating configuration files; this works for both "expanded" class paths and JAR files. "Out of the box" only resources on the top level of the class path are found; very often it is convenient to have a subdirectory ('package') with configuration files. There are two ways to make Configuration find these files:</p>
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java"><span class="code-keyword">import</span> org.apache.cayenne.conf.DefaultConfiguration;
 ...
 DefaultConfiguration conf = <span class="code-keyword">new</span> DefaultConfiguration();			
 conf.addClassPath(<span class="code-quote">"my/<span class="code-keyword">package</span>/conf"</span>);
-Configuration.initializeSharedConfiguration(conf);</pre>
+Configuration.initializeSharedConfiguration(conf);
+</pre>
 </div></div>
 <p>Alternatively you can place an empty subclass of DefaultConfiguration into your package and use that class directly:</p>
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java"><span class="code-keyword">import</span> my.<span class="code-keyword">package</span>.conf.MyPackageConfiguration;
 ...
-Configuration.initializeSharedConfiguration(<span class="code-keyword">new</span> MyPackageConfiguration());</pre>
+Configuration.initializeSharedConfiguration(<span class="code-keyword">new</span> MyPackageConfiguration());
+</pre>
 </div></div>
 
 <h3><a name="CustomizingConfiguration-FileConfiguration"></a>FileConfiguration</h3>
 
 <p><tt>FileConfiguration</tt> uses the regular file system to load its files, and works very silimar to <tt>DefaultConfiguration</tt>:</p>
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java"><span class="code-keyword">import</span> org.apache.cayenne.conf.FileConfiguration;
 ...
 <span class="code-object">String</span> fileName = <span class="code-quote">"/some/path/to/my-cayenne.xml"</span>;
 FileConfiguration conf = <span class="code-keyword">new</span> FileConfiguration(<span class="code-keyword">new</span> File(fileName));
-Configuration.initializeSharedConfiguration(conf);</pre>
+Configuration.initializeSharedConfiguration(conf);
+</pre>
 </div></div>
 <p>The fileName argument can be absolute or relative to the application's working directory, and is checked for accessibility. A more flexible lookup can be done by using the name without any path and adding search paths:</p>
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java"><span class="code-keyword">import</span> org.apache.cayenne.conf.FileConfiguration;
 ...
 FileConfiguration conf = <span class="code-keyword">new</span> FileConfiguration(<span class="code-quote">"my-cayenne.xml"</span>);
 conf.addFilesystemPath(<span class="code-quote">"a/relative/path"</span>);
 conf.addFilesystemPath(<span class="code-quote">"/another/absolute/path"</span>);
 conf.addFilesystemPath(<span class="code-keyword">new</span> File(<span class="code-quote">"/some/path/that/must/exist/"</span>));
-Configuration.initializeSharedConfiguration(conf);</pre>
+Configuration.initializeSharedConfiguration(conf);
+</pre>
 </div></div>
 <p>The difference between the String and File arguments is that the latter are checked for existence. Both variants can be absolute or relative, and are evaluated in the order in which they are added to the Configuration.</p></div>
 </div>

Modified: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/DBCPDataSourceFactory/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Deployment/DBCPDataSourceFactory/index.html?rev=829552&r1=829551&r2=829552&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/DBCPDataSourceFactory/index.html (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/DBCPDataSourceFactory/index.html Sun Oct 25 12:06:20 2009
@@ -58,7 +58,7 @@
 <li><a href="../../../../Documentation/Cayenne Guide/Customization/index.html">Customization</a></li>
 </ul>
 </div>
-<div id="ConfluenceContent"><p>As an alternative to a simple and easy-to-use DataSource bundled with Cayenne, it is possible to configure a more feature-rich DataSource based on Apache Jakarta <span class="nobr"><a href="http://jakarta.apache.org/commons/dbcp" title="Visit page outside Confluence" rel="nofollow">commons-dbcp<sup><img class="rendericon" src="../../../../images/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span>. To enable commons-dbcp pool, select <tt>DBCPDataSourceFactory</tt> in the Modeler for a DataNode:</p>
+<div id="ConfluenceContent"><p>As an alternative to a simple and easy-to-use DataSource bundled with Cayenne, it is possible to configure a more feature-rich DataSource based on Apache Jakarta <a href="http://jakarta.apache.org/commons/dbcp" rel="nofollow">commons-dbcp</a>. To enable commons-dbcp pool, select <tt>DBCPDataSourceFactory</tt> in the Modeler for a DataNode:</p>
 
 <p><img src="dbcp-step1.jpg" align="absmiddle" border="0" /></p>
 
@@ -68,7 +68,7 @@
 
 <p>Here is an example of such properties file contents:</p>
 
-<div class="code"><div class="codeHeader"><b>sample-dbcp.properties</b></div><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>sample-dbcp.properties</b></div><div class="codeContent panelContent">
 <pre class="code-java">cayenne.dbcp.driverClassName=com.mysql.jdbc.Driver
 cayenne.dbcp.url=jdbc:mysql:<span class="code-comment">//localhost/cayenne
 </span>cayenne.dbcp.username=john

Modified: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Standalone Applications/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Deployment/Standalone%20Applications/index.html?rev=829552&r1=829551&r2=829552&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Standalone Applications/index.html (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Standalone Applications/index.html Sun Oct 25 12:06:20 2009
@@ -62,10 +62,11 @@
 
 <p>In a standalone Java application, DefaultConfiguration is used to locate and load configuration files. This approach does not require any additional setup. Shared configuration instance can simply be obtained by calling <tt>getSharedConfiguration()</tt>:</p>
 
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java"><span class="code-keyword">import</span> org.apache.cayenne.conf.Configuration;
 ...           
-Configuration conf = Configuration.getSharedConfiguration();</pre>
+Configuration conf = Configuration.getSharedConfiguration();
+</pre>
 </div></div>
 
 <p>DefaultConfiguration will expect cayenne.xml file to be located in the CLASSPATH. The same is true for DataMaps referenced in cayenne.xml. Their location is resolved relative to CLASSPATH as well. To make these files available to Cayenne, you can simply include them in the root of your application jar file (read <a href="../../../../Documentation/Cayenne Guide/Deployment/Customizing Configuration/index.html" title="Customizing Configuration">Customizing Configuration</a> on how to change that).</p>
@@ -76,19 +77,21 @@
 
 <p>In a setup that relies on shared Configuration a DataContext can be created by calling <tt>DataContext.createDataContext()</tt> static method that internally uses shared configuration:</p>
 
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java"><span class="code-keyword">import</span> org.apache.cayenne.access.DataContext;
 ...
-DataContext context = DataContext.createDataContext();</pre>
+DataContext context = DataContext.createDataContext();
+</pre>
 </div></div>
 
 <p>Later a DataContext can be passed around in the code explicitly, or it can be bound to an execution thread, making it accessible to all code being run within this thread (e.g. this can be a Swing event thread):</p>
 
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java"><span class="code-keyword">import</span> org.apache.cayenne.access.DataContext;
 ...
 DataContext context = DataContext.createDataContext();
-DataContext.bindThreadDataContext(context);</pre>
+DataContext.bindThreadDataContext(context);
+</pre>
 </div></div></div>
 </div>
   <div class="clearer">.</div>

Modified: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Using JNDI/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Deployment/Using%20JNDI/index.html?rev=829552&r1=829551&r2=829552&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Using JNDI/index.html (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Using JNDI/index.html Sun Oct 25 12:06:20 2009
@@ -94,7 +94,7 @@
 
 <p>Depending on how the DataSource is mapped in the container, you may optionally need to add a "resource-ref" entry to the <tt>web.xml</tt> file:</p>
 
-<div class="preformatted"><div class="preformattedContent">
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
 <pre>&lt;resource-ref&gt;
    &lt;res-ref-name&gt;jdbc/myds&lt;/res-ref-name&gt;
    &lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;
@@ -108,7 +108,7 @@
 
 <h4><a name="UsingJNDI-Tomcat5.5Configuration"></a>Tomcat 5.5 Configuration</h4>
 
-<div class="preformatted"><div class="preformattedContent">
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
 <pre>&lt;Context path="/myapp" docBase="myapp"&gt;
   &lt;Resource name="jdbc/myds" auth="Container"
           type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver"

Modified: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Web Applications/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Deployment/Web%20Applications/index.html?rev=829552&r1=829551&r2=829552&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Web Applications/index.html (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/Web Applications/index.html Sun Oct 25 12:06:20 2009
@@ -62,7 +62,7 @@
 
 <p>When deploying an application in a web container it is possible to follow the procedure for the standalone applications, i.e. put all XML files in the application CLASSPATH (e.g. in "mywebapp/WEB-INF/classes/", but DON'T put it in container shared locations!). Session DataContext can be obtained via ServletUtil:</p>
 
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">HttpSession session = ...;
 DataContext context = ServletUtil.getSessionContext(session);</pre>
 </div></div>
@@ -73,7 +73,7 @@
 
 <p>Adding the following filter to the <tt>web.xml</tt> would automate Cayenne setup in the web application:</p>
 
-<div class="preformatted"><div class="preformattedContent">
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
 <pre>&lt;filter&gt;
     &lt;filter-name&gt;CayenneFilter&lt;/filter-name&gt;
     &lt;filter-class&gt;org.apache.cayenne.conf.WebApplicationContextFilter&lt;/filter-class&gt;
@@ -85,15 +85,15 @@
 </pre>
 </div></div>
 
-<p>The filter will ensure that for each matching request a DataContext is bound to the request thread. So you can retrieve it anywhere in the application, even if you don't have a reference to the web environment:</p>
+<p>The filter will ensure that for each matching request a ObjectContext (which is actually a DataContext instance) is bound to the request thread. So you can retrieve it anywhere in the application, even if you don't have a reference to the web environment:</p>
 
-<div class="code"><div class="codeContent">
-<pre class="code-java">DataContext context = DataContext.getThreadDataContext();</pre>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">ObjectContext context = BaseContext.getThreadObjectContext();</pre>
 </div></div>
 
 <p>Filter can match a specific URL as shown above, or a specific servlet:</p>
 
-<div class="preformatted"><div class="preformattedContent">
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
 <pre>&lt;servlet&gt;
    &lt;servlet-name&gt;MyServlet&lt;/servlet-name&gt;
    &lt;servlet-class&gt;org.example.MyServlet&lt;/servlet-class&gt;
@@ -113,7 +113,7 @@
 
 <p>Additionally the filter supports putting files in <tt>myapp/WEB-INF/</tt> directory instead of the CLASSPATH, so a .war file may look like this:</p>
 
-<div class="preformatted"><div class="preformattedContent">
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
 <pre>index.jsp
 WEB-INF/cayenne.xml
 WEB-INF/xyz.map.xml
@@ -122,7 +122,7 @@
 
 <p>Actually, Cayenne files can be stored in any subdirectory of <tt>myapp/WEB-INF/</tt>. To specify a subdirectory, you'll need to add <tt>&lt;context-param&gt;</tt> named <tt>cayenne.configuration.path</tt> to your application descriptor:</p>
 
-<div class="preformatted"><div class="preformattedContent">
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
 <pre>&lt;context-param&gt;
     &lt;param-name&gt;cayenne.configuration.path&lt;/param-name&gt;
     &lt;param-value&gt;/WEB-INF/config/cayenne-files&lt;/param-value&gt;

Modified: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Deployment/index.html?rev=829552&r1=829551&r2=829552&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/index.html (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Deployment/index.html Sun Oct 25 12:06:20 2009
@@ -60,13 +60,14 @@
 
 <p>Cayenne application deployment is about configuring the application so that at runtime it can find a main project file (cayenne.xml) and associated resources, such as DataMap and DataNode XML files.</p>
 
-<p>The central point in Cayenne deployment is the <span class="nobr"><a href="http://incubator.apache.org/cayenne/2_0/api/cayenne/org/apache/cayenne/conf/Configuration.html" title="Visit page outside Confluence" rel="nofollow">Configuration<sup><img class="rendericon" src="../../../images/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> class. It locates and loads all the mapping and configuration information required for Cayenne at runtime. By default Configuration uses a singleton model, i.e. normally there is only one instance of Configuration (or a subclass) that exists in the application. This shared instance can be accessed in the following way:</p>
-<div class="code"><div class="codeContent">
+<p>The central point in Cayenne deployment is the <a href="http://incubator.apache.org/cayenne/2_0/api/cayenne/org/apache/cayenne/conf/Configuration.html" rel="nofollow">Configuration</a> class. It locates and loads all the mapping and configuration information required for Cayenne at runtime. By default Configuration uses a singleton model, i.e. normally there is only one instance of Configuration (or a subclass) that exists in the application. This shared instance can be accessed in the following way:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java"><span class="code-keyword">import</span> org.apache.cayenne.conf.Configuration;
 <span class="code-keyword">import</span> org.apache.cayenne.access.DataDomain;
 ...
 Configuration conf = Configuration.getSharedConfiguration();
-DataDomain domain = conf.getDomain();</pre>
+DataDomain domain = conf.getDomain();
+</pre>
 </div></div>
 <p>As discussed in the following chapters Configuration works behind the scenes and users rarely care about it. Application code is normally only concerned with obtaining a DataContext.</p>
 

Modified: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Cayenne Contract/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Design/Cayenne%20Contract/index.html?rev=829552&r1=829551&r2=829552&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Cayenne Contract/index.html (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Cayenne Contract/index.html Sun Oct 25 12:06:20 2009
@@ -64,7 +64,7 @@
 
 <p>Cayenne can persist Java objects that implement <tt>org.apache.cayenne.Persistent</tt> interface. The interface requires for an object to provide getters and setters for three bean properties: <tt>objectId</tt>, <a href="../../../../Documentation/Cayenne Guide/Design/Persistent Object Lifecycle/index.html" title="Persistent Object Lifecycle"><tt>persistenceState</tt></a> and <tt>objectContext</tt>:</p>
 
-<div class="code"><div class="codeHeader"><b>Persistent.java</b></div><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Persistent.java</b></div><div class="codeContent panelContent">
 <pre class="code-java"><span class="code-keyword">public</span> <span class="code-keyword">interface</span> Persistent <span class="code-keyword">extends</span> Serializable {
     ObjectId getObjectId();
 
@@ -128,7 +128,7 @@
 
 <p>If entity A has a relationship to entity B and entity B has a relationshop back to entity A, Cayenne would maintain consistency of the reverse relationship automatically. Consider this example of a many-to-one relationship, written in a form of a unit test:</p>
 
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">A a1;
 B b1;
 B b2;

Modified: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Persistent Object Lifecycle/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Design/Persistent%20Object%20Lifecycle/index.html?rev=829552&r1=829551&r2=829552&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Persistent Object Lifecycle/index.html (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Persistent Object Lifecycle/index.html Sun Oct 25 12:06:20 2009
@@ -59,11 +59,11 @@
 <div id="ConfluenceContent"><p>A lifecycle of a persistent object can be represented as a number of states and transitions between them. These states are formally defined as "int" constants in <tt>org.apache.cayenne.PersistenceState</tt> class. Transitions between states (see the diagram below) occur in response to the application interacting with either persistent objects or Cayenne context. Whenever a transition occurs, Cayenne automatically updates "persistenceState" property of all affected objects by calling <tt>setPersistenceState()</tt>.</p>
 
 <table class="sectionMacro" border="0" cellpadding="5" cellspacing="0" width="100%"><tbody><tr>
-<td class="confluenceTd"  valign="top">
+<td class="confluenceTd" valign="top">
 <p>A new object state transformations:<br/>
 <img src="new-persistent-object.png" align="absmiddle" border="0" /></p></td>
 
-<td class="confluenceTd"  valign="top">
+<td class="confluenceTd" valign="top">
 <p>A fetched or committed object state transformations:<br/>
 <img src="fetched-persistent-object.png" align="absmiddle" border="0" /></p></td></tr></tbody></table>
 

Modified: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Primary Key Generation/Generated Columns/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Design/Primary%20Key%20Generation/Generated%20Columns/index.html?rev=829552&r1=829551&r2=829552&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Primary Key Generation/Generated Columns/index.html (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Primary Key Generation/Generated Columns/index.html Sun Oct 25 12:06:20 2009
@@ -72,10 +72,11 @@
 
 <p>If you know that your driver supports generated keys API, but Cayenne assumes it does not, you can change this setting manually:</p>
 
-<div class="code"><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">DataNode node = ...
 JdbcAdapter adapter = (JdbcAdapter) node.getAdapter();
-adapter.setSupportsGeneratedKeys(<span class="code-keyword">true</span>);</pre>
+adapter.setSupportsGeneratedKeys(<span class="code-keyword">true</span>);
+</pre>
 </div></div>
 
 <p>Use of generated keys for PK is configured for each DbEntity individually in CayenneModeler:</p>
@@ -105,8 +106,8 @@
 </ul>
 
 
-<table cellpadding='5' width='85%' cellspacing='8px' class='noteMacro' border="0" align='center'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../../../images/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b class="strong">MS SQLServer Note</b><br /><br/>
-MS drivers prior to 2005 version do not support generated columns, while newer drivers and <span class="nobr"><a href="http://jtds.sourceforge.net" title="Visit page outside Confluence" rel="nofollow">jTDS<sup><img class="rendericon" src="../../../../../images/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> support it just fine. Cayenne can automatically detect the driver type and configure SQLServerAdapter, but only when AutoAdapter is used. To make sure auto-detection works, clear the "Custom Adapter" field for the corresponding DataNode in the Modeler.</td></tr></table></div>
+<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../../../images/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>MS SQLServer Note</b><br /><br/>
+MS drivers prior to 2005 version do not support generated columns, while newer drivers and <a href="http://jtds.sourceforge.net" rel="nofollow">jTDS</a> support it just fine. Cayenne can automatically detect the driver type and configure SQLServerAdapter, but only when AutoAdapter is used. To make sure auto-detection works, clear the "Custom Adapter" field for the corresponding DataNode in the Modeler.</td></tr></table></div></div>
 </div>
   <div class="clearer">.</div>
   <div style="height: 12px; background-image: url('../../../../../images/border_bottom.gif'); background-repeat: repeat-x;"></div>

Added: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Primary Key Generation/Picture 1.png
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Design/Primary%20Key%20Generation/Picture%201.png?rev=829552&view=auto
==============================================================================
Files cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Primary Key Generation/Picture 1.png (added) and cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Primary Key Generation/Picture 1.png Sun Oct 25 12:06:20 2009 differ

Modified: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Primary Key Generation/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Design/Primary%20Key%20Generation/index.html?rev=829552&r1=829551&r2=829552&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Primary Key Generation/index.html (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Primary Key Generation/index.html Sun Oct 25 12:06:20 2009
@@ -102,7 +102,8 @@
 
 <h3><a name="PrimaryKeyGeneration-PrimaryKeyProvidedbyDatabaseonINSERT"></a>Primary Key Provided by Database on INSERT</h3>
 
-<p>Sometimes databases have their own proprietary mechanism to generate a primary key when a new row is inserted. This feature is called "auto increment" or "identity column". Cayenne supports such primary keys out of the box. For this mechanism to be invoked, PK DbAttributes must be marked as "generated" in the Modeler. Currently MySQL and SQLServer adapters have this feature turned on by default.</p>
+<p>Sometimes databases have their own proprietary mechanism to generate a primary key when a new row is inserted. This feature is called "auto increment" or "identity column". Cayenne supports such primary keys out of the box. For this mechanism to be invoked, the DbEntity primary key generation must be marked as "Database-Generated" in the Modeler. Currently MySQL and SQLServer adapters have this feature turned on by default.<br/>
+<img src="Picture 1.png" align="absmiddle" border="0" /></p>
 
 <h3><a name="PrimaryKeyGeneration-CayenneGeneratedPrimaryKey"></a>Cayenne Generated Primary Key</h3>
 
@@ -121,7 +122,7 @@
 
 <p>To generate the necessary database objects for the primary key autogeneration, use CayenneModeler and follow the instructions given <a href="../../../../Documentation/Modeler Guide/Common Modeling Tasks/Generate Primary Key Support/index.html" title="Generate Primary Key Support">here</a>.</p>
 
-<table cellpadding='5' width='85%' cellspacing='8px' class='infoMacro' border="0" align='center'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../../images/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>Cayenne only supports automatic PK generation for a single column per table.</td></tr></table>
+<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../../images/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>Cayenne only supports automatic PK generation for a single column per table.</td></tr></table></div>
 
 <h3><a name="PrimaryKeyGeneration-Sections"></a>Sections</h3>
 

Modified: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Runtime Components/DataChannel/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Design/Runtime%20Components/DataChannel/index.html?rev=829552&r1=829551&r2=829552&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Runtime Components/DataChannel/index.html (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Runtime Components/DataChannel/index.html Sun Oct 25 12:06:20 2009
@@ -67,7 +67,7 @@
 </div>
 <div id="ConfluenceContent"><p><tt>"org.apache.cayenne.DataChannel"</tt> is an abstraction of Cayenne persistence stack. It is very simple - it defines only 4 methods, two for actually performing persistent operations, one to access metadata, and one - to access EventManager:</p>
 
-<div class="code"><div class="codeHeader"><b>DataChannel.java</b></div><div class="codeContent">
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>DataChannel.java</b></div><div class="codeContent panelContent">
 <pre class="code-java"><span class="code-keyword">public</span> <span class="code-keyword">interface</span> DataChannel {
 
     QueryResponse onQuery(ObjectContext originatingContext, Query query);

Modified: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Runtime Components/DataSource/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Design/Runtime%20Components/DataSource/index.html?rev=829552&r1=829551&r2=829552&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Runtime Components/DataSource/index.html (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Runtime Components/DataSource/index.html Sun Oct 25 12:06:20 2009
@@ -67,7 +67,7 @@
 </div>
 <div id="ConfluenceContent"><p><a href="../../../../../Documentation/Cayenne Guide/Design/Runtime Components/DataNode/index.html" title="DataNode">DataNode</a> obtains connections via a <tt>javax.sql.DataSource</tt>. If an application is deployed in a J2EE container, DataSource is normally provided by container <a href="../../../../../Documentation/Cayenne Guide/Deployment/Using JNDI/index.html" title="Using JNDI">via JNDI</a>. For standalone applications (or if you don't want to use JNDI) Cayenne provides its own DataSource that includes connection pooling features. Whenever you select <tt>org.apache.cayenne.conf.DriverDataSourceFactory</tt> in the Modeler, you are choosing to use Cayenne DataSource. </p>
 
-<p>Cayenne DataSource implementation is located in the <tt>org.apache.cayenne.conn</tt> package and is fully independent from the rest of the framework. Since Cayenne DataSource is chosen automatically, users rarely need to know more details. One notable exception are applications requiring users to interactively <span class="nobr"><a href="http://cwiki.apache.org/CAY/setting-database-connection.html" title="Visit page outside Confluence" rel="nofollow">enter database login information<sup><img class="rendericon" src="../../../../../images/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span>. In this case you can write your own DataSource wrapper, and internally instantiate Cayenne DataSource (<tt>org.apache.cayenne.conn.PoolManager</tt>) after the user provides login and password.</p>
+<p>Cayenne DataSource implementation is located in the <tt>org.apache.cayenne.conn</tt> package and is fully independent from the rest of the framework. Since Cayenne DataSource is chosen automatically, users rarely need to know more details. One notable exception are applications requiring users to interactively <a href="http://cwiki.apache.org/CAY/setting-database-connection.html" rel="nofollow">enter database login information</a>. In this case you can write your own DataSource wrapper, and internally instantiate Cayenne DataSource (<tt>org.apache.cayenne.conn.PoolManager</tt>) after the user provides login and password.</p>
 </div>
 </div>
   <div class="clearer">.</div>

Modified: cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Runtime Components/Event Package/index.html
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Design/Runtime%20Components/Event%20Package/index.html?rev=829552&r1=829551&r2=829552&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Runtime Components/Event Package/index.html (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne Guide/Design/Runtime Components/Event Package/index.html Sun Oct 25 12:06:20 2009
@@ -78,7 +78,7 @@
 </ul>
 
 
-<table cellpadding='5' width='85%' cellspacing='8px' class='tipMacro' border="0" align='center'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../../../images/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>The most common error when using EventSubject is not storing a reference to it. This may result in a premature cleanup of a given subject, and automatic unregistering of all listeners. Good practice is to make subject a "public static final" variable of the event sender class if a subject is common for all instances of senders; or make it an ivar of a sender instance if subject is only related to this instance.</td></tr></table></div>
+<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="../../../../../images/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>The most common error when using EventSubject is not storing a reference to it. This may result in a premature cleanup of a given subject, and automatic unregistering of all listeners. Good practice is to make subject a "public static final" variable of the event sender class if a subject is common for all instances of senders; or make it an ivar of a sender instance if subject is only related to this instance.</td></tr></table></div></div>
 </div>
   <div class="clearer">.</div>
   <div style="height: 12px; background-image: url('../../../../../images/border_bottom.gif'); background-repeat: repeat-x;"></div>



Mime
View raw message