You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by tr...@apache.org on 2015/04/08 22:34:17 UTC

svn commit: r1672168 [21/33] - in /jackrabbit/site/live/jcr: ./ components/ css/ images/ images/logos/ images/profiles/ img/ js/ ocm/ status/

Added: jackrabbit/site/live/jcr/ocm/mapping-atomic-fields.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/jcr/ocm/mapping-atomic-fields.html?rev=1672168&view=auto
==============================================================================
--- jackrabbit/site/live/jcr/ocm/mapping-atomic-fields.html (added)
+++ jackrabbit/site/live/jcr/ocm/mapping-atomic-fields.html Wed Apr  8 20:34:14 2015
@@ -0,0 +1,639 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2015-04-08 
+ | Rendered using Apache Maven Fluido Skin 1.3.1
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20150408" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache Jackrabbit - Mapping Atomic Fields</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.1.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.1.min.js"></script>
+
+    
+                  </head>
+        <body class="topBarEnabled">
+          
+    
+    
+            
+    
+    
+    <a href="http://github.com/apache/jackrabbit">
+      <img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
+        src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"
+        alt="Fork me on GitHub">
+    </a>
+  
+                
+                    
+                
+
+    <div id="topbar" class="navbar navbar-fixed-top ">
+      <div class="navbar-inner">
+                <div class="container-fluid">
+        <a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar">
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+        </a>
+                
+                                                                                <a class="brand" href="../index.html"  title="Apache Jackrabbit">
+
+                                
+                                                                                                                    <img src="../images/logos/jlogo.gif" alt="Apache Jackrabbit" />
+                
+                </a>
+                    
+                                <ul class="nav">
+                          <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache Jackrabbit <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../index.html"  title="Welcome">Welcome</a>
+</li>
+                  
+                      <li>      <a href="../downloads.html"  title="Downloads">Downloads</a>
+</li>
+                  
+                      <li>      <a href="../articles.html"  title="Articles">Articles</a>
+</li>
+                  
+                      <li>      <a href="../frequently-asked-questions.html"  title="FAQ">FAQ</a>
+</li>
+                  
+                      <li>      <a href="http://wiki.apache.org/jackrabbit/FrontPage"  title="Jackrabbit Wiki">Jackrabbit Wiki</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-history.html"  title="Jackrabbit History">Jackrabbit History</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Documentation <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../getting-started-with-apache-jackrabbit.html"  title="Getting Started">Getting Started</a>
+</li>
+                  
+                      <li>      <a href="../standalone-server.html"  title="Standalone Server">Standalone Server</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-components.html"  title="Jackrabbit Components">Jackrabbit Components</a>
+</li>
+                  
+                      <li>      <a href="../first-hops.html"  title="First Hops">First Hops</a>
+</li>
+                  
+                      <li>      <a href="../jcr-api.html"  title="JCR & API">JCR & API</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-architecture.html"  title="Jackrabbit Architecture">Jackrabbit Architecture</a>
+</li>
+                  
+                      <li>      <a href="../deployment-models.html"  title="Deployment Models">Deployment Models</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-configuration.html"  title="Jackrabbit Configuration">Jackrabbit Configuration</a>
+</li>
+                  
+                      <li>      <a href="../node-types.html"  title="Node Types">Node Types</a>
+</li>
+                  
+                      <li>      <a href="../object-content-mapping.html"  title="Object Content Mapping">Object Content Mapping</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Development <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../jackrabbit-team.html"  title="Jackrabbit Team">Jackrabbit Team</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-roadmap.html"  title="Jackrabbit Roadmap">Jackrabbit Roadmap</a>
+</li>
+                  
+                      <li>      <a href="../building-jackrabbit.html"  title="Building Jackrabbit">Building Jackrabbit</a>
+</li>
+                  
+                      <li>      <a href="../mailing-lists.html"  title="Mailing Lists">Mailing Lists</a>
+</li>
+                  
+                      <li>      <a href="../issue-tracker.html"  title="Issue Tracker">Issue Tracker</a>
+</li>
+                  
+                      <li>      <a href="../source-repository.html"  title="Source Repository">Source Repository</a>
+</li>
+                  
+                      <li>      <a href="../continuous-integration.html"  title="Continuous Integration">Continuous Integration</a>
+</li>
+                  
+                      <li>      <a href="../website.html"  title="Website">Website</a>
+</li>
+                  
+                      <li>      <a href="../creating-releases.html"  title="Creating Releases">Creating Releases</a>
+</li>
+                  
+                      <li>      <a href="../supporting-software-attribution.html"  title="Attribution">Attribution</a>
+</li>
+                  
+                      <li>      <a href="../privacy-policy.html"  title="Privacy">Privacy</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache Software Foundation <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="http://www.apache.org/foundation/how-it-works.html"  title="Introduction">Introduction</a>
+</li>
+                  
+                      <li>      <a href="http://www.apache.org/foundation/sponsorship.html"  title="Sponsorship">Sponsorship</a>
+</li>
+                  
+                      <li>      <a href="http://www.apache.org/foundation/thanks.html"  title="Current Sponsors">Current Sponsors</a>
+</li>
+                          </ul>
+      </li>
+                  </ul>
+          
+          
+          
+                   
+                      </div>
+          
+        </div>
+      </div>
+    </div>
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                <div id="bannerLeft">
+                <h2>Apache Jackrabbit Site</h2>
+                </div>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2015-04-08
+                   </li>
+                      
+                
+                    
+      
+                            </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Apache Jackrabbit</li>
+                              
+      <li>
+  
+                          <a href="../index.html" title="Welcome">
+          <i class="none"></i>
+        Welcome</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../downloads.html" title="Downloads">
+          <i class="none"></i>
+        Downloads</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../articles.html" title="Articles">
+          <i class="none"></i>
+        Articles</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../frequently-asked-questions.html" title="FAQ">
+          <i class="none"></i>
+        FAQ</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://wiki.apache.org/jackrabbit/FrontPage" class="externalLink" title="Jackrabbit Wiki">
+          <i class="none"></i>
+        Jackrabbit Wiki</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-history.html" title="Jackrabbit History">
+          <i class="none"></i>
+        Jackrabbit History</a>
+            </li>
+                              <li class="nav-header">Documentation</li>
+                              
+      <li>
+  
+                          <a href="../getting-started-with-apache-jackrabbit.html" title="Getting Started">
+          <i class="none"></i>
+        Getting Started</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../standalone-server.html" title="Standalone Server">
+          <i class="none"></i>
+        Standalone Server</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-components.html" title="Jackrabbit Components">
+          <i class="none"></i>
+        Jackrabbit Components</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../first-hops.html" title="First Hops">
+          <i class="none"></i>
+        First Hops</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jcr-api.html" title="JCR & API">
+          <i class="none"></i>
+        JCR & API</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-architecture.html" title="Jackrabbit Architecture">
+          <i class="none"></i>
+        Jackrabbit Architecture</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../deployment-models.html" title="Deployment Models">
+          <i class="none"></i>
+        Deployment Models</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-configuration.html" title="Jackrabbit Configuration">
+          <i class="none"></i>
+        Jackrabbit Configuration</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../node-types.html" title="Node Types">
+          <i class="none"></i>
+        Node Types</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../object-content-mapping.html" title="Object Content Mapping">
+          <i class="none"></i>
+        Object Content Mapping</a>
+            </li>
+                              <li class="nav-header">Development</li>
+                              
+      <li>
+  
+                          <a href="../jackrabbit-team.html" title="Jackrabbit Team">
+          <i class="none"></i>
+        Jackrabbit Team</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-roadmap.html" title="Jackrabbit Roadmap">
+          <i class="none"></i>
+        Jackrabbit Roadmap</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../building-jackrabbit.html" title="Building Jackrabbit">
+          <i class="none"></i>
+        Building Jackrabbit</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../mailing-lists.html" title="Mailing Lists">
+          <i class="none"></i>
+        Mailing Lists</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../issue-tracker.html" title="Issue Tracker">
+          <i class="none"></i>
+        Issue Tracker</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../source-repository.html" title="Source Repository">
+          <i class="none"></i>
+        Source Repository</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../continuous-integration.html" title="Continuous Integration">
+          <i class="none"></i>
+        Continuous Integration</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../website.html" title="Website">
+          <i class="none"></i>
+        Website</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../creating-releases.html" title="Creating Releases">
+          <i class="none"></i>
+        Creating Releases</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../supporting-software-attribution.html" title="Attribution">
+          <i class="none"></i>
+        Attribution</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../privacy-policy.html" title="Privacy">
+          <i class="none"></i>
+        Privacy</a>
+            </li>
+                              <li class="nav-header">Apache Software Foundation</li>
+                              
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/how-it-works.html" class="externalLink" title="Introduction">
+          <i class="none"></i>
+        Introduction</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship">
+          <i class="none"></i>
+        Sponsorship</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Current Sponsors">
+          <i class="none"></i>
+        Current Sponsors</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr />
+
+           <div id="poweredBy">
+                   
+    <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
+
+    
+    <div class="g-plusone" data-href="http://www.apache.org/jackrabbit-site/" data-size="tall" ></div>
+
+                   <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                             <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+        <img class="builtBy" alt="Built by Maven" src="../images/logos/maven-feather.png" />
+      </a>
+                  </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License. --><h1>Mapping Atomic Fields</h1>
+<p>The field-descriptor maps a bean attribute based on a Java primitive type into a JCR property. By default, the persistence manager uses the correct mapping in function of the attribute type (see below the section &#x201c;Supported Types&#x201d;).</p>
+<p>Based on our model defined here, the following field-descriptor maps the bean field &#x201c;title&#x201d; (String type) into the JCR property &#x201c;my:title&#x201d;.</p>
+<div class="section">
+<h2>Supported Types<a name="Supported_Types"></a></h2>
+<p>It is not necessary to specify the type in the field-descriptor. The Persistence Manager uses the java introspection to get information on each atomic field.</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+<th> Java Type </th>
+<th> Jcr Type </th></tr>
+
+<tr class="b">
+<td> String </td>
+<td> STRING </td></tr>
+
+<tr class="a">
+<td> Boolean, boolean </td>
+<td> BOOLEAN </td></tr>
+
+<tr class="b">
+<td> Double, double </td>
+<td> DOUBLE </td></tr>
+
+<tr class="a">
+<td> Integer, int </td>
+<td> DOUBLE </td></tr>
+
+<tr class="b">
+<td> Long, long </td>
+<td> LONG </td></tr>
+
+<tr class="a">
+<td> byte\[\](\.html)
+ </td>
+<td> BINARY </td></tr>
+
+<tr class="b">
+<td> java.io.InputStream </td>
+<td> BINARY </td></tr>
+
+<tr class="a">
+<td> java.util.Calendar </td>
+<td> LONG (corresponding to Calendar.getTimeInMillis() </td></tr>
+
+<tr class="b">
+<td> java.sql.Timestamp </td>
+<td> LONG (corresponding to Timestamp.getTime() </td></tr>
+
+<tr class="a">
+<td> java.util.Date </td>
+<td> LONG (corresponding to java.util.Date.getTime() </td></tr>
+</table>
+<p>Due to some issues with Jackrabbit (mainly with xpath queries), Calendar, Timestamp and date are converted into JCR LONG. We plan to add other converters for those types in the next release.</p></div>
+<div class="section">
+<h2>Using Another Atomic Type Converter<a name="Using_Another_Atomic_Type_Converter"></a></h2>
+<p>The OCM framework gives you the freedom to choose another kind of mapping for atomic fields. For example, you can convert java.util.Date bean field into a JCR Date type instead of a JCR Long type. This can be done by writing your own atomic type converter class.</p>
+<p>Let&#x2019;s start with a simple example. If you want to use a mapping strategy which convert a boolean bean field into a JCR Long type, you have to make the following steps:</p>
+<div class="section">
+<h3>Specify the converter class in the field descriptor<a name="Specify_the_converter_class_in_the_field_descriptor"></a></h3>
+
+<div class="source">
+<pre>&lt;class-descriptor
+    className=&quot;org.apache.jackrabbit.ocm.testmodel.Atomic&quot;
+    jcrType=&quot;nt:unstructured&quot;&gt;
+  &lt;field-descriptor
+      fieldName=&quot;int2boolean&quot; 
+      jcrName=&quot;int2boolean&quot;
+      converter=&quot;org.apache.jackrabbit.ocm.persistence.atomic.Int2BooleanTypeConverterImpl&quot;
+  /&gt;
+&lt;/class-descriptor&gt;
+</pre></div></div>
+<div class="section">
+<h3>Implement the converter class<a name="Implement_the_converter_class"></a></h3>
+<p>Use the interface org.apache.jackrabbit.ocm.persistence.atomic.AtomicTypeConverter</p>
+
+<div class="source">
+<pre>package org.apache.jackrabbit.ocm.persistence.atomic;
+
+import javax.jcr.Value;
+import javax.jcr.ValueFactory;
+
+import org.apache.jackrabbit.ocm.exception.IncorrectAtomicTypeException;
+import org.apache.jackrabbit.ocm.persistence.atomictypeconverter.AtomicTypeConverter;
+
+/**
+ * This is a simple converter which convert a boolean field value into a jcr long property.
+ *
+ * @author &lt;a href=&quot;mailto:christophe.lombart@gmail.com&quot;&gt;Christophe Lombart&lt;/a&gt;
+ */
+public class Int2BooleanTypeConverterImpl implements AtomicTypeConverter
+{
+  /**
+   *
+   * @see org.apache.jackrabbit.ocm.persistence.atomictypeconverter.AtomicTypeConverter#getValue(java.lang.Object)
+   */
+  public Value getValue(ValueFactory valueFactory, Object propValue)
+  {
+    if (propValue == null)
+    {
+      return null;
+    }
+    boolean value = ((Boolean) propValue).booleanValue();
+    int jcrValue = 0;
+
+    if (value)
+    {
+      jcrValue = 1;
+    }
+    return valueFactory.createValue(jcrValue);
+  }
+
+
+    /**
+     *
+     * @see org.apache.jackrabbit.ocm.persistence.atomictypeconverter.AtomicTypeConverter#getObject(javax.jcr.Value)
+     */
+  public Object getObject(Value value)
+    {
+      try
+      {
+    long jcrValue = value.getLong();
+    if (jcrValue == 1)
+    {
+       return new Boolean(true);
+    }
+    else
+    {
+       return new Boolean(false);
+    }
+    }
+    catch (Exception e)
+    {
+      throw new IncorrectAtomicTypeException(&quot;Impossible to convert the value : &quot; + value.toString()  , e);
+    }
+    }
+
+  /**
+   *
+   * @see org.apache.jackrabbit.ocm.persistence.atomictypeconverter.AtomicTypeConverter#getStringValue(java.lang.Object)
+   */
+  public String getStringValue(Object object)
+  {
+
+    return ((Boolean) object).booleanValue() ? &quot;1&quot; : &quot;0&quot;;
+  }
+
+}
+</pre></div></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+                      <div class="row-fluid">
+                              <p >Copyright &copy;                    2015
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All rights reserved.      
+                    
+      </p>
+        </div>
+
+        
+        
+          
+    
+    
+    <div id="ohloh" class="pull-right">
+      <script type="text/javascript" src="http://www.ohloh.net/p/jackrabbit/widgets/project_users_logo.js"></script>
+    </div>
+        </div>
+    </footer>
+        </body>
+</html>
\ No newline at end of file

Added: jackrabbit/site/live/jcr/ocm/mapping-bean-fields.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/jcr/ocm/mapping-bean-fields.html?rev=1672168&view=auto
==============================================================================
--- jackrabbit/site/live/jcr/ocm/mapping-bean-fields.html (added)
+++ jackrabbit/site/live/jcr/ocm/mapping-bean-fields.html Wed Apr  8 20:34:14 2015
@@ -0,0 +1,626 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2015-04-08 
+ | Rendered using Apache Maven Fluido Skin 1.3.1
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20150408" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache Jackrabbit - Mapping Bean Fields</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.1.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.1.min.js"></script>
+
+    
+                  </head>
+        <body class="topBarEnabled">
+          
+    
+    
+            
+    
+    
+    <a href="http://github.com/apache/jackrabbit">
+      <img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
+        src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"
+        alt="Fork me on GitHub">
+    </a>
+  
+                
+                    
+                
+
+    <div id="topbar" class="navbar navbar-fixed-top ">
+      <div class="navbar-inner">
+                <div class="container-fluid">
+        <a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar">
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+        </a>
+                
+                                                                                <a class="brand" href="../index.html"  title="Apache Jackrabbit">
+
+                                
+                                                                                                                    <img src="../images/logos/jlogo.gif" alt="Apache Jackrabbit" />
+                
+                </a>
+                    
+                                <ul class="nav">
+                          <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache Jackrabbit <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../index.html"  title="Welcome">Welcome</a>
+</li>
+                  
+                      <li>      <a href="../downloads.html"  title="Downloads">Downloads</a>
+</li>
+                  
+                      <li>      <a href="../articles.html"  title="Articles">Articles</a>
+</li>
+                  
+                      <li>      <a href="../frequently-asked-questions.html"  title="FAQ">FAQ</a>
+</li>
+                  
+                      <li>      <a href="http://wiki.apache.org/jackrabbit/FrontPage"  title="Jackrabbit Wiki">Jackrabbit Wiki</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-history.html"  title="Jackrabbit History">Jackrabbit History</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Documentation <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../getting-started-with-apache-jackrabbit.html"  title="Getting Started">Getting Started</a>
+</li>
+                  
+                      <li>      <a href="../standalone-server.html"  title="Standalone Server">Standalone Server</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-components.html"  title="Jackrabbit Components">Jackrabbit Components</a>
+</li>
+                  
+                      <li>      <a href="../first-hops.html"  title="First Hops">First Hops</a>
+</li>
+                  
+                      <li>      <a href="../jcr-api.html"  title="JCR & API">JCR & API</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-architecture.html"  title="Jackrabbit Architecture">Jackrabbit Architecture</a>
+</li>
+                  
+                      <li>      <a href="../deployment-models.html"  title="Deployment Models">Deployment Models</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-configuration.html"  title="Jackrabbit Configuration">Jackrabbit Configuration</a>
+</li>
+                  
+                      <li>      <a href="../node-types.html"  title="Node Types">Node Types</a>
+</li>
+                  
+                      <li>      <a href="../object-content-mapping.html"  title="Object Content Mapping">Object Content Mapping</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Development <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../jackrabbit-team.html"  title="Jackrabbit Team">Jackrabbit Team</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-roadmap.html"  title="Jackrabbit Roadmap">Jackrabbit Roadmap</a>
+</li>
+                  
+                      <li>      <a href="../building-jackrabbit.html"  title="Building Jackrabbit">Building Jackrabbit</a>
+</li>
+                  
+                      <li>      <a href="../mailing-lists.html"  title="Mailing Lists">Mailing Lists</a>
+</li>
+                  
+                      <li>      <a href="../issue-tracker.html"  title="Issue Tracker">Issue Tracker</a>
+</li>
+                  
+                      <li>      <a href="../source-repository.html"  title="Source Repository">Source Repository</a>
+</li>
+                  
+                      <li>      <a href="../continuous-integration.html"  title="Continuous Integration">Continuous Integration</a>
+</li>
+                  
+                      <li>      <a href="../website.html"  title="Website">Website</a>
+</li>
+                  
+                      <li>      <a href="../creating-releases.html"  title="Creating Releases">Creating Releases</a>
+</li>
+                  
+                      <li>      <a href="../supporting-software-attribution.html"  title="Attribution">Attribution</a>
+</li>
+                  
+                      <li>      <a href="../privacy-policy.html"  title="Privacy">Privacy</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache Software Foundation <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="http://www.apache.org/foundation/how-it-works.html"  title="Introduction">Introduction</a>
+</li>
+                  
+                      <li>      <a href="http://www.apache.org/foundation/sponsorship.html"  title="Sponsorship">Sponsorship</a>
+</li>
+                  
+                      <li>      <a href="http://www.apache.org/foundation/thanks.html"  title="Current Sponsors">Current Sponsors</a>
+</li>
+                          </ul>
+      </li>
+                  </ul>
+          
+          
+          
+                   
+                      </div>
+          
+        </div>
+      </div>
+    </div>
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                <div id="bannerLeft">
+                <h2>Apache Jackrabbit Site</h2>
+                </div>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2015-04-08
+                   </li>
+                      
+                
+                    
+      
+                            </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Apache Jackrabbit</li>
+                              
+      <li>
+  
+                          <a href="../index.html" title="Welcome">
+          <i class="none"></i>
+        Welcome</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../downloads.html" title="Downloads">
+          <i class="none"></i>
+        Downloads</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../articles.html" title="Articles">
+          <i class="none"></i>
+        Articles</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../frequently-asked-questions.html" title="FAQ">
+          <i class="none"></i>
+        FAQ</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://wiki.apache.org/jackrabbit/FrontPage" class="externalLink" title="Jackrabbit Wiki">
+          <i class="none"></i>
+        Jackrabbit Wiki</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-history.html" title="Jackrabbit History">
+          <i class="none"></i>
+        Jackrabbit History</a>
+            </li>
+                              <li class="nav-header">Documentation</li>
+                              
+      <li>
+  
+                          <a href="../getting-started-with-apache-jackrabbit.html" title="Getting Started">
+          <i class="none"></i>
+        Getting Started</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../standalone-server.html" title="Standalone Server">
+          <i class="none"></i>
+        Standalone Server</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-components.html" title="Jackrabbit Components">
+          <i class="none"></i>
+        Jackrabbit Components</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../first-hops.html" title="First Hops">
+          <i class="none"></i>
+        First Hops</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jcr-api.html" title="JCR & API">
+          <i class="none"></i>
+        JCR & API</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-architecture.html" title="Jackrabbit Architecture">
+          <i class="none"></i>
+        Jackrabbit Architecture</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../deployment-models.html" title="Deployment Models">
+          <i class="none"></i>
+        Deployment Models</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-configuration.html" title="Jackrabbit Configuration">
+          <i class="none"></i>
+        Jackrabbit Configuration</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../node-types.html" title="Node Types">
+          <i class="none"></i>
+        Node Types</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../object-content-mapping.html" title="Object Content Mapping">
+          <i class="none"></i>
+        Object Content Mapping</a>
+            </li>
+                              <li class="nav-header">Development</li>
+                              
+      <li>
+  
+                          <a href="../jackrabbit-team.html" title="Jackrabbit Team">
+          <i class="none"></i>
+        Jackrabbit Team</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-roadmap.html" title="Jackrabbit Roadmap">
+          <i class="none"></i>
+        Jackrabbit Roadmap</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../building-jackrabbit.html" title="Building Jackrabbit">
+          <i class="none"></i>
+        Building Jackrabbit</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../mailing-lists.html" title="Mailing Lists">
+          <i class="none"></i>
+        Mailing Lists</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../issue-tracker.html" title="Issue Tracker">
+          <i class="none"></i>
+        Issue Tracker</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../source-repository.html" title="Source Repository">
+          <i class="none"></i>
+        Source Repository</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../continuous-integration.html" title="Continuous Integration">
+          <i class="none"></i>
+        Continuous Integration</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../website.html" title="Website">
+          <i class="none"></i>
+        Website</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../creating-releases.html" title="Creating Releases">
+          <i class="none"></i>
+        Creating Releases</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../supporting-software-attribution.html" title="Attribution">
+          <i class="none"></i>
+        Attribution</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../privacy-policy.html" title="Privacy">
+          <i class="none"></i>
+        Privacy</a>
+            </li>
+                              <li class="nav-header">Apache Software Foundation</li>
+                              
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/how-it-works.html" class="externalLink" title="Introduction">
+          <i class="none"></i>
+        Introduction</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship">
+          <i class="none"></i>
+        Sponsorship</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Current Sponsors">
+          <i class="none"></i>
+        Current Sponsors</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr />
+
+           <div id="poweredBy">
+                   
+    <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
+
+    
+    <div class="g-plusone" data-href="http://www.apache.org/jackrabbit-site/" data-size="tall" ></div>
+
+                   <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                             <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+        <img class="builtBy" alt="Built by Maven" src="../images/logos/maven-feather.png" />
+      </a>
+                  </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License. --><h1>Mapping Bean Fields</h1>
+<p>The bean-descriptor maps a bean attribute into one JCR node (or a set of properties). Generally, this attribute is an object based on a custom class.</p>
+<p>Based on our model defined here, the following bean-descriptor is used to map the bean field &#x201c;pageInfo&#x201d; (PageInfo class) into the JCR node called &#x201c;pageInfo&#x201d;.</p>
+<p>The PageInfo class has a corresponding class-descriptor in the mapping file. By this way, the Persistence Manager can map each PageInfo attributes. It is not necessary to specify the type in the bean-descriptor. The Persistence Manager uses the Java introspection to get information on the each bean fields.</p>
+<div class="section">
+<h2>The JCR Structure<a name="The_JCR_Structure"></a></h2>
+<p>Following our example, the resulting JCR structure is:</p>
+
+<div class="source">
+<pre>/mysite/page1
+  /mysite/page1/pageInfo
+       my:title = &quot;This is my page title&quot;
+       my:description = &quot;This is my page description&quot;
+  ... other subnodes for page1 ...
+</pre></div>
+<p>By default, the persistence manager will create a subnode (/mysite/page1/pageInfo) for the bean-descriptor pageInfo.</p></div>
+<div class="section">
+<h2>Using Another Bean Converter<a name="Using_Another_Bean_Converter"></a></h2>
+<p>The OCM framework gives you the freedom to choose another kind of mapping for bean fields. For example, you can use a custom bean converter to access to the parent node (see the next section below).</p>
+<p>This can be done by writing your own bean converter class and reference this class in the bean-descriptor.</p>
+<div class="section">
+<h3>Predefined Bean Converters<a name="Predefined_Bean_Converters"></a></h3>
+<p>Here is the list of existing custom bean converters:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+<th> Custom Bean Converter Class </th>
+<th> Description </th></tr>
+
+<tr class="b">
+<td>
+org.apache.jackrabbit.ocm.persistence.beanconverter.impl.ParentBeanConverterImpl
+</td>
+<td> Map a bean field to the parent node. it is used to access to the	   
+     parent object in read-only mode. See below the example based on	   
+       a Folder object. </td></tr>
+
+<tr class="a">
+<td>
+org.apache.jackrabbit.ocm.persistence.beanconverter.impl.InlineBeanConverterImpl
+</td>
+<td> Bean converter used to map some node properties into one nested	   
+    bean field. The corresponding bean field is not associated to a	   
+      subnode. </td></tr>
+</table>
+<p>If you want to use one of this bean converter, you have to reference it into a bean-field descriptor.</p>
+<p>The following descriptor bean-descriptor contains a reference to its parent folder (parentFolder attribute). Now the CmsObjectImpl object has an attribute (parentFolder) that contains a reference to the parent node.</p>
+
+<div class="source">
+<pre>&lt;class-descriptor 
+    className=&quot;org.apache.jackrabbit.ocm.testmodel.inheritance.impl.CmsObjectImpl&quot; 
+    jcrType=&quot;my:cmsobjectimpl&quot; &gt;
+  &lt;field-descriptor fieldName=&quot;path&quot; path=&quot;true&quot; /&gt;
+  &lt;field-descriptor fieldName=&quot;name&quot; jcrName=&quot;my:name&quot; id=&quot;true&quot; /&gt;
+  &lt;bean-descriptor 
+    fieldName=&quot;parentFolder&quot; 
+    converter=&quot;org.apache.jackrabbit.ocm.persistence.beanconverter.impl.ParentBeanConverterImpl&quot; 
+  /&gt;
+&lt;/class-descriptor&gt;
+</pre></div></div>
+<div class="section">
+<h3>Building your own Bean Converters<a name="Building_your_own_Bean_Converters"></a></h3>
+<p>Here is the different steps used to create a new bean converter :</p>
+<p>First, specify the converter class in the bean descriptor:</p>
+
+<div class="source">
+<pre>&lt;class-descriptor 
+    className=&quot;org.apache.jackrabbit.ocm.testmodel.inheritance.impl.CmsObjectImpl&quot; 
+    jcrType=&quot;my:cmsobjectimpl&quot; &gt;
+  &lt;bean-descriptor 
+    fieldName=&quot;parentFolder&quot; 
+    converter=&quot;org.apache.jackrabbit.ocm.persistence.beanconverter.impl.ParentBeanConverterImpl&quot; 
+  /&gt;
+&lt;/class-descriptor&gt;
+</pre></div>
+<p>Then, implement the converter class (based on the interface org.apache.jackrabbit.ocm.persistence.beanconverter.BeanConverter).</p>
+<p>Your bean converter class can also extends the class AbstractBeanConverterImpl to have a default implementation for some methods.</p>
+
+<div class="source">
+<pre>import javax.jcr.Node;
+import javax.jcr.Session;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.jackrabbit.ocm.exception.JcrMappingException;
+import org.apache.jackrabbit.ocm.exception.PersistenceException;
+import org.apache.jackrabbit.ocm.exception.RepositoryException;
+import org.apache.jackrabbit.ocm.mapper.Mapper;
+import org.apache.jackrabbit.ocm.mapper.model.BeanDescriptor;
+import org.apache.jackrabbit.ocm.mapper.model.ClassDescriptor;
+import org.apache.jackrabbit.ocm.persistence.atomictypeconverter.AtomicTypeConverterProvider;
+import org.apache.jackrabbit.ocm.persistence.beanconverter.BeanConverter;
+import org.apache.jackrabbit.ocm.persistence.objectconverter.ObjectConverter;
+/**
+ *
+ * Bean converter used to access to the parent object.
+ *
+ *
+ * @author &lt;a href=&quot;mailto:christophe.lombart@gmail.com&quot;&gt;Lombart Christophe &lt;/a&gt;
+ *
+ */
+public class ParentBeanConverterImpl extends AbstractBeanConverterImpl implements BeanConverter {
+
+  private final static Log log = LogFactory.getLog(ParentBeanConverterImpl.class);
+
+  public ParentBeanConverterImpl(Mapper mapper, ObjectConverter objectConverter, AtomicTypeConverterProvider atomicTypeConverterProvider)
+  {
+    super(mapper, objectConverter, atomicTypeConverterProvider);
+  }
+
+  public void insert(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Object object, ClassDescriptor parentClassDescriptor, Object parent)
+      throws PersistenceException, RepositoryException, JcrMappingException {
+
+      // Add code to insert the object
+  }
+
+  public void update(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Object object, ClassDescriptor parentClassDescriptor, Object parent)
+      throws PersistenceException, RepositoryException, JcrMappingException {
+
+      // Add code to update the object
+  }
+
+  public Object getObject(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Class beanClass, Object parent)
+      throws PersistenceException, RepositoryException,JcrMappingException {
+
+      // Add code to retrieve the object
+  }
+
+  public void remove(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Object object, ClassDescriptor parentClassDescriptor, Object parent)
+        throws PersistenceException,  RepositoryException, JcrMappingException {
+
+      // Add the code to remove the object
+  }
+
+}
+</pre></div></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+                      <div class="row-fluid">
+                              <p >Copyright &copy;                    2015
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All rights reserved.      
+                    
+      </p>
+        </div>
+
+        
+        
+          
+    
+    
+    <div id="ohloh" class="pull-right">
+      <script type="text/javascript" src="http://www.ohloh.net/p/jackrabbit/widgets/project_users_logo.js"></script>
+    </div>
+        </div>
+    </footer>
+        </body>
+</html>
\ No newline at end of file

Added: jackrabbit/site/live/jcr/ocm/mapping-collection-fields.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/jcr/ocm/mapping-collection-fields.html?rev=1672168&view=auto
==============================================================================
--- jackrabbit/site/live/jcr/ocm/mapping-collection-fields.html (added)
+++ jackrabbit/site/live/jcr/ocm/mapping-collection-fields.html Wed Apr  8 20:34:14 2015
@@ -0,0 +1,548 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2015-04-08 
+ | Rendered using Apache Maven Fluido Skin 1.3.1
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20150408" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache Jackrabbit - Mapping Collection Fields</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.1.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.1.min.js"></script>
+
+    
+                  </head>
+        <body class="topBarEnabled">
+          
+    
+    
+            
+    
+    
+    <a href="http://github.com/apache/jackrabbit">
+      <img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
+        src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"
+        alt="Fork me on GitHub">
+    </a>
+  
+                
+                    
+                
+
+    <div id="topbar" class="navbar navbar-fixed-top ">
+      <div class="navbar-inner">
+                <div class="container-fluid">
+        <a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar">
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+        </a>
+                
+                                                                                <a class="brand" href="../index.html"  title="Apache Jackrabbit">
+
+                                
+                                                                                                                    <img src="../images/logos/jlogo.gif" alt="Apache Jackrabbit" />
+                
+                </a>
+                    
+                                <ul class="nav">
+                          <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache Jackrabbit <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../index.html"  title="Welcome">Welcome</a>
+</li>
+                  
+                      <li>      <a href="../downloads.html"  title="Downloads">Downloads</a>
+</li>
+                  
+                      <li>      <a href="../articles.html"  title="Articles">Articles</a>
+</li>
+                  
+                      <li>      <a href="../frequently-asked-questions.html"  title="FAQ">FAQ</a>
+</li>
+                  
+                      <li>      <a href="http://wiki.apache.org/jackrabbit/FrontPage"  title="Jackrabbit Wiki">Jackrabbit Wiki</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-history.html"  title="Jackrabbit History">Jackrabbit History</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Documentation <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../getting-started-with-apache-jackrabbit.html"  title="Getting Started">Getting Started</a>
+</li>
+                  
+                      <li>      <a href="../standalone-server.html"  title="Standalone Server">Standalone Server</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-components.html"  title="Jackrabbit Components">Jackrabbit Components</a>
+</li>
+                  
+                      <li>      <a href="../first-hops.html"  title="First Hops">First Hops</a>
+</li>
+                  
+                      <li>      <a href="../jcr-api.html"  title="JCR & API">JCR & API</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-architecture.html"  title="Jackrabbit Architecture">Jackrabbit Architecture</a>
+</li>
+                  
+                      <li>      <a href="../deployment-models.html"  title="Deployment Models">Deployment Models</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-configuration.html"  title="Jackrabbit Configuration">Jackrabbit Configuration</a>
+</li>
+                  
+                      <li>      <a href="../node-types.html"  title="Node Types">Node Types</a>
+</li>
+                  
+                      <li>      <a href="../object-content-mapping.html"  title="Object Content Mapping">Object Content Mapping</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Development <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../jackrabbit-team.html"  title="Jackrabbit Team">Jackrabbit Team</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-roadmap.html"  title="Jackrabbit Roadmap">Jackrabbit Roadmap</a>
+</li>
+                  
+                      <li>      <a href="../building-jackrabbit.html"  title="Building Jackrabbit">Building Jackrabbit</a>
+</li>
+                  
+                      <li>      <a href="../mailing-lists.html"  title="Mailing Lists">Mailing Lists</a>
+</li>
+                  
+                      <li>      <a href="../issue-tracker.html"  title="Issue Tracker">Issue Tracker</a>
+</li>
+                  
+                      <li>      <a href="../source-repository.html"  title="Source Repository">Source Repository</a>
+</li>
+                  
+                      <li>      <a href="../continuous-integration.html"  title="Continuous Integration">Continuous Integration</a>
+</li>
+                  
+                      <li>      <a href="../website.html"  title="Website">Website</a>
+</li>
+                  
+                      <li>      <a href="../creating-releases.html"  title="Creating Releases">Creating Releases</a>
+</li>
+                  
+                      <li>      <a href="../supporting-software-attribution.html"  title="Attribution">Attribution</a>
+</li>
+                  
+                      <li>      <a href="../privacy-policy.html"  title="Privacy">Privacy</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache Software Foundation <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="http://www.apache.org/foundation/how-it-works.html"  title="Introduction">Introduction</a>
+</li>
+                  
+                      <li>      <a href="http://www.apache.org/foundation/sponsorship.html"  title="Sponsorship">Sponsorship</a>
+</li>
+                  
+                      <li>      <a href="http://www.apache.org/foundation/thanks.html"  title="Current Sponsors">Current Sponsors</a>
+</li>
+                          </ul>
+      </li>
+                  </ul>
+          
+          
+          
+                   
+                      </div>
+          
+        </div>
+      </div>
+    </div>
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                <div id="bannerLeft">
+                <h2>Apache Jackrabbit Site</h2>
+                </div>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2015-04-08
+                   </li>
+                      
+                
+                    
+      
+                            </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Apache Jackrabbit</li>
+                              
+      <li>
+  
+                          <a href="../index.html" title="Welcome">
+          <i class="none"></i>
+        Welcome</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../downloads.html" title="Downloads">
+          <i class="none"></i>
+        Downloads</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../articles.html" title="Articles">
+          <i class="none"></i>
+        Articles</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../frequently-asked-questions.html" title="FAQ">
+          <i class="none"></i>
+        FAQ</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://wiki.apache.org/jackrabbit/FrontPage" class="externalLink" title="Jackrabbit Wiki">
+          <i class="none"></i>
+        Jackrabbit Wiki</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-history.html" title="Jackrabbit History">
+          <i class="none"></i>
+        Jackrabbit History</a>
+            </li>
+                              <li class="nav-header">Documentation</li>
+                              
+      <li>
+  
+                          <a href="../getting-started-with-apache-jackrabbit.html" title="Getting Started">
+          <i class="none"></i>
+        Getting Started</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../standalone-server.html" title="Standalone Server">
+          <i class="none"></i>
+        Standalone Server</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-components.html" title="Jackrabbit Components">
+          <i class="none"></i>
+        Jackrabbit Components</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../first-hops.html" title="First Hops">
+          <i class="none"></i>
+        First Hops</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jcr-api.html" title="JCR & API">
+          <i class="none"></i>
+        JCR & API</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-architecture.html" title="Jackrabbit Architecture">
+          <i class="none"></i>
+        Jackrabbit Architecture</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../deployment-models.html" title="Deployment Models">
+          <i class="none"></i>
+        Deployment Models</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-configuration.html" title="Jackrabbit Configuration">
+          <i class="none"></i>
+        Jackrabbit Configuration</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../node-types.html" title="Node Types">
+          <i class="none"></i>
+        Node Types</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../object-content-mapping.html" title="Object Content Mapping">
+          <i class="none"></i>
+        Object Content Mapping</a>
+            </li>
+                              <li class="nav-header">Development</li>
+                              
+      <li>
+  
+                          <a href="../jackrabbit-team.html" title="Jackrabbit Team">
+          <i class="none"></i>
+        Jackrabbit Team</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-roadmap.html" title="Jackrabbit Roadmap">
+          <i class="none"></i>
+        Jackrabbit Roadmap</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../building-jackrabbit.html" title="Building Jackrabbit">
+          <i class="none"></i>
+        Building Jackrabbit</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../mailing-lists.html" title="Mailing Lists">
+          <i class="none"></i>
+        Mailing Lists</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../issue-tracker.html" title="Issue Tracker">
+          <i class="none"></i>
+        Issue Tracker</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../source-repository.html" title="Source Repository">
+          <i class="none"></i>
+        Source Repository</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../continuous-integration.html" title="Continuous Integration">
+          <i class="none"></i>
+        Continuous Integration</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../website.html" title="Website">
+          <i class="none"></i>
+        Website</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../creating-releases.html" title="Creating Releases">
+          <i class="none"></i>
+        Creating Releases</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../supporting-software-attribution.html" title="Attribution">
+          <i class="none"></i>
+        Attribution</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../privacy-policy.html" title="Privacy">
+          <i class="none"></i>
+        Privacy</a>
+            </li>
+                              <li class="nav-header">Apache Software Foundation</li>
+                              
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/how-it-works.html" class="externalLink" title="Introduction">
+          <i class="none"></i>
+        Introduction</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship">
+          <i class="none"></i>
+        Sponsorship</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Current Sponsors">
+          <i class="none"></i>
+        Current Sponsors</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr />
+
+           <div id="poweredBy">
+                   
+    <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
+
+    
+    <div class="g-plusone" data-href="http://www.apache.org/jackrabbit-site/" data-size="tall" ></div>
+
+                   <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                             <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+        <img class="builtBy" alt="Built by Maven" src="../images/logos/maven-feather.png" />
+      </a>
+                  </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License. --><h1>Mapping Collection Fields</h1>
+<p>The collection-descriptor maps a collection attribute into JCR nodes or in a multivalue property.</p>
+<p>Based on our model defined here, the following collection-descriptor is used to map the &#x201c;paragraphs&#x201d; field into the JCR node called &#x201c;paragraphs&#x201d;.</p>
+
+<div class="source">
+<pre>&lt;class-descriptor
+    className=&quot;org.apache.jackrabbit.ocm.testmodel.Page&quot;
+    jcrType=&quot;my:page&quot;&gt;
+  &lt;collection-descriptor
+      fieldName=&quot;paragraphs&quot; jcrName=&quot;paragraphs&quot;
+      elementClassName=&quot;org.apache.jackrabbit.ocm.testmodel.Paragraph&quot; /&gt;
+  &lt;!-- other field, bean and collection mapping here !--&gt;
+&lt;/class-descriptor&gt;
+
+&lt;class-descriptor
+    className=&quot;org.apache.jackrabbit.ocm.testmodel.Paragraph&quot;
+    jcrType=&quot;my:paragraph&quot;&gt;
+  &lt;field-descriptor fieldName=&quot;path&quot; path=&quot;true&quot; /&gt;
+  &lt;field-descriptor fieldName=&quot;text&quot; jcrName=&quot;my:text&quot;/&gt;
+&lt;/class-descriptor&gt;
+</pre></div>
+<p>The collection-descriptor contains the elementClassName attribute which specify the collection element class. A class descriptor for the element class has also to be defined.</p>
+<div class="section">
+<h2>The JCR Structure<a name="The_JCR_Structure"></a></h2>
+<p>Following our example, the resulting JCR structure is:</p>
+
+<div class="source">
+<pre>/mysite/page1
+  /mysite/page1/paragraphs
+    /mysite/page1/paragraphs/collection-element1
+      my:text = &quot;This is the content of para1&quot;
+    /mysite/page1/paragraphs/collection-element2
+      my:text = &quot;This is the content of para2&quot;
+  ... other subnodes for page1 ...
+</pre></div>
+<p>By default, the persistence manager will create a subnode (/mysite/page1/paragraphs). This one will contains the different paragraphs.</p>
+<p>As explained in the following sections, it is possible to map to another JCR structure. It is also possible to use another name for the jcr node names (see above).</p></div>
+<div class="section">
+<h2>Supported Collection and Map Types<a name="Supported_Collection_and_Map_Types"></a></h2>
+<p>The OCM framework is supporting the following java types:</p>
+
+<ul>
+  
+<li><i>Collections</i> Collection, List, Set, ArrayList, Vector, HashSet</li>
+  
+<li><i>Maps</i> Map, HashMap</li>
+</ul></div>
+<div class="section">
+<h2>Using Another Collection or Map<a name="Using_Another_Collection_or_Map"></a></h2>
+<p>It is possible to support other Collection or Map types with the ManageableCollection interface.</p></div>
+<div class="section">
+<h2>Using Another Collection Converter<a name="Using_Another_Collection_Converter"></a></h2>
+<p>TODO</p></div>
+<div class="section">
+<h2>Predefined Collection Converters<a name="Predefined_Collection_Converters"></a></h2>
+<p>TODO</p></div>
+<div class="section">
+<h2>Building your own Collection Converters<a name="Building_your_own_Collection_Converters"></a></h2>
+<p>TODO</p></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+                      <div class="row-fluid">
+                              <p >Copyright &copy;                    2015
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All rights reserved.      
+                    
+      </p>
+        </div>
+
+        
+        
+          
+    
+    
+    <div id="ohloh" class="pull-right">
+      <script type="text/javascript" src="http://www.ohloh.net/p/jackrabbit/widgets/project_users_logo.js"></script>
+    </div>
+        </div>
+    </footer>
+        </body>
+</html>
\ No newline at end of file