db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r538385 - in /db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs: ./ docu/ docu/guides/
Date Tue, 15 May 2007 23:41:25 GMT
Author: arminw
Date: Tue May 15 16:41:24 2007
New Revision: 538385

URL: http://svn.apache.org/viewvc?view=rev&rev=538385
Log:
update docs

Modified:
    db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/faq.xml
    db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/advanced-technique.xml
    db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/basic-technique.xml
    db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/jdbc-types.xml
    db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/objectcache.xml
    db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/repository.xml
    db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/sequencemanager.xml
    db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/features.xml
    db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/site.xml

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/faq.xml
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/faq.xml?view=diff&rev=538385&r1=538384&r2=538385
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/faq.xml (original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/faq.xml Tue May 15 16:41:24 2007
@@ -1810,6 +1810,28 @@
             </answer>
         </faq>
 
+        <faq id="nullCheck">
+            <question>
+                When is a field 'NULL'?
+            </question>
+            <answer>
+                <p>
+                    Please see <a href="site:basic-technique/null-check">basic technique guide</a>.
+                </p>
+            </answer>
+        </faq>
+
+        <faq id="persistenceChecker">
+            <question>
+                How does OJB detect persistent objects, differ persistent objects from other?
+            </question>
+            <answer>
+                <p>
+                    Please see <a href="site:basic-technique/persistence-checker">basic technique guide</a>.
+                </p>
+            </answer>
+        </faq>
+
         <faq id="jdoPersistenceCapable">
             <question>
                 JDO - Why must my persisten class implement

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/advanced-technique.xml
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/advanced-technique.xml?view=diff&rev=538385&r1=538384&r2=538385
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/advanced-technique.xml (original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/advanced-technique.xml Tue May 15 16:41:24 2007
@@ -1723,13 +1723,6 @@
                 these collection must provide a minimum protocol as defined by interface
                 <code>org.apache.ojb.broker.ManageableCollection</code> - see below.
             </p>
-            <p>
-                By default OJB use the collection implementation classes specified in the
-                <a href="ext:ojb.properties">OJB.properties</a> file. But it's also possible to
-                define specific classes for each <code>collection-descriptor</code>. See attribute
-                <a href="site:repository/collection-descriptor">collection-descriptor.collection-class</a>
-                for more information.
-            </p>
                 <source><![CDATA[
 public interface ManageableCollection extends java.io.Serializable
 {
@@ -1778,95 +1771,74 @@
             <section>
                 <title>Types Allowed for Implementing 1:n and m:n Associations</title>
                 <p>
+                    By default OJB use the collection implementation classes specified in the
+                    <a href="ext:ojb.properties">OJB.properties</a> file. But it's also possible to
+                    define specific classes for each <code>collection-descriptor</code>. See attribute
+                    <a href="site:repository/collection-descriptor">collection-descriptor.collection-class</a>
+                    for more information.
+                </p>
+                <p>
                     OJB supports different Collection types to implement 1:n and m:n associations. OJB
-                    detects the used type automatically, so there is no need to declare
-                    it in the repository file. There is also no additional programming
-                    required. The following types are supported:</p>
-                <ol>
-                    <li>
-                        <code>java.util.Collection, java.util.List, java.util.Vector</code>
-                        as in the example above. Internally OJB uses
-                        <code>java.util.Vector</code>
-                        to implement collections.
+                    detects the used type automatically, so there is no need to declare it in the repository
+                    file's <a href="site:repository/collection-descriptor">collection-descriptor.collection-class</a>
+                    attribute. There is also no additional programming required.
+                    <br/>
+                    The following types are supported:
+                </p>
+                <ul>
+                    <li>
+                        <code>java.util.Collection, java.util.List, java.util.Set, java.util.Vector</code>
+                        are automatically supported. OJB additionally supports implementations of these interfaces with
+                        different behavior in handling removed objects - <a href="#which-collection-type">see below</a>.
                     </li>
-
                     <li>
-                        Arrays (see the file
-                        <code>ProductGroupWithArray</code>).
+                        Arrays (e.g. see the file <code>ProductGroupWithArray</code> in OJB's
+                        <a href="site:test-suite">test-suite</a> sources).
                     </li>
-
                     <li>
-                        User-defined collections (see the file
-                        <code>ProductGroupWithTypedCollection</code>).
-                        A typical application for this approach are typed Collections.
-                        <br/>Here
-                        is some sample code from the Collection class
-                        <code>ArticleCollection</code>.
-                        This Collection is typed, i.e. it accepts only InterfaceArticle
-                        objects for adding and will return InterfaceArticle objects with
-                        <code>get(int index)</code>. To let OJB
-                        handle such a user-defined Collection it
-                        <strong>must</strong> implement the callback
-                        interface
+                        <p>
+                        User-defined collections (e.g. see the file <code>ProductGroupWithTypedCollection</code> in OJB's
+                        <a href="site:test-suite">test-suite</a> sources). A typical application for this approach
+                        are typed Collections.
+                        <br/>
+                        Here is some sample code from the Collection class
+                        <code>ArticleCollection</code> (see <a href="site:test-suite">test-suite</a> sources).
+                        This Collection is typed, i.e. it accepts only <code>InterfaceArticle</code>
+                        objects for adding and will return <code>InterfaceArticle</code> objects with
+                        <code>get(int index)</code>. To let OJB handle such a user-defined Collection it
+                        <strong>must</strong> implement the callback interface
                         <code>ManageableCollection</code> and the typed collection class must be
-                        declared in the
-                        <em>collection-descriptor</em> using the
-                        <em>collection-class</em> attribute.
+                        declared in the <em>collection-descriptor</em> using the <em>collection-class</em> attribute.
                         <code>ManageableCollection</code> provides hooks that are called by OJB during object
                         materialization, updating and deletion.
-                    </li>
-                </ol>
-                <source><![CDATA[
-public class ArticleCollection implements ManageableCollection,
-                                      java.io.Serializable
+                        </p>
+                        <source><![CDATA[
+public class ArticleCollection implements ManageableCollection, Serializable
 {
     private Vector elements;
 
-    public ArticleCollection()
-    {
+    public ArticleCollection() {
         super();
         elements = new Vector();
     }
 
-    public void add(InterfaceArticle article)
-    {
+    public void add(InterfaceArticle article) {
         elements.add(article);
     }
 
-    public InterfaceArticle get(int index)
-    {
+    public InterfaceArticle get(int index) {
         return (InterfaceArticle) elements.get(index);
     }
 
-    /**
-     * add a single Object to the Collection. This method is
-     * used during reading Collection elements from the
-     * database. Thus it is is save to cast anObject
-     * to the underlying element type of the collection.
-     */
-    public void ojbAdd(java.lang.Object anObject)
-    {
+    public void ojbAdd(java.lang.Object anObject) {
         elements.add((InterfaceArticle) anObject);
     }
 
-    /**
-     * adds a Collection to this collection. Used in reading
-     * Extents from the Database.
-     * Thus it is save to cast otherCollection to this.getClass().
-     */
-    public void ojbAddAll(
-          ojb.broker.ManageableCollection otherCollection)
-    {
-        elements.addAll(
-          ((ArticleCollection) otherCollection).elements);
+    public void ojbAddAll(ManageableCollection otherCollection) {
+        elements.addAll(((ArticleCollection) otherCollection).elements);
     }
 
-    /**
-     * returns an Iterator over all elements in the collection.
-     * Used during store and delete Operations.
-     */
-    public java.util.Iterator ojbIterator()
-    {
+    public Iterator ojbIterator() {
         return elements.iterator();
     }
 }]]></source>
@@ -1884,6 +1856,8 @@
 >
 <inverse-foreignkey field-ref="productGroupId"/>
 </collection-descriptor>]]></source>
+                    </li>
+                </ul>
             </section>
 
 
@@ -1896,42 +1870,166 @@
                     was introduced. Now we talk about which type to use.
                 </p>
                 <p>
-                    By default OJB use a <em>removal-aware</em> collection implementations for
-                    <a href="site:basic-technique/one-to-n">1:n relations</a> and normal manageable
-                    collection implementations for <a href="site:basic-technique/m-to-n">m:n relations</a>.
-                    <br/>
+                    By default OJB use:
+                </p>
+                <ul>
+                    <li>
+                        a <em>removal-aware</em> collection implementations for
+                        <a href="site:basic-technique/one-to-n">1:n relations</a>
+                    </li>
+                    <li>
+                        normal manageable collection implementations for
+                        <a href="site:basic-technique/m-to-n">m:n relations</a>
+                    </li>
+                </ul>
+                <p>
                     Removal aware implementations (classes prefixed with <em>Removal...</em>) track
-                    removal and addition of elements.
-                    This tracking allow the <code>PersistenceBroker</code>
+                    removal of elements. This tracking allow the <code>PersistenceBroker</code>
                     to <strong>delete elements</strong> from the database that have been
                     removed from the collection before a <code>PB.store()</code> operation occurs.
                 </p>
                 <p>
-                    Using removal aware This default behaviour is <strong>undesired</strong> in some cases:
+                    Using removal aware is <strong>undesired</strong> in some cases:
+                </p>
+                <ul>
+                    <li>
+                        In <a href="site:basic-technique/m-to-n">m:n relations</a>,
+                        e.g. between <em>Movie</em> and <em>Actor</em>
+                        class. If an Actor was removed from the Actor collection of a Movie object
+                        expected behaviour was that the Actor be removed from the
+                        <a href="site:basic-technique/m-to-n">indirection table</a>, but not
+                        the Actor itself. Using a removal aware collection will remove the Actor
+                        too. In that case a simple manageable collection is recommended (this is the default
+                        behavior of OJB or by set e.g.
+                        <code>collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"</code>
+                        in <code>collection-descriptor#collection-class</code> attribute.
+                    </li>
+                    <li>
+                        In <a href="site:basic-technique/one-to-n">1:n relations</a> when the
+                        n-side objects be removed from the collection of the main object, but we don't
+                        want to remove the n-side object from database, only to <em>nullify</em> the foreign keys
+                        pointing to the main object itself. Then we can use a normal manageable collection
+                        implementation instead of a removal aware (to <em>nullify</em> the FK entry in the n-side
+                        object you have manually <em>unlink</em> the object (nullify all FK fields)
+                        - more info about <a href="site:basic-technique/linking">linking here</a>).
+                    </li>
+                </ul>
+                <p>
+                    OJB provide a bundle of <code>org.apache.ojb.broker.ManageableCollection</code> implementations:
+                </p>
+                <table>
+                <tr>
+                    <th>Shortcut name</th>
+                    <th>Class</th>
+                    <th>Comment</th>
+                </tr>
+                <tr>
+                    <td>collection</td>
+                    <td><code>org.apache.ojb.broker.util.
+                        collections.ManageableArrayList</code></td>
+                    <td>
+                        See below.
+                    </td>
+                </tr>
+                <tr>
+                    <td>list</td>
+                    <td><code>org.apache.ojb.broker.util.
+                        collections.ManageableArrayList</code></td>
+                    <td>
+                        <code>ManageableCollection</code> implementation which supports <code>java.util.List</code>.
+                    </td>
+                </tr>
+                <tr>
+                    <td>set</td>
+                    <td><code>org.apache.ojb.broker.util.
+                        collections.ManageableHashSet</code></td>
+                    <td>
+                        <code>ManageableCollection</code> implementation which supports <code>java.util.Set</code>.
+                    </td>
+                </tr>
+                <tr>
+                    <td>map</td>
+                    <td><code>org.apache.ojb.broker.util.
+                        collections.ManageableHashMap</code></td>
+                    <td>
+                        <code>ManageableCollection</code> implementation which supports <code>java.util.Map</code>.
+                        The primary key is the map key, and the object is the map value.
+                        <note>
+                            This implementation is limited in use, only objects with single primary key field are
+                            allowed (composed PK's are illegal).
+                        </note>
+                    </td>
+                </tr>
+                <tr>
+                    <td>removal.collection</td>
+                    <td><code>org.apache.ojb.broker.util.
+                        collections.RemovalAwareCollection</code></td>
+                    <td>
+                        <code>ManageableCollection</code> implementation which supports <code>java.util.Collection</code>
+                        and furthermore tracks removal of elements. This tracking allow the <code>PersistenceBroker</code>
+                        to delete elements that have been removed from the collection even if no <code>Persistencebroker.delete</code>
+                        call was performed the removed objects. This will allow to use the <a href="site:pb-guide">PB api</a>
+                        in a way pretty close to higher level API's with collection references state detection
+                        e.g. like the <a href="site:odmg-guide">ODMG API</a>.
+                    </td>
+                </tr>
+                <tr>
+                    <td>removal.list</td>
+                    <td><code>org.apache.ojb.broker.util.
+                        collections.RemovalAwareList</code></td>
+                    <td>
+                        <code>ManageableCollection</code> implementation which supports <code>java.util.List</code>
+                        and furthermore tracks removal of elements. This tracking allow the <code>PersistenceBroker</code>
+                        to delete elements that have been removed from the collection even if no <code>Persistencebroker.delete</code>
+                        call was performed for removed objects. This will allow to use the <a href="site:pb-guide">PB api</a>
+                        in a way pretty close to higher level API's with collection references state detection
+                        e.g. like the <a href="site:odmg-guide">ODMG API</a>.
+                    </td>
+                </tr>
+                <tr>
+                    <td>removal.set</td>
+                    <td><code>org.apache.ojb.broker.util.
+                        collections.RemovalAwareSet</code></td>
+                    <td>
+                        <code>ManageableCollection</code> implementation which supports <code>java.util.List</code>
+                        and furthermore tracks removal of elements. This tracking allow the <code>PersistenceBroker</code>
+                        to delete elements that have been removed from the collection even if no <code>Persistencebroker.delete</code>
+                        call was performed for removed objects. This will allow to use the <a href="site:pb-guide">PB api</a>
+                        in a way pretty close to higher level API's with collection references state detection
+                        e.g. like the <a href="site:odmg-guide">ODMG API</a>.
+                    </td>
+                </tr>
+                <tr>
+                    <td>removal.vector</td>
+                    <td><code>org.apache.ojb.broker.util.
+                        collections.RemovalAwareVector</code></td>
+                    <td>
+                        <code>ManageableCollection</code> implementation which supports <code>java.util.Vector</code>
+                        and furthermore tracks removal of elements. This tracking allow the <code>PersistenceBroker</code>
+                        to delete elements that have been removed from the collection even if no <code>Persistencebroker.delete</code>
+                        call was performed for removed objects. This will allow to use the <a href="site:pb-guide">PB api</a>
+                        in a way pretty close to higher level API's with collection references state detection
+                        e.g. like the <a href="site:odmg-guide">ODMG API</a>.
+                    </td>
+                </tr>
+            </table>
+                <p>
+                    Supports OJB's <a href="site:basic-technique/shortcut-name">shortcut name feature</a>.
                 </p>
-                    <ul>
-                        <li>
-                            In <a href="site:basic-technique/m-to-n">m:n relations</a>,
-                            e.g. between <em>Movie</em> and <em>Actor</em>
-                            class. If an Actor was removed from the Actor collection of a Movie object
-                            expected behaviour was that the Actor be removed from the
-                            <a href="site:basic-technique/m-to-n">indirection table</a>, but not
-                            the Actor itself. Using a removal aware collection will remove the Actor
-                            too. In that case a simple manageable collection is recommended (this is the default
-                            behavior of OJB or by set e.g.
-                            <code>collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"</code>
-                            in <code>collection-descriptor#collection-class</code> attribute.
-                        </li>
-                        <li>
-                            In <a href="site:basic-technique/one-to-n">1:n relations</a> when the
-                            n-side objects be removed from the collection of the main object, but we don't
-                            want to remove the n-side object from database, only to <em>nullify</em> the foreign keys
-                            pointing to the main object itself. Then we can use a normal manageable collection
-                            implementation instead of a removal aware (to <em>nullify</em> the FK entry in the n-side
-                            object you have manually <em>unlink</em> the object (nullify all FK fields)
-                            - more info about <a href="site:basic-technique/linking">linking here</a>).
-                        </li>
-                    </ul>
+                <p>
+                    For example to use the removal aware list implementation in a 1:n reference declare:
+                </p>
+                <source><![CDATA[
+<collection-descriptor
+name="allArticlesInGroup"
+element-class-ref="org.apache.ojb.broker.Article"
+collection-class="removal.list"
+auto-retrieve="true"
+auto-update="false"
+auto-delete="true"
+>
+<inverse-foreignkey field-ref="productGroupId"/>
+</collection-descriptor>]]></source>
             </section>
         </section>
 

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/basic-technique.xml
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/basic-technique.xml?view=diff&rev=538385&r1=538384&r2=538385
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/basic-technique.xml (original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/basic-technique.xml Tue May 15 16:41:24 2007
@@ -1734,14 +1734,16 @@
             <title>Type and Value Conversions</title>
             <p>
                 Say your database column contains INTEGER values but you have to
-                use boolean attributes in your Domain objects. You need a type and
+                use boolean attributes in your Domain objects. In that case you need a type and
                 value mapping described by a
                 <a href="site:jdbc-types">FieldConversion</a>.
             </p>
         </section>
 
+
+
         <section id="null-check">
-            <title>Definition of 'null' values</title>
+            <title>Definition of 'null' - the <code>NullCheck</code> Interface</title>
             <p>
             	By default OJB considers all primitive numerical fields (int, long, ...)
             	as 'null' when they contain a 0-value in Java.
@@ -1755,10 +1757,318 @@
             	might want to change the default 'null'-definition in OJB for that
             	particular field to allow 0-values in the database. You might also define
             	your own complex definition of 'null' for a field that references a Java
-            	object in your application. See the documentation of the
-            	<a href="site:jdbc-types/null-check">NullCheck</a>
-            	interface for details on how to do this.
+            	object in your application.
+           	</p>
+            <p>
+                OJB allows the use of predefined or self-implemented null-definitions
+                through the <code>org.apache.ojb.broker.accesslayer.NullCheck</code>
+                interface, configured with the 'null-check' attribute of the
+                <a href="site:repository/field-descriptor">field-descriptor</a>
+                in the metadata repository XML-file.
             </p>
+
+
+            <!--
+            	TODO: Remove note and repository.xml warning when adding a future
+            	consistency check implementation.
+            -->
+            <note>
+            	If you change the default null-check class for a primary key field
+            	in the repository file,	be sure to also check the definition of fields
+            	in classes referencing the current one through foreign keys.
+            	See also: null-check
+            	<a href="site:repository/null-check-fkcheck-warn">syntax warning</a>.
+            </note>
+
+
+            <p>
+            	The <code>NullCheck</code> API defines one public method:
+           	</p>
+           	<source><![CDATA[
+/**
+ * Returns wether the given object value represents 'null' for the specified field.
+ * @param fld descriptor representation of the persistent field
+ * @param aValue the value to check if it represents 'null'
+ * @return true if and only if aValue represents null
+ */
+boolean representsNull(FieldDescriptor fld, Object aValue);
+           	]]></source>
+           	<section id="null-check-ojb">
+           		<title>Packaged Implementations</title>
+	            <p>
+	            	There are two implementations provided in the OJB distribution.
+	           	</p>
+	           	<table>
+	                <tr>
+	                    <th>Shortcut name</th>
+	                    <th>Class</th>
+	                    <th>Comment</th>
+	                </tr>
+                    <tr>
+	                	<td>default</td>
+                        <td><code>org.apache.ojb.broker.
+                            accesslayer.NullCheckDefaultImpl</code></td>
+	                	<td>Default implementation if the 'null-check' attribute is missing.
+	                	Defines 0 as null for primitive numerical fields and "" as null
+	                	for primary key fields.</td>
+	                </tr>
+	                <tr>
+                        <td>relaxed</td>
+                        <td><code>org.apache.ojb.broker.
+                            accesslayer.NullCheckRelaxedImpl</code></td>
+	                	<td>No special handling of primitive fields or String values for
+	                	primary keys, only Java 'null' references are considered null.</td>
+	                </tr>
+	           	</table>
+                   <p>
+                       The <em>shortcut name</em> can be used instead of the full qualified
+                       class name - see
+                       <a href="site:repository/null-check">field-descriptor null-check attribute</a>.
+                   </p>
+               </section>
+           	<section id="null-check-custom">
+           		<title>Custom Implementations</title>
+	           	<p>
+	           		To define you own definition of null for one or more persistent
+	           		fields, simply write a Java class that implements the
+	           		<code>org.apache.ojb.broker.accesslayer.NullCheck</code> interface
+	           		(or extends any default implementation)
+	           		and configure the <code>null-check</code> of the
+	           		<a href="site:repository/field-descriptor">field-descriptor</a>
+	           		with the fully qualified class name of this class or use OJB's
+                    <a href="site:basic-technique/shortcut-name">shortcut name feature</a>.
+	           	</p>
+           	</section>
+           	<section id="null-check-custom-example">
+           		<title>Custom Implementation Example</title>
+           		<p>
+           			In the theoretical example below, ACME corporation has a custom
+           			<code>isNull</code> method in their VSJO (Very Special Java Object)
+           			Java bean, that they want OJB to use for it's null-definition.
+           			(The <code>VSJO.java</code> source code is not provided - exact details
+           			are left to the reader's imagination...)
+           		</p>
+	           	<p>
+           			Example <code>NullCheck</code>-implementation,
+           			<code>NullCheckAcmeImpl.java</code>:
+          		</p>
+	           	<source><![CDATA[
+package com.acme.ojb;
+
+import org.apache.ojb.broker.metadata.FieldDescriptor;
+import com.acme.VSJO;
+
+/**
+ * Custom implementation of the OJB NullCheck-interface for our
+ * VSJO (Very Special Java Object).
+ * @author ACME Corporation
+ */
+public class NullCheckAcmeImpl implements NullCheck {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * Returns wether the given object value represents 'null' for the specified field.
+     * <p>
+     * Null is defined as:
+     *  <ul>
+     *   <li>for VSJO-objects: the 'isNull'-boolean field
+     *   <li>any other object: a 'null' object reference
+     *  </ul>
+     * @param fld descriptor representation of the persistent field
+     * @param aValue the value to check if it represents 'null'
+     * @return true if and only if aValue represents null
+     */
+    public boolean representsNull(FieldDescriptor fld, Object aValue)
+    {
+        boolean isNull = false;
+        if (aValue instanceof VSJO)
+        {
+            VSJO vsjo = (VSJO) aValue;
+            isNull = vsjo.isNull();
+        }
+        else
+        {
+            isNull = aValue == null;
+        }
+        return isNull;
+    }
+
+}
+	           	]]></source>
+	           	<p>
+           			Example <code>repository.xml</code> configuration snippet:
+          		</p>
+	           	<source><![CDATA[
+ <class-descriptor class="com.acme.VSJO" table="THE_DB_TABLE">
+  <field-descriptor column="ID" name="id" jdbc-type="NUMERIC"
+    primarykey="true" null-check="com.acme.ojb.NullCheckAcmeImpl" />
+  <field-descriptor column="TEXTDATA" name="textData" jdbc-type="VARCHAR" />
+ </class-descriptor>
+				]]></source>
+           	</section>
+        </section>
+
+
+    <anchor id="persistence-checker"/>
+        <section>
+            <title>How does OJB detect persistent objects</title>
+            <p>
+                From time to time OJB has to differ <em>persistent</em> objects (already stored) from other ones
+                (e.g. <em>transient</em> objects). To check for persistent objects OJB use implementations of
+                the <code>PersistenceChecker</code> interface.
+                <br/>
+                The implementation class is configurable via a <a href="site:repository/custom-attribute">custom attribute</a>
+                in the <a href="site:repository/jdbc-connection-descriptor">jdbc-connection-descriptor</a>.
+            </p>
+            <source><![CDATA[
+<jdbc-connection-descriptor
+   		jcd-alias="@JCD_ALIAS@"
+   		...
+     >
+    ...
+        <attribute attribute-name="persistenceChecker" attribute-value="solid" />
+    ...
+</jdbc-connection-descriptor>
+
+            ]]></source>
+            <p>
+                OJB is shipped with two implementation classes:
+            </p>
+            <table>
+                <tr>
+                    <th>Shortcut name</th>
+                    <th>Class</th>
+                    <th>Comment</th>
+                </tr>
+                <tr>
+                    <td>soild</td>
+                    <td><code>org.apache.ojb.broker.
+                        core.PersistenceCheckerSolidImpl</code></td>
+                    <td>
+                        Default implementation if the 'persistenceChecker' attribute is missing.
+                        This implementation does its best to detect the state of the persistence capable
+                        object in the last resort OJB perform a persistence storage roundup to check if the
+                        object was already persisted - e.g. this can happen when the primary key field isn't
+                        handled by OJB and the user set the primary key values by hand.
+                    </td>
+                </tr>
+                <tr>
+                    <td>optimized or opt</td>
+                    <td><code>org.apache.ojb.broker.
+                        core.PersistenceCheckerOptImpl</code></td>
+                    <td>
+                        Same behavier as <code>PersistenceCheckerSolidImpl</code> but the persistence storage
+                        roundup is disbaled and will never be performed.
+                        <note>
+                            This implementation is only recommended when OJB manage the id-generation via
+                            <a href="site:sequence-manager">sequence manager</a> and deleted objects only
+                            re-added with nullified primary key fields.
+                        </note>
+                    </td>
+                </tr>
+            </table>
+            <p>
+                Specify own implementations of the <code>PersistenceChecker</code> interface by using
+                the full qualified class name or OJB's <a href="#shortcut-name">shortcut name support</a>
+            </p>
+        </section>
+
+
+        <anchor id="shortcut-name"/>
+        <section>
+            <title>Shortcut name support</title>
+            <p>
+                OJB supports many features and often it's possible to choose different implementation
+                classes of a feature or/and to pluggin own implementations and extensions. By default
+                all customizable/pluggable properties need the full qualified class name of the implementation
+                class. But often this is real pain to use:
+            </p>
+            <source><![CDATA[
+...
+<field-descriptor
+ name="isSelloutArticle"
+ column="outarticle"
+ jdbc-type="INTEGER"
+ conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
+/>
+...]]></source>
+            <p>
+                If the property supports OJB's shortcut names, the mapping can be simplified to:
+            </p>
+<source><![CDATA[
+...
+<field-descriptor
+ name="isSelloutArticle"
+ column="Auslaufartikel"
+ jdbc-type="INTEGER"
+ conversion="Boolean2Int"
+/>
+...]]></source>
+            <p>
+                The shortcut name will be resolved by class <code>org.apache.ojb.broker.util.ShortcutMapper</code> using
+                method:
+            </p>
+            <source><![CDATA[
+ShortcutMapper.resolve(String shortcut, Class targetInterface)
+]]></source>
+            <p>
+                This class supports <em>hard coded</em> shortcut name mapping and <em>generic resolving</em> of
+                shortcut names using the specified target interface and a implementation class naming convention
+                shown below.
+            </p>
+            <p>
+                We explain the naming convention by example. In case the specified target interface is
+                <code>org.apache.ojb.broker.PersistenceChecker</code> and the shortcut name 'XYZ'. The naming rules are:
+            </p>
+            <ol>
+                <li>
+                    The implementation class reside in the same package as the target interface class. For example, if the
+                    interface is <code>org.apache.ojb.broker.PersistenceChecker</code>, the implementation class
+                    have use the same package <code>org.apache.ojb.broker</code>.
+                </li>
+                <li>
+                    The implementation class name have to match one of the following naming pattern by extending
+                    the target class interface name:
+                    <ul>
+                        <li>
+                            <code>PersistenceCheckerXYZ</code>
+                        </li>
+                        <li>
+                            <code>PersistenceCheckerXYZImpl</code>
+                        </li>
+                        <li>
+                            <code>XYZPersistenceChecker</code>
+                        </li>
+                        <li>
+                            <code>XYZPersistenceCheckerImpl</code>
+                        </li>
+                    </ul>
+                </li>
+            </ol>
+            <p>
+                Thus a valid implementation class name for the shortcut name 'XYZ' based on the example above is
+                <code>org.apache.ojb.broker.PersistenceCheckerXYZImpl</code>.
+            </p>
+            <note>
+                The first letter of the shortcut name is alway capitalized by OJB, thus for the example above
+                <em>xYZ</em> would be a valid shortcut name too.
+                <br/>
+                <br/>
+                It's strongly recommended to use some kind of "identitfier" in the user specific shortcut compatible
+                implementation classes to avoid name conflicts with OJB's internal used shortcut names or future
+                implementation classes.
+                <br/>
+                For example, it's not recommended to create user specific implementation classes called
+                <code>PersistenceCheckerNoopImpl</code> or <code>PersistenceCheckerFastImpl</code> (shortcut names will be
+                'noop'/'Noop' or 'fast'/'Fast'), because OJB could use this as internal shortcut mapping too or in a
+                future version.
+                <br/>
+                We recommend to add your companies short name at the beginning of the shortcut-name, e.g.
+                <code>PersistenceCheckerMyNoopImpl</code> or <code>PersistenceCheckerMyFastImpl</code>
+                (shortcut names will be 'myNoop'/'MyNoop' or 'myFast'/'MyFast').
+
+            </note>
         </section>
     </body>
 </document>

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/jdbc-types.xml
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/jdbc-types.xml?view=diff&rev=538385&r1=538384&r2=538385
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/jdbc-types.xml (original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/jdbc-types.xml Tue May 15 16:41:24 2007
@@ -19,7 +19,7 @@
 
 <document>
     <header>
-        <title>JDBC Types</title>
+        <title>JDBC/Java Types</title>
         <authors>
             <person name="Thomas Mahler" email="thma@apache.org"/>
             <person name="Armin Waibel" email="arminw@apache.org"/>
@@ -195,12 +195,20 @@
                     But many databases/jdbc-driver don't proper support type JAVA_OBJECT. In this case it's possible
                     to modify the database specific implementation class of interface
                     <a href="ext:platform"><code>org.apache.ojb.broker.platforms.Platform</code></a>.
-                    <br/>
+                </p>
+                <p>
                     For example, many databases support storing of Java objects but return the persisted Java objects
                     as <code>byte[]</code>-array instead of the deserialized java object. In this case it's possible to
-                    realise the correct behavior by modify the specific <code>Platform</code> implementation class
-                    (e.g. MaxDB, MySQL need specific handling of JAVA_OBJECT result set columns).
+                    realise the correct behavior by modify the specific <code>Platform</code> implementation class.
                 </p>
+                <note>
+                    OJB supports by default the specific handling of JAVA_OBJECT types in MaxDB/SapDB, MySQL and Oracle
+                    (HSQL supports JAVA_OBJECT type out of the box). These databases need specific handling of
+                    JAVA_OBJECT result set columns.
+                    <br/>
+                    In Oracle the JAVA_OBJECT must be mapped as BLOB and OJB internally materialize/deserialize
+                    the java object.
+                </note>
             </section>
 
         </section>
@@ -279,20 +287,8 @@
                     methods:
                     <code>javaToSql(...)</code> and
                     <code>sqlToJava(...)</code>:
-</p>
+                </p>
                     <source><![CDATA[
-/**
- * FieldConversion declares a protocol for type and value
- * conversions between persistent classes attributes and the columns
- * of the RDBMS.
- * The default implementation does not modify its input.
- * OJB users can use predefined implementation and can also
- * build their own conversions that perform arbitrary mappings.
- * the mapping has to defined in the xml repository
- * in the field-descriptor.
- *
- * @author Thomas Mahler
- */
 public interface FieldConversion extends Serializable
 {
     /**
@@ -411,8 +407,9 @@
             </section>
         </section>
 
+
         <section id="null-check">
-            <title>Definition of 'null' - the <code>NullCheck</code> Interface</title>
+            <title>Definition of 'null' values</title>
             <p>
             	By default OJB considers all primitive numerical fields (int, long, ...)
             	as 'null' when they contain a 0-value in Java.
@@ -421,150 +418,16 @@
             	reference is null, as expected.
            	</p>
            	<p>
-            	If you are using a primitive field that is part of eithar a primary key,
+            	If you are using a primitive field that is part of either a primary key,
             	foreign key or <a href="site:sequence-manager">sequence key</a> you
             	might want to change the default 'null'-definition in OJB for that
             	particular field to allow 0-values in the database. You might also define
             	your own complex definition of 'null' for a field that references a Java
-            	object in your application.
-           	</p>
-            <p>
-                OJB allows the use of predefined or self-implemented null-definitions
-                through the <code>org.apache.ojb.broker.accesslayer.NullCheck</code>
-                interface, configured with the 'null-check' attribute of the
-                <a href="site:repository/field-descriptor">field-descriptor</a>
-                in the metadata repository XML-file.
+            	object in your application. See
+                <a href="site:basic-technique/null-check">'definition of null' section in the
+                basic-technique guide</a> for details on how to do this.
             </p>
-            
-            
-            <!--
-            	TODO: Remove note and repository.xml warning when adding a future
-            	consistency check implementation.
-            -->
-            <note>
-            	If you change the default null-check class for a primary key field
-            	in the repository file,	be sure to also check the definition of fields
-            	in classes referencing the current one through foreign keys.
-            	See also: null-check
-            	<a href="site:repository/null-check-fkcheck-warn">syntax warning</a>.
-            </note>
-            
-            
-            <p>
-            	The <code>NullCheck</code> API defines one public method:
-           	</p>
-           	<source><![CDATA[
-/**
- * Returns wether the given object value represents 'null' for the specified field.
- * @param fld descriptor representation of the persistent field
- * @param aValue the value to check if it represents 'null' 
- * @return true if and only if aValue represents null
- */
-boolean representsNull(FieldDescriptor fld, Object aValue);
-           	]]></source>
-           	<section id="null-check-ojb">
-           		<title>Packaged Implementations</title>
-	            <p>
-	            	There are two implementations provided in the OJB distribution.
-	           	</p>
-	           	<table>
-	                <tr>
-	                    <th>Class</th>
-	                    <th>Comment</th>
-	                </tr>
-	                <tr>
-	                	<td>org.apache.ojb.broker.accesslayer.NullCheckDefaultImpl</td>
-	                	<td>Default implementation if the 'null-check' attribute is missing.
-	                	Defines 0 as null for primitive numerical fields and "" as null
-	                	for primary key fields.</td>
-	                </tr>
-	                <tr>
-	                	<td>org.apache.ojb.broker.accesslayer.NullCheckRelaxedImpl</td>
-	                	<td>No special handling of primitive fields or String values for
-	                	primary keys, only Java 'null' references are considered null.</td>
-	                </tr>
-	           	</table>
-           	</section>
-           	<section id="null-check-custom">
-           		<title>Custom Implementations</title>
-	           	<p>
-	           		To define you own definition of null for one or more persistent
-	           		fields, simply write a Java class that implements the
-	           		<code>org.apache.ojb.broker.accesslayer.NullCheck</code> interface
-	           		(or extends any default implementation)
-	           		and configure the <code>null-check</code> of the
-	           		<a href="site:repository/field-descriptor">field-descriptor</a>
-	           		with the fully qualified class name of this class.
-	           	</p>
-           	</section>
-           	<section id="null-check-custom-example">
-           		<title>Custom Implementation Example</title>
-           		<p>
-           			In the theoretical example below, ACME corporation has a custom
-           			<code>isNull</code> method in their VSJO (Very Special Java Object)
-           			Java bean, that they want OJB to use for it's null-definition.
-           			(The <code>VSJO.java</code> source code is not provided - exact details
-           			are left to the reader's imagination...)
-           		</p>
-	           	<p>
-           			Example <code>NullCheck</code>-implementation,
-           			<code>NullCheckAcmeImpl.java</code>:
-          		</p>
-	           	<source><![CDATA[
-package com.acme.ojb;
-
-import org.apache.ojb.broker.metadata.FieldDescriptor;
-import com.acme.VSJO;
-
-/**
- * Custom implementation of the OJB NullCheck-interface for our
- * VSJO (Very Special Java Object).
- * @author ACME Corporation
- */
-public class NullCheckAcmeImpl implements NullCheck {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * Returns wether the given object value represents 'null' for the specified field.
-     * <p>
-     * Null is defined as:
-     *  <ul>
-     *   <li>for VSJO-objects: the 'isNull'-boolean field
-     *   <li>any other object: a 'null' object reference
-     *  </ul>
-     * @param fld descriptor representation of the persistent field
-     * @param aValue the value to check if it represents 'null' 
-     * @return true if and only if aValue represents null
-     */
-    public boolean representsNull(FieldDescriptor fld, Object aValue)
-    {
-        boolean isNull = false;
-        if (aValue instanceof VSJO)
-        {
-            VSJO vsjo = (VSJO) aValue;
-            isNull = vsjo.isNull();
-        }
-        else
-        {
-            isNull = aValue == null;
-        }
-        return isNull;
-    }
-
-}
-	           	]]></source>
-	           	<p>
-           			Example <code>repository.xml</code> configuration snippet:
-          		</p>
-	           	<source><![CDATA[
- <class-descriptor class="com.acme.VSJO" table="THE_DB_TABLE">
-  <field-descriptor column="ID" name="id" jdbc-type="NUMERIC"
-    primarykey="true" null-check="com.acme.ojb.NullCheckAcmeImpl" />
-  <field-descriptor column="TEXTDATA" name="textData" jdbc-type="VARCHAR" />
- </class-descriptor>
-				]]></source>
-           	</section>
         </section>
+
     </body>
 </document>

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/objectcache.xml
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/objectcache.xml?view=diff&rev=538385&r1=538384&r2=538385
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/objectcache.xml (original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/objectcache.xml Tue May 15 16:41:24 2007
@@ -199,6 +199,12 @@
                 top-level class/interface (root class), all <em>object-cache</em> declarations
                 in the sub-classes will be ignored by OJB.
             </note>
+            <p>
+                The declaration of <em>object-cache</em> classes in the mapping file supports OJB's
+                <a href="site:basic-technique/shortcut-name">shortcut name feature</a>.
+            </p>
+
+
 
             <anchor id="cache-priority"/>
             <section>
@@ -367,11 +373,14 @@
                     only returned from cache if it was not garbage collected and was not timed out.
                 </p>
                 <p>
+                    This implementation supports a specific <a href="site:basic-technique/shortcut-name">shortcut name</a>
+                    '<em>default</em>' as convenience instead of the full qualified class name.
+                    <br/>
                     To enable this
                     <code>ObjectCache</code> implementation declare
                 </p>
                 <source><![CDATA[
-<object-cache class="org.apache.ojb.broker.cache.ObjectCacheDefaultImpl">
+<object-cache class="default">
     <attribute attribute-name="cacheExcludes" attribute-value=""/>
     <attribute attribute-name="timeout" attribute-value="900"/>
     <attribute attribute-name="autoSync" attribute-value="true"/>
@@ -496,20 +505,25 @@
                 </p>
                 <p>
                     The second level cache can be specified with the <em>applicationCache</em> property. Properties of
-                    the specified application cache are allowed too. Here is an example how to use the two level
+                    the specified application cache are allowed too. Below is an example how to use the two level
                     cache with <a href="#defaultImpl"><code>ObjectCacheDefaultImpl</code></a> as second level cache.
                 </p>
+                <p>
+                    This implementation supports a specific <a href="site:basic-technique/shortcut-name">shortcut name</a>
+                    '<em>twoLevel</em>' as convenience instead of the full qualified class name and shortcut names in the
+                    attributes 'applicationCache' and 'copyStrategy' are supported too.
+                </p>
                 <source><![CDATA[
-<object-cache class="org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl">
+<object-cache class="twoLevel">
     <!-- meaning of attributes, please see docs section "Caching" -->
     <!-- common attributes -->
     <attribute attribute-name="cacheExcludes" attribute-value=""/>
 
     <!-- ObjectCacheTwoLevelImpl attributes -->
     <attribute attribute-name="applicationCache"
-        attribute-value="org.apache.ojb.broker.cache.ObjectCacheDefaultImpl"/>
+        attribute-value="default"/>
     <attribute attribute-name="copyStrategy"
-        attribute-value="org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl$CopyStrategyImpl"/>
+        attribute-value="default"/>
     <attribute attribute-name="forceProxies" attribute-value="true"/>
 
     <!-- ObjectCacheDefaultImpl attributes -->
@@ -520,8 +534,8 @@
 </object-cache>]]></source>
                 <p>
                     The most important characteristic of the two-level cache is that all objects put to or read from
-                    the application cache are <strong>copies</strong> of the target object, so the cached objects never could be
-                    corrupted by the user when changing fields, because all operations done on copies of
+                    the application cache are <strong>copies</strong> of the target object, so the cached objects
+                    never could be corrupted by the user when changing fields, because all operations done on copies of
                     objects cached in the application cache (in contrast to
                     <a href="#defaultImpl">ObjectCacheDefaultImpl</a>).
                 </p>
@@ -649,6 +663,9 @@
                     broker instance the objects will be cached separately and each thread
                     should use it's own <em>PersistenceBroker</em> instance.
                 </p>
+                <p>
+                    Supports OJB's <a href="site:basic-technique/shortcut-name">shortcut name feature</a>.
+                </p>
             </section>
 
             <anchor id="emptyImpl"/>
@@ -662,6 +679,9 @@
                     This implementaion supports <em>circular references</em> as well (since OJB 1.0.2, materialization
                     of object graphs with circular references will be handled internally by OJB).
                 </note>
+                <p>
+                    Supports OJB's <a href="site:basic-technique/shortcut-name">shortcut name feature</a>.
+                </p>
             </section>
 
 
@@ -673,6 +693,9 @@
                     each classname. More info see
                     <a href="ext:jakarta/jcs">turbine-JCS</a>.
                 </p>
+                <p>
+                    Supports OJB's <a href="site:basic-technique/shortcut-name">shortcut name feature</a>.
+                </p>
             </section>
 
 
@@ -853,6 +876,9 @@
                     class on <a href="#changeImplementation">connection- or class-level</a>) or as application
                     cache in the <a href="#two-level">two-level cache</a>.
                 </p>
+                <p>
+                    Supports OJB's <a href="site:basic-technique/shortcut-name">shortcut name feature</a>.
+                </p>
             </section>
 
 
@@ -911,7 +937,22 @@
                 <a href="ext:api/cache-interface-internal">ObjectCacheInternal</a> interface (For an
                 implementation example see source for <a href="ext:api/cache-two-level">ObjectCacheTwoLevelImpl</a>).
             </p>
-
+            <p>
+                The <em>object cache</em> declaration supports OJB's
+                <a href="site:basic-technique/shortcut-name">shortcut name feature</a>, so
+                if we change the package of your example to <code>org.apache.ojb.broker.cache</code>
+                the mapping can be simplified to
+            </p>
+            <source><![CDATA[
+<jdbc-connection-descriptor
+    jcd-alias="myDefault"
+    ...
+>
+    <object-cache class="My">
+        <attribute attribute-name="cacheExcludes" attribute-value=""/>
+        ... additional attributes of the cache
+     </object-cache>
+</jdbc-connection-descriptor]]></source>
             <note>
                 Of course we interested in your solutions! If you have
                 implemented something interesting, just contact us.

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/repository.xml
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/repository.xml?view=diff&rev=538385&r1=538384&r2=538385
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/repository.xml (original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/repository.xml Tue May 15 16:41:24 2007
@@ -553,6 +553,16 @@
                         transient objects. Normally there is no need to change this. 
                     </p>
                     <p>
+                        Attribute <em>persistenceChecker</em>: Specifies the <code>PersistenceChecker</code> implementation
+                        class used by this entity. The <code>PersistenceChecker</code> class is responsible to differ
+                        persistent objects from other ones (e.g. transient objects). OJB make available two implementations
+                        via shortcut names: 'optimized' and 'solid'. The real implementation classes can be found under
+                        <code>PersistenceCheckerXYZImpl</code> (replace XYZ with Solid or Optimized).
+                        <br/>
+                        More details about this please see
+                        <a href="site:basic-technique/persistence-checker">basic technique guide</a>.
+                    </p>
+                    <p>
                         Other platform specific settings are shown below.
                     </p>
                     <p>
@@ -585,12 +595,21 @@
     <attribute attribute-name="initializationCheck" attribute-value="false" />
 
     <!--
+        Specifies the PersistenceChecker implementation class. OJB make available two
+        implementations via shortcut names: 'solid' and 'optimized'. The first one can
+        produce additional persistence storage roundup to differ persistent objects from
+        other ones. More details please see PB-guide or FAQ.
+    -->
+    <attribute attribute-name="persistenceChecker" attribute-value="solid" />
+
+    <!--
         To create identity objects for transient (non-persist) objects  OJB use
         a specific sequence manager implementation to generate transient key values.
         The default implementation is org.apache.ojb.broker.util.sequence.SequenceManagerTransientImpl.
         Use this property to plug in user specific implementations.
     -->
-    <!--<attribute attribute-name="sequenceManagerTransient" attribute-value="my.SequenceManagerTransient" />-->
+    <!--<attribute attribute-name="sequenceManagerTransient"
+    attribute-value="my.SequenceManagerTransient" />-->
 
 
     <!-- ** Attributes with name prefix "platform." are used to allow database
@@ -1336,7 +1355,7 @@
                 <p>
                     The <em>field-class</em> attribute can be used to override the
                     <a href="site:advanced-technique/persistent-field"><code>PersistentField</code></a> implementation
-                    class.
+                    class. OJB's <a href="site:basic-technique/shortcut-name">shortcut name feature</a> is supported.
                 </p>
 
                 <source><![CDATA[
@@ -1477,9 +1496,10 @@
                     attributes and database columns. More about
                     <a href="site:jdbc-types/field-conversion">field conversion</a>.
                 </p>
+                <anchor id="null-check"/>
                 <p>
                     The optional <em>null-check</em> attribute (since OJB 1.0.5) should
-                    contain a fully qualified class name.
+                    contain a fully qualified class name or a valid shortcut name.
                     This class must implement the interface
                     <code>org.apache.ojb.broker.accesslayer.NullCheck</code>.
                     A NullCheck can be used to implement special requirements for
@@ -1487,7 +1507,7 @@
                     The default is <code>org.apache.ojb.broker.accesslayer.NullCheckDefaultImpl</code>
                     and an alternative, <code>org.apache.ojb.broker.accesslayer.NullCheckRelaxedImpl</code>,
                     is provided.                    
-					See the documentation of the <a href="site:jdbc-types/null-check">NullCheck</a>
+					See the documentation of the <a href="site:basic-technique/null-check">NullCheck</a>
 					interface for details on OJB-provided implementations and how to write
 					your own.					
                 </p>
@@ -1541,7 +1561,7 @@
                 <p>
                     The <em>field-class</em> attribute can be used to override the
                     <a href="site:advanced-technique/persistent-field"><code>PersistentField</code></a> implementation
-                    class.
+                    class. OJB's <a href="site:basic-technique/shortcut-name">shortcut name feature</a> is supported.
                 </p>
                 <source><![CDATA[
 <!ATTLIST field-descriptor

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/sequencemanager.xml
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/sequencemanager.xml?view=diff&rev=538385&r1=538384&r2=538385
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/sequencemanager.xml (original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/sequencemanager.xml Tue May 15 16:41:24 2007
@@ -426,6 +426,7 @@
 <sequence-manager className="memory">
     <attribute attribute-name="seq.start" attribute-value="0"/>
     <attribute attribute-name="seq.autoNaming" attribute-value="true"/>
+    <attribute attribute-name="seq.optimized" attribute-value="true"/>
 </sequence-manager>]]></source>
                     <p>
                         The property
@@ -436,6 +437,13 @@
                         used as foreign key in references.
                     </p>
                     <p>
+                        If property
+                        <code>seq.optimized</code> is set <em>true</em> (default setting) the sequence manager
+                        use optimizations for best performance in multithreaded environments - but continuous
+                        use of id numbers is not guaranteed. If <em>false</em> this implementation use a simple
+                        counter for each sequence name.
+                    </p>
+                    <p>
                         This sequence manager implementation supports <em>user defined
                         sequence-names</em> as well as <em>automatic generated sequence-names</em>
                         to manage the sequences - more about <a href="#sequence-name">sequence-names</a>.
@@ -1176,6 +1184,16 @@
                 <p>
                     method get the properties in your implementation class.
                 </p>
+                <p>
+                    The <em>sequence manager</em> declaration supports OJB's
+                    <a href="site:basic-technique/shortcut-name">shortcut name feature</a>, so
+                    if we change the package of your example to <code>org.apache.ojb.broker.utils.sequence</code>
+                    the mapping can be simplified to
+                </p>
+                <source><![CDATA[
+<sequence-manager className="MY">
+    <attribute attribute-name="myProperty" attribute-value="test"/>
+</sequence-manager>]]></source>
 
                 <note>
                     Of course we interested in your solutions! If you have
@@ -1394,7 +1412,7 @@
                         If you use multiple databases you have to declare a sequence manager in each
                         <code>jdbc-connection-descriptor</code>. If you don't specify a sequence manager
                         OJB use a default one (currently
-                        <code>ojb.broker.util.sequence.SequenceManagerHighLowImpl</code>).
+                        <a href="#high-low"><code>ojb.broker.util.sequence.SequenceManagerInMemoryImpl</code></a>).
                     </p>
                 </section>
 

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/features.xml
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/features.xml?view=diff&rev=538385&r1=538384&r2=538385
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/features.xml (original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/features.xml Tue May 15 16:41:24 2007
@@ -62,7 +62,7 @@
                 <em>JdbcAccess</em>, ... and so on.
             </li>
             <li>
-                Quality assurance taken seriously: More than <strong>800</strong>
+                Quality assurance taken seriously: More than <strong>1000</strong>
                 <a href="site:test-suite"><em>JUnit Test Cases</em></a> for
                 regression tests. JUnit tests are integrated into the build scripts and
                 used as quality assurance for daily development.

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/site.xml
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/site.xml?view=diff&rev=538385&r1=538384&r2=538385
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/site.xml (original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/site.xml Tue May 15 16:41:24 2007
@@ -128,7 +128,7 @@
                 <select-profile href="#select-profile"/>
             </platform>
             <ojb-properties label="OJB property file" href="ojb-properties.html"/>
-            <jdbc-types label="JDBC Types" href="jdbc-types.html">
+            <jdbc-types label="JDBC/Java Types" href="jdbc-types.html">
                 <jdbc-mapping href="#jdbc-mapping"/>
                 <field-conversion href="#field-conversion"/>
                 <null-check href="#null-check"/>
@@ -155,6 +155,7 @@
                 <load-repository href="#load-repository"/>
                 <stored-procedures href="#stored-procedures"/>
                 <batch-mode href="#batch-mode"/>
+                <null-check href="#null-check"/>
             </repository>
 
             <!-- auto-generated html-site of repository.dtd -->
@@ -172,6 +173,9 @@
                 <collection-proxy href="#collection-proxy"/>
                 <reference-proxy href="#reference-proxy"/>
                 <proxy-customization href="#proxy-customization"/>
+                <null-check href="#null-check"/>
+                <persistence-checker href="#persistence-checker"/>
+                <shortcut-name href="#shortcut-name"/>
             </basic-technique>
             <advanced-technique label="Advanced mapping" href="advanced-technique.html">
                 <anonymous-keys href="#anonymous-keys"/>



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message