incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r448367 [9/13] - in /incubator/graffito/site/jcr-mapping: apidocs/org/apache/portals/graffito/jcr/mapper/model/ apidocs/org/apache/portals/graffito/jcr/mapper/model/class-use/ apidocs/org/apache/portals/graffito/jcr/persistence/ apidocs/org...
Date Wed, 20 Sep 2006 22:17:19 GMT
Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/interfaces/PersistenceManagerInterfaceHierarchyTest.html
URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/interfaces/PersistenceManagerInterfaceHierarchyTest.html?view=auto&rev=448367
==============================================================================
--- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/interfaces/PersistenceManagerInterfaceHierarchyTest.html (added)
+++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/interfaces/PersistenceManagerInterfaceHierarchyTest.html Wed Sep 20 15:17:15 2006
@@ -0,0 +1,208 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>PersistenceManagerInterfaceHierarchyTest xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a>   <em class="comment">/*<em class="comment"> ========================================================================</em></em>
+<a name="2" href="#2">2</a>   <em class="comment"> * Copyright 2004 The Apache Software Foundation</em>
+<a name="3" href="#3">3</a>   <em class="comment"> *</em>
+<a name="4" href="#4">4</a>   <em class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</em>
+<a name="5" href="#5">5</a>   <em class="comment"> * you may not use this file except in compliance with the License.</em>
+<a name="6" href="#6">6</a>   <em class="comment"> * You may obtain a copy of the License at</em>
+<a name="7" href="#7">7</a>   <em class="comment"> *</em>
+<a name="8" href="#8">8</a>   <em class="comment"> *     <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="9" href="#9">9</a>   <em class="comment"> *</em>
+<a name="10" href="#10">10</a>  <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a name="11" href="#11">11</a>  <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a name="12" href="#12">12</a>  <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a name="13" href="#13">13</a>  <em class="comment"> * See the License for the specific language governing permissions and</em>
+<a name="14" href="#14">14</a>  <em class="comment"> * limitations under the License.</em>
+<a name="15" href="#15">15</a>  <em class="comment"> * ========================================================================</em>
+<a name="16" href="#16">16</a>  <em class="comment"> */</em>
+<a name="17" href="#17">17</a>  <strong>package</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/persistence/interfaces/package-summary.html">org.apache.portals.graffito.jcr.persistence.interfaces</a>;
+<a name="18" href="#18">18</a>  
+<a name="19" href="#19">19</a>  <strong>import</strong> java.util.Collection;
+<a name="20" href="#20">20</a>  
+<a name="21" href="#21">21</a>  <strong>import</strong> junit.framework.Test;
+<a name="22" href="#22">22</a>  <strong>import</strong> junit.framework.TestSuite;
+<a name="23" href="#23">23</a>  
+<a name="24" href="#24">24</a>  <strong>import</strong> org.apache.commons.logging.Log;
+<a name="25" href="#25">25</a>  <strong>import</strong> org.apache.commons.logging.LogFactory;
+<a name="26" href="#26">26</a>  <strong>import</strong> org.apache.portals.graffito.jcr.RepositoryLifecycleTestSetup;
+<a name="27" href="#27">27</a>  <strong>import</strong> org.apache.portals.graffito.jcr.TestBase;
+<a name="28" href="#28">28</a>  <strong>import</strong> org.apache.portals.graffito.jcr.persistence.PersistenceManager;
+<a name="29" href="#29">29</a>  <strong>import</strong> org.apache.portals.graffito.jcr.query.Filter;
+<a name="30" href="#30">30</a>  <strong>import</strong> org.apache.portals.graffito.jcr.query.Query;
+<a name="31" href="#31">31</a>  <strong>import</strong> org.apache.portals.graffito.jcr.query.QueryManager;
+<a name="32" href="#32">32</a>  <strong>import</strong> org.apache.portals.graffito.jcr.testmodel.Atomic;
+<a name="33" href="#33">33</a>  <strong>import</strong> org.apache.portals.graffito.jcr.testmodel.inheritance.AnotherDescendant;
+<a name="34" href="#34">34</a>  <strong>import</strong> org.apache.portals.graffito.jcr.testmodel.inheritance.Descendant;
+<a name="35" href="#35">35</a>  <strong>import</strong> org.apache.portals.graffito.jcr.testmodel.inheritance.SubDescendant;
+<a name="36" href="#36">36</a>  <strong>import</strong> org.apache.portals.graffito.jcr.testmodel.interfaces.AnotherInterface;
+<a name="37" href="#37">37</a>  <strong>import</strong> org.apache.portals.graffito.jcr.testmodel.interfaces.Interface;
+<a name="38" href="#38">38</a>  
+<a name="39" href="#39">39</a>  <em>/**<em>*</em></em>
+<a name="40" href="#40">40</a>  <em> * Test interface (with discreminator field)</em>
+<a name="41" href="#41">41</a>  <em> *</em>
+<a name="42" href="#42">42</a>  <em> * @author &lt;a href="<a href="mailto:christophe.lombart@gmail.com" target="alexandria_uri">mailto:christophe.lombart@gmail.com</a>">Christophe Lombart&lt;/a></em>
+<a name="43" href="#43">43</a>  <em> */</em>
+<a name="44" href="#44">44</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/persistence/interfaces/PersistenceManagerInterfaceHierarchyTest.html">PersistenceManagerInterfaceHierarchyTest</a> <strong>extends</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/TestBase.html">TestBase</a> {
+<a name="45" href="#45">45</a>  	<strong>private</strong> <strong>final</strong> <strong>static</strong> Log log = LogFactory.getLog(PersistenceManagerInterfaceHierarchyTest.<strong>class</strong>);
+<a name="46" href="#46">46</a>  
+<a name="47" href="#47">47</a>  	<em>/**<em>*</em></em>
+<a name="48" href="#48">48</a>  <em>	 * &lt;p>Defines the test case name for junit.&lt;/p></em>
+<a name="49" href="#49">49</a>  <em>	 * @param testName The test case name.</em>
+<a name="50" href="#50">50</a>  <em>	 */</em>
+<a name="51" href="#51">51</a>  	<strong>public</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/persistence/interfaces/PersistenceManagerInterfaceHierarchyTest.html">PersistenceManagerInterfaceHierarchyTest</a>(String testName) throws Exception {
+<a name="52" href="#52">52</a>  		<strong>super</strong>(testName);
+<a name="53" href="#53">53</a>  
+<a name="54" href="#54">54</a>  	}
+<a name="55" href="#55">55</a>  
+<a name="56" href="#56">56</a>  	<strong>public</strong> <strong>static</strong> Test suite() {
+<a name="57" href="#57">57</a>  		<em class="comment">// All methods starting with "test" will be executed in the test suite.</em>
+<a name="58" href="#58">58</a>  		<strong>return</strong> <strong>new</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/RepositoryLifecycleTestSetup.html">RepositoryLifecycleTestSetup</a>(<strong>new</strong> TestSuite(
+<a name="59" href="#59">59</a>  				PersistenceManagerInterfaceHierarchyTest.<strong>class</strong>));
+<a name="60" href="#60">60</a>  	}
+<a name="61" href="#61">61</a>  
+<a name="62" href="#62">62</a>  	<strong>public</strong> <strong>void</strong> tearDown() throws Exception {
+<a name="63" href="#63">63</a>  
+<a name="64" href="#64">64</a>  		cleanUpRepisotory();
+<a name="65" href="#65">65</a>  		<strong>super</strong>.tearDown();
+<a name="66" href="#66">66</a>  		
+<a name="67" href="#67">67</a>  	}
+<a name="68" href="#68">68</a>  
+<a name="69" href="#69">69</a>  
+<a name="70" href="#70">70</a>  	<strong>public</strong> <strong>void</strong> testRetrieveSingleton() {
+<a name="71" href="#71">71</a>  
+<a name="72" href="#72">72</a>  		<strong>try</strong> {
+<a name="73" href="#73">73</a>  			PersistenceManager persistenceManager = <strong>this</strong>.getPersistenceManager();
+<a name="74" href="#74">74</a>  
+<a name="75" href="#75">75</a>  			<em class="comment">//---------------------------------------------------------------------------------------------------------</em>
+<a name="76" href="#76">76</a>  			<em class="comment">// Insert </em>
+<a name="77" href="#77">77</a>  			<em class="comment">//---------------------------------------------------------------------------------------------------------			</em>
+<a name="78" href="#78">78</a>  			AnotherDescendant  anotherDescendant = <strong>new</strong> AnotherDescendant();
+<a name="79" href="#79">79</a>  			anotherDescendant.setAnotherDescendantField(<span class="string">"anotherDescendantValue"</span>);
+<a name="80" href="#80">80</a>  			anotherDescendant.setAncestorField(<span class="string">"ancestorValue"</span>);
+<a name="81" href="#81">81</a>  			anotherDescendant.setPath(<span class="string">"/test"</span>);
+<a name="82" href="#82">82</a>  			persistenceManager.insert(anotherDescendant);
+<a name="83" href="#83">83</a>  
+<a name="84" href="#84">84</a>  			persistenceManager.save();
+<a name="85" href="#85">85</a>  
+<a name="86" href="#86">86</a>  			<em class="comment">//---------------------------------------------------------------------------------------------------------</em>
+<a name="87" href="#87">87</a>  			<em class="comment">// Retrieve </em>
+<a name="88" href="#88">88</a>  			<em class="comment">//---------------------------------------------------------------------------------------------------------						</em>
+<a name="89" href="#89">89</a>  			Interface result =  (Interface) persistenceManager.getObject(<span class="string">"/test"</span>);
+<a name="90" href="#90">90</a>  			assertNotNull(<span class="string">"Object is null"</span>, result);
+<a name="91" href="#91">91</a>  			anotherDescendant = (AnotherDescendant) result; 
+<a name="92" href="#92">92</a>  			
+<a name="93" href="#93">93</a>  			assertEquals(<span class="string">"Descendant path is invalid"</span>, anotherDescendant.getPath(), <span class="string">"/test"</span>);
+<a name="94" href="#94">94</a>  			assertEquals(<span class="string">"Descendant ancestorField is invalid"</span>, anotherDescendant.getAncestorField(), <span class="string">"ancestorValue"</span>);
+<a name="95" href="#95">95</a>  			assertEquals(<span class="string">"Descendant descendantField is invalid"</span>, anotherDescendant	.getAnotherDescendantField(), <span class="string">"anotherDescendantValue"</span>);
+<a name="96" href="#96">96</a>  
+<a name="97" href="#97">97</a>  		} <strong>catch</strong> (Exception e) {
+<a name="98" href="#98">98</a>  			e.printStackTrace();
+<a name="99" href="#99">99</a>  			fail();
+<a name="100" href="#100">100</a> 		}
+<a name="101" href="#101">101</a> 
+<a name="102" href="#102">102</a> 	}
+<a name="103" href="#103">103</a> 	
+<a name="104" href="#104">104</a> 	
+<a name="105" href="#105">105</a> 	<strong>public</strong> <strong>void</strong> testRetrieveCollection() {
+<a name="106" href="#106">106</a> 		
+<a name="107" href="#107">107</a> 		PersistenceManager persistenceManager = <strong>this</strong>.getPersistenceManager();
+<a name="108" href="#108">108</a> 
+<a name="109" href="#109">109</a> 		<em class="comment">//---------------------------------------------------------------------------------------------------------	</em>
+<a name="110" href="#110">110</a> 		<em class="comment">// Insert  descendant objects</em>
+<a name="111" href="#111">111</a> 		<em class="comment">//---------------------------------------------------------------------------------------------------------			</em>
+<a name="112" href="#112">112</a> 		Descendant descendant = <strong>new</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/testmodel/inheritance/Descendant.html">Descendant</a>();
+<a name="113" href="#113">113</a> 		descendant.setDescendantField(<span class="string">"descendantValue"</span>);
+<a name="114" href="#114">114</a> 		descendant.setAncestorField(<span class="string">"ancestorValue"</span>);
+<a name="115" href="#115">115</a> 		descendant.setPath(<span class="string">"/descendant1"</span>);
+<a name="116" href="#116">116</a> 		persistenceManager.insert(descendant);
+<a name="117" href="#117">117</a> 
+<a name="118" href="#118">118</a> 		descendant = <strong>new</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/testmodel/inheritance/Descendant.html">Descendant</a>();
+<a name="119" href="#119">119</a> 		descendant.setDescendantField(<span class="string">"descendantValue2"</span>);
+<a name="120" href="#120">120</a> 		descendant.setAncestorField(<span class="string">"ancestorValue2"</span>);
+<a name="121" href="#121">121</a> 		descendant.setPath(<span class="string">"/descendant2"</span>);
+<a name="122" href="#122">122</a> 		persistenceManager.insert(descendant);
+<a name="123" href="#123">123</a> 
+<a name="124" href="#124">124</a> 		SubDescendant subDescendant = <strong>new</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/testmodel/inheritance/SubDescendant.html">SubDescendant</a>();
+<a name="125" href="#125">125</a> 		subDescendant.setDescendantField(<span class="string">"descendantValue2"</span>);
+<a name="126" href="#126">126</a> 		subDescendant.setAncestorField(<span class="string">"ancestorValue2"</span>);
+<a name="127" href="#127">127</a> 		subDescendant.setPath(<span class="string">"/subdescendant"</span>);
+<a name="128" href="#128">128</a> 		subDescendant.setSubDescendantField(<span class="string">"subdescendantvalue"</span>);
+<a name="129" href="#129">129</a> 		persistenceManager.insert(subDescendant);		
+<a name="130" href="#130">130</a> 
+<a name="131" href="#131">131</a> 		 subDescendant = <strong>new</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/testmodel/inheritance/SubDescendant.html">SubDescendant</a>();
+<a name="132" href="#132">132</a> 		subDescendant.setDescendantField(<span class="string">"descendantValue3"</span>);
+<a name="133" href="#133">133</a> 		subDescendant.setAncestorField(<span class="string">"ancestorValue2"</span>);
+<a name="134" href="#134">134</a> 		subDescendant.setPath(<span class="string">"/subdescendant2"</span>);
+<a name="135" href="#135">135</a> 		subDescendant.setSubDescendantField(<span class="string">"subdescendantvalue1"</span>);
+<a name="136" href="#136">136</a> 		persistenceManager.insert(subDescendant);		
+<a name="137" href="#137">137</a> 		
+<a name="138" href="#138">138</a> 		
+<a name="139" href="#139">139</a> 		AnotherDescendant anotherDescendant = <strong>new</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/testmodel/inheritance/AnotherDescendant.html">AnotherDescendant</a>();
+<a name="140" href="#140">140</a> 		anotherDescendant.setAnotherDescendantField(<span class="string">"anotherDescendantValue"</span>);
+<a name="141" href="#141">141</a> 		anotherDescendant.setAncestorField(<span class="string">"ancestorValue3"</span>);
+<a name="142" href="#142">142</a> 		anotherDescendant.setPath(<span class="string">"/anotherdescendant1"</span>);
+<a name="143" href="#143">143</a> 		persistenceManager.insert(anotherDescendant);
+<a name="144" href="#144">144</a> 
+<a name="145" href="#145">145</a> 		anotherDescendant = <strong>new</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/testmodel/inheritance/AnotherDescendant.html">AnotherDescendant</a>();
+<a name="146" href="#146">146</a> 		anotherDescendant.setAnotherDescendantField(<span class="string">"anotherDescendantValue"</span>);
+<a name="147" href="#147">147</a> 		anotherDescendant.setAncestorField(<span class="string">"ancestorValue4"</span>);
+<a name="148" href="#148">148</a> 		anotherDescendant.setPath(<span class="string">"/anotherdescendant2"</span>);
+<a name="149" href="#149">149</a> 		persistenceManager.insert(anotherDescendant);
+<a name="150" href="#150">150</a> 
+<a name="151" href="#151">151</a> 		anotherDescendant = <strong>new</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/testmodel/inheritance/AnotherDescendant.html">AnotherDescendant</a>();
+<a name="152" href="#152">152</a> 		anotherDescendant.setAnotherDescendantField(<span class="string">"anotherDescendantValue2"</span>);
+<a name="153" href="#153">153</a> 		anotherDescendant.setAncestorField(<span class="string">"ancestorValue5"</span>);
+<a name="154" href="#154">154</a> 		anotherDescendant.setPath(<span class="string">"/anotherdescendant3"</span>);
+<a name="155" href="#155">155</a> 		persistenceManager.insert(anotherDescendant);
+<a name="156" href="#156">156</a> 
+<a name="157" href="#157">157</a> 		
+<a name="158" href="#158">158</a> 		Atomic a = <strong>new</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/testmodel/Atomic.html">Atomic</a>();
+<a name="159" href="#159">159</a> 		a.setPath(<span class="string">"/atomic"</span>);
+<a name="160" href="#160">160</a> 		a.setBooleanPrimitive(<strong>true</strong>);
+<a name="161" href="#161">161</a> 		persistenceManager.insert(a);
+<a name="162" href="#162">162</a> 
+<a name="163" href="#163">163</a> 		persistenceManager.save();
+<a name="164" href="#164">164</a> 
+<a name="165" href="#165">165</a> 		<em class="comment">//---------------------------------------------------------------------------------------------------------	</em>
+<a name="166" href="#166">166</a> 		<em class="comment">// Retrieve Descendant class (implements  Interface.class)</em>
+<a name="167" href="#167">167</a> 		<em class="comment">//---------------------------------------------------------------------------------------------------------			</em>
+<a name="168" href="#168">168</a> 		QueryManager queryManager = persistenceManager.getQueryManager();
+<a name="169" href="#169">169</a> 		Filter filter = queryManager.createFilter(Interface.<strong>class</strong>);
+<a name="170" href="#170">170</a> 		Query query = queryManager.createQuery(filter);
+<a name="171" href="#171">171</a> 
+<a name="172" href="#172">172</a> 		Collection result = persistenceManager.getObjects(query);
+<a name="173" href="#173">173</a> 		assertEquals(<span class="string">"Invalid number of  interface  found"</span>, result.size(),3);
+<a name="174" href="#174">174</a> 		assertTrue(<span class="string">"Invalid item in the collection"</span>, <strong>this</strong>.contains(result, <span class="string">"/anotherdescendant1"</span>, AnotherDescendant.<strong>class</strong>));
+<a name="175" href="#175">175</a> 		assertTrue(<span class="string">"Invalid item in the collection"</span>, <strong>this</strong>.contains(result, <span class="string">"/anotherdescendant2"</span>, AnotherDescendant.<strong>class</strong>));
+<a name="176" href="#176">176</a> 		assertTrue(<span class="string">"Invalid item in the collection"</span>, <strong>this</strong>.contains(result, <span class="string">"/anotherdescendant3"</span>, AnotherDescendant.<strong>class</strong>));
+<a name="177" href="#177">177</a> 		
+<a name="178" href="#178">178</a> 
+<a name="179" href="#179">179</a> 		<em class="comment">//---------------------------------------------------------------------------------------------------------	</em>
+<a name="180" href="#180">180</a> 		<em class="comment">// Retrieve Descendant class and its children (implements  AnotherInterface.class)</em>
+<a name="181" href="#181">181</a> 		<em class="comment">//---------------------------------------------------------------------------------------------------------			</em>
+<a name="182" href="#182">182</a> 	    queryManager = persistenceManager.getQueryManager();
+<a name="183" href="#183">183</a> 		filter = queryManager.createFilter(AnotherInterface.<strong>class</strong>);
+<a name="184" href="#184">184</a> 		query = queryManager.createQuery(filter);
+<a name="185" href="#185">185</a> 
+<a name="186" href="#186">186</a> 		result = persistenceManager.getObjects(query);
+<a name="187" href="#187">187</a> 		assertEquals(<span class="string">"Invalid number of  interface  found"</span>, result.size(),4);
+<a name="188" href="#188">188</a> 		assertTrue(<span class="string">"Invalid item in the collection"</span>, <strong>this</strong>.contains(result, <span class="string">"/descendant1"</span>, Descendant.<strong>class</strong>));
+<a name="189" href="#189">189</a> 		assertTrue(<span class="string">"Invalid item in the collection"</span>, <strong>this</strong>.contains(result, <span class="string">"/descendant2"</span>, Descendant.<strong>class</strong>));
+<a name="190" href="#190">190</a> 		assertTrue(<span class="string">"Invalid item in the collection"</span>, <strong>this</strong>.contains(result, <span class="string">"/subdescendant"</span>,SubDescendant.<strong>class</strong>));		
+<a name="191" href="#191">191</a> 		assertTrue(<span class="string">"Invalid item in the collection"</span>, <strong>this</strong>.contains(result, <span class="string">"/subdescendant2"</span>,SubDescendant.<strong>class</strong>));
+<a name="192" href="#192">192</a> 
+<a name="193" href="#193">193</a> 	}
+<a name="194" href="#194">194</a> 	
+<a name="195" href="#195">195</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+

Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/interfaces/package-frame.html
URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/interfaces/package-frame.html?view=auto&rev=448367
==============================================================================
--- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/interfaces/package-frame.html (added)
+++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/interfaces/package-frame.html Wed Sep 20 15:17:15 2006
@@ -0,0 +1,35 @@
+
+
+  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+  <html lang="en">
+    <head>
+      <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"></meta>
+      <title>Graffito JCR Mapping 1.0-a1-dev Reference Package org.apache.portals.graffito.jcr.persistence.interfaces</title>
+      <link rel="stylesheet" href="../../../../../../../stylesheet.css" type="text/css" title="style"></link>
+    </head>
+    <body>
+
+      <h3>
+        <a href="package-summary.html" target="classFrame">org.apache.portals.graffito.jcr.persistence.interfaces</a>
+      </h3>
+
+      <h3>Classes</h3>
+
+      <ul>
+        
+          <li>
+            <a href="AllTests.html" target="classFrame">AllTests</a>
+          </li>
+        
+          <li>
+            <a href="PersistenceManagerInterfaceConcreteClassTest.html" target="classFrame">PersistenceManagerInterfaceConcreteClassTest</a>
+          </li>
+        
+          <li>
+            <a href="PersistenceManagerInterfaceHierarchyTest.html" target="classFrame">PersistenceManagerInterfaceHierarchyTest</a>
+          </li>
+        
+      </ul>
+
+    </body>
+  </html>

Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/interfaces/package-summary.html
URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/interfaces/package-summary.html?view=auto&rev=448367
==============================================================================
--- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/interfaces/package-summary.html (added)
+++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/interfaces/package-summary.html Wed Sep 20 15:17:15 2006
@@ -0,0 +1,114 @@
+
+
+  
+
+  
+    
+
+    
+
+    
+
+  
+      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+      <html lang="en">
+        <head>
+          <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"></meta>
+          <title>Graffito JCR Mapping 1.0-a1-dev Reference Package </title>
+          <link rel="stylesheet" href="../../../../../../../stylesheet.css" type="text/css" title="style"></link>
+        </head>
+        <body>
+
+          
+      
+      
+
+      <div class="overview">
+        <ul>
+          <li>
+            <a href="../../../../../../../overview-summary.html">Overview</a>
+          </li>
+          <li class="selected">Package</li>
+        </ul>
+      </div>
+      <div class="framenoframe">
+        <ul>
+          <li>
+            <a href="../../../../../../../index.html" target="_top">FRAMES</a>
+          </li>
+          <li>
+            <a href="package-summary.html" target="_top">NO FRAMES</a>
+          </li>
+        </ul>
+      </div>
+
+      
+
+    
+      
+      <h2>Package org.apache.portals.graffito.jcr.persistence.interfaces</h2>
+
+      <table class="summary">
+        <thead>
+          <tr>
+            <th>Class Summary</th>
+          </tr>
+        </thead>
+
+        <tbody>
+          
+            <tr>
+              <td>
+                <a href="AllTests.html" target="classFrame">AllTests</a>
+              </td>
+            </tr>
+          
+            <tr>
+              <td>
+                <a href="PersistenceManagerInterfaceConcreteClassTest.html" target="classFrame">PersistenceManagerInterfaceConcreteClassTest</a>
+              </td>
+            </tr>
+          
+            <tr>
+              <td>
+                <a href="PersistenceManagerInterfaceHierarchyTest.html" target="classFrame">PersistenceManagerInterfaceHierarchyTest</a>
+              </td>
+            </tr>
+          
+        </tbody>
+      </table>
+
+    
+      
+      
+
+      <div class="overview">
+        <ul>
+          <li>
+            <a href="../../../../../../../overview-summary.html">Overview</a>
+          </li>
+          <li class="selected">Package</li>
+        </ul>
+      </div>
+      <div class="framenoframe">
+        <ul>
+          <li>
+            <a href="../../../../../../../index.html" target="_top">FRAMES</a>
+          </li>
+          <li>
+            <a href="package-summary.html" target="_top">NO FRAMES</a>
+          </li>
+        </ul>
+      </div>
+
+      
+
+    
+    
+
+          <hr></hr>
+
+          Copyright &copy; 2004-2006 The Apache Software Foundation. All Rights Reserved.
+        </body>
+      </html>
+    

Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/proxy/AllTests.html
URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/proxy/AllTests.html?view=auto&rev=448367
==============================================================================
--- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/proxy/AllTests.html (added)
+++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/proxy/AllTests.html Wed Sep 20 15:17:15 2006
@@ -0,0 +1,58 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>AllTests xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a>   <em class="comment">/*<em class="comment"> ========================================================================</em></em>
+<a name="2" href="#2">2</a>   <em class="comment"> * Copyright 2004 The Apache Software Foundation</em>
+<a name="3" href="#3">3</a>   <em class="comment"> *</em>
+<a name="4" href="#4">4</a>   <em class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</em>
+<a name="5" href="#5">5</a>   <em class="comment"> * you may not use this file except in compliance with the License.</em>
+<a name="6" href="#6">6</a>   <em class="comment"> * You may obtain a copy of the License at</em>
+<a name="7" href="#7">7</a>   <em class="comment"> *</em>
+<a name="8" href="#8">8</a>   <em class="comment"> *     <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="9" href="#9">9</a>   <em class="comment"> *</em>
+<a name="10" href="#10">10</a>  <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a name="11" href="#11">11</a>  <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a name="12" href="#12">12</a>  <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a name="13" href="#13">13</a>  <em class="comment"> * See the License for the specific language governing permissions and</em>
+<a name="14" href="#14">14</a>  <em class="comment"> * limitations under the License.</em>
+<a name="15" href="#15">15</a>  <em class="comment"> * ========================================================================</em>
+<a name="16" href="#16">16</a>  <em class="comment"> */</em>
+<a name="17" href="#17">17</a>  <strong>package</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/persistence/proxy/package-summary.html">org.apache.portals.graffito.jcr.persistence.proxy</a>;
+<a name="18" href="#18">18</a>  
+<a name="19" href="#19">19</a>  <strong>import</strong> org.apache.portals.graffito.jcr.RepositoryLifecycleTestSetup;
+<a name="20" href="#20">20</a>  
+<a name="21" href="#21">21</a>  <strong>import</strong> junit.framework.Test;
+<a name="22" href="#22">22</a>  <strong>import</strong> junit.framework.TestSuite;
+<a name="23" href="#23">23</a>  
+<a name="24" href="#24">24</a>  
+<a name="25" href="#25">25</a>  <em>/**<em>*</em></em>
+<a name="26" href="#26">26</a>  <em> * Package level tests.</em>
+<a name="27" href="#27">27</a>  <em> * </em>
+<a name="28" href="#28">28</a>  <em> * @author &lt;a href='<a href="mailto:the_mindstorm" target="alexandria_uri">mailto:the_mindstorm</a>[at]evolva[dot]ro'>Alexandru Popescu&lt;/a></em>
+<a name="29" href="#29">29</a>  <em> */</em>
+<a name="30" href="#30">30</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/AllTests.html">AllTests</a> {
+<a name="31" href="#31">31</a>  
+<a name="32" href="#32">32</a>      <strong>public</strong> <strong>static</strong> Test suite() {
+<a name="33" href="#33">33</a>          <strong>return</strong> <strong>new</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/RepositoryLifecycleTestSetup.html">RepositoryLifecycleTestSetup</a>(buildSuite());
+<a name="34" href="#34">34</a>      }
+<a name="35" href="#35">35</a>  
+<a name="36" href="#36">36</a>      <strong>public</strong> <strong>static</strong> Test buildSuite() {
+<a name="37" href="#37">37</a>          TestSuite suite= <strong>new</strong> TestSuite(<span class="string">"Test for org.apache.portals.graffito.jcr.persistence.proxy"</span>);
+<a name="38" href="#38">38</a>          <em class="comment">//$JUnit-BEGIN$</em>
+<a name="39" href="#39">39</a>          suite.addTestSuite(ProxyTest.<strong>class</strong>);
+<a name="40" href="#40">40</a>          
+<a name="41" href="#41">41</a>          <em class="comment">//$JUnit-END$</em>
+<a name="42" href="#42">42</a>  
+<a name="43" href="#43">43</a>          <strong>return</strong> suite;
+<a name="44" href="#44">44</a>      }
+<a name="45" href="#45">45</a>  }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+

Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/proxy/ProxyTest.html
URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/proxy/ProxyTest.html?view=auto&rev=448367
==============================================================================
--- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/proxy/ProxyTest.html (added)
+++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/proxy/ProxyTest.html Wed Sep 20 15:17:15 2006
@@ -0,0 +1,212 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>ProxyTest xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a>   <em class="comment">/*<em class="comment"> ========================================================================</em></em>
+<a name="2" href="#2">2</a>   <em class="comment"> * Copyright 2004 The Apache Software Foundation</em>
+<a name="3" href="#3">3</a>   <em class="comment"> *</em>
+<a name="4" href="#4">4</a>   <em class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</em>
+<a name="5" href="#5">5</a>   <em class="comment"> * you may not use this file except in compliance with the License.</em>
+<a name="6" href="#6">6</a>   <em class="comment"> * You may obtain a copy of the License at</em>
+<a name="7" href="#7">7</a>   <em class="comment"> *</em>
+<a name="8" href="#8">8</a>   <em class="comment"> *     <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="9" href="#9">9</a>   <em class="comment"> *</em>
+<a name="10" href="#10">10</a>  <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a name="11" href="#11">11</a>  <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a name="12" href="#12">12</a>  <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a name="13" href="#13">13</a>  <em class="comment"> * See the License for the specific language governing permissions and</em>
+<a name="14" href="#14">14</a>  <em class="comment"> * limitations under the License.</em>
+<a name="15" href="#15">15</a>  <em class="comment"> * ========================================================================</em>
+<a name="16" href="#16">16</a>  <em class="comment"> */</em>
+<a name="17" href="#17">17</a>  <strong>package</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/persistence/proxy/package-summary.html">org.apache.portals.graffito.jcr.persistence.proxy</a>;
+<a name="18" href="#18">18</a>  
+<a name="19" href="#19">19</a>  <strong>import</strong> java.util.ArrayList;
+<a name="20" href="#20">20</a>  <strong>import</strong> java.util.Collection;
+<a name="21" href="#21">21</a>  
+<a name="22" href="#22">22</a>  <strong>import</strong> junit.framework.Test;
+<a name="23" href="#23">23</a>  <strong>import</strong> junit.framework.TestSuite;
+<a name="24" href="#24">24</a>  
+<a name="25" href="#25">25</a>  <strong>import</strong> org.apache.commons.logging.Log;
+<a name="26" href="#26">26</a>  <strong>import</strong> org.apache.commons.logging.LogFactory;
+<a name="27" href="#27">27</a>  <strong>import</strong> org.apache.portals.graffito.jcr.RepositoryLifecycleTestSetup;
+<a name="28" href="#28">28</a>  <strong>import</strong> org.apache.portals.graffito.jcr.TestBase;
+<a name="29" href="#29">29</a>  <strong>import</strong> org.apache.portals.graffito.jcr.persistence.PersistenceManager;
+<a name="30" href="#30">30</a>  <strong>import</strong> org.apache.portals.graffito.jcr.testmodel.proxy.Detail;
+<a name="31" href="#31">31</a>  <strong>import</strong> org.apache.portals.graffito.jcr.testmodel.proxy.Main;
+<a name="32" href="#32">32</a>  
+<a name="33" href="#33">33</a>  <em>/**<em>*</em></em>
+<a name="34" href="#34">34</a>  <em> * Test inheritance with node type per concrete class (without  discreminator field)</em>
+<a name="35" href="#35">35</a>  <em> *</em>
+<a name="36" href="#36">36</a>  <em> * @author &lt;a href="<a href="mailto:christophe.lombart@gmail.com" target="alexandria_uri">mailto:christophe.lombart@gmail.com</a>">Christophe Lombart&lt;/a></em>
+<a name="37" href="#37">37</a>  <em> */</em>
+<a name="38" href="#38">38</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/persistence/proxy/ProxyTest.html">ProxyTest</a> <strong>extends</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/TestBase.html">TestBase</a> {
+<a name="39" href="#39">39</a>  	<strong>private</strong> <strong>final</strong> <strong>static</strong> Log log = LogFactory.getLog(ProxyTest.<strong>class</strong>);
+<a name="40" href="#40">40</a>  
+<a name="41" href="#41">41</a>  	<em>/**<em>*</em></em>
+<a name="42" href="#42">42</a>  <em>	 * &lt;p>Defines the test case name for junit.&lt;/p></em>
+<a name="43" href="#43">43</a>  <em>	 * @param testName The test case name.</em>
+<a name="44" href="#44">44</a>  <em>	 */</em>
+<a name="45" href="#45">45</a>  	<strong>public</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/persistence/proxy/ProxyTest.html">ProxyTest</a>(String testName) throws Exception {
+<a name="46" href="#46">46</a>  		<strong>super</strong>(testName);
+<a name="47" href="#47">47</a>  
+<a name="48" href="#48">48</a>  	}
+<a name="49" href="#49">49</a>  
+<a name="50" href="#50">50</a>  	<strong>public</strong> <strong>static</strong> Test suite() {
+<a name="51" href="#51">51</a>  		<em class="comment">// All methods starting with "test" will be executed in the test suite.</em>
+<a name="52" href="#52">52</a>  		<strong>return</strong> <strong>new</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/RepositoryLifecycleTestSetup.html">RepositoryLifecycleTestSetup</a>(<strong>new</strong> TestSuite(
+<a name="53" href="#53">53</a>  				ProxyTest.<strong>class</strong>));
+<a name="54" href="#54">54</a>  	}
+<a name="55" href="#55">55</a>  
+<a name="56" href="#56">56</a>  	<strong>public</strong> <strong>void</strong> tearDown() throws Exception {
+<a name="57" href="#57">57</a>  
+<a name="58" href="#58">58</a>  		cleanUpRepisotory();
+<a name="59" href="#59">59</a>  		<strong>super</strong>.tearDown();
+<a name="60" href="#60">60</a>  		
+<a name="61" href="#61">61</a>  	}
+<a name="62" href="#62">62</a>  
+<a name="63" href="#63">63</a>  	<strong>public</strong> <strong>void</strong> testBeanProxy() {
+<a name="64" href="#64">64</a>  
+<a name="65" href="#65">65</a>  		<strong>try</strong> {
+<a name="66" href="#66">66</a>  			PersistenceManager persistenceManager = <strong>this</strong>.getPersistenceManager();
+<a name="67" href="#67">67</a>  
+<a name="68" href="#68">68</a>  			Detail detail = <strong>new</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/testmodel/proxy/Detail.html">Detail</a>();
+<a name="69" href="#69">69</a>  			detail.setField(<span class="string">"FieldValue"</span>);			
+<a name="70" href="#70">70</a>  			
+<a name="71" href="#71">71</a>  			Detail proxyDetail = <strong>new</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/testmodel/proxy/Detail.html">Detail</a>();
+<a name="72" href="#72">72</a>  			proxyDetail.setField(<span class="string">"ProxyFieldValue"</span>);
+<a name="73" href="#73">73</a>  			
+<a name="74" href="#74">74</a>  			Main main = <strong>new</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/testmodel/proxy/Main.html">Main</a>();
+<a name="75" href="#75">75</a>  			main.setPath(<span class="string">"/test"</span>);
+<a name="76" href="#76">76</a>  			main.setDetail(detail);
+<a name="77" href="#77">77</a>  			main.setProxyDetail(proxyDetail);
+<a name="78" href="#78">78</a>  							
+<a name="79" href="#79">79</a>              persistenceManager.insert(main);
+<a name="80" href="#80">80</a>  			persistenceManager.save();
+<a name="81" href="#81">81</a>  			
+<a name="82" href="#82">82</a>  			
+<a name="83" href="#83">83</a>  			<em class="comment">//---------------------------------------------------------------------------------------------------------</em>
+<a name="84" href="#84">84</a>  			<em class="comment">// Retrieve the main object</em>
+<a name="85" href="#85">85</a>  			<em class="comment">//---------------------------------------------------------------------------------------------------------						</em>
+<a name="86" href="#86">86</a>  			main = (Main) persistenceManager.getObject( <span class="string">"/test"</span>);
+<a name="87" href="#87">87</a>  			assertNotNull(<span class="string">"detail is null"</span>, main.getDetail());
+<a name="88" href="#88">88</a>  			assertTrue(<span class="string">"Invalid detail bean"</span>, main.getDetail().getField().equals(<span class="string">"FieldValue"</span>));
+<a name="89" href="#89">89</a>  
+<a name="90" href="#90">90</a>  			assertNotNull(<span class="string">"proxydetail is null"</span>, main.getProxyDetail());
+<a name="91" href="#91">91</a>  			Object proxyObject = main.getProxyDetail();
+<a name="92" href="#92">92</a>  			assertTrue(<span class="string">"Invalid class specify for the proxy bean"</span>, proxyObject  instanceof Detail);
+<a name="93" href="#93">93</a>  			assertTrue(<span class="string">"Invalid proxy detail bean"</span>,proxyDetail .getField().equals(<span class="string">"ProxyFieldValue"</span>));
+<a name="94" href="#94">94</a>  			
+<a name="95" href="#95">95</a>  			Detail nullDetail = main.getNullDetail();
+<a name="96" href="#96">96</a>  			assertNull(<span class="string">"nulldetail is not  null"</span>,nullDetail );
+<a name="97" href="#97">97</a>  
+<a name="98" href="#98">98</a>  			
+<a name="99" href="#99">99</a>  			<em class="comment">//---------------------------------------------------------------------------------------------------------</em>
+<a name="100" href="#100">100</a> 			<em class="comment">// Update  </em>
+<a name="101" href="#101">101</a> 			<em class="comment">//---------------------------------------------------------------------------------------------------------						</em>
+<a name="102" href="#102">102</a> 			 detail = <strong>new</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/testmodel/proxy/Detail.html">Detail</a>();
+<a name="103" href="#103">103</a> 			detail.setField(<span class="string">"AnotherFieldValue"</span>);			
+<a name="104" href="#104">104</a> 			
+<a name="105" href="#105">105</a> 			proxyDetail = <strong>new</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/testmodel/proxy/Detail.html">Detail</a>();
+<a name="106" href="#106">106</a> 			proxyDetail.setField(<span class="string">"AnotherProxyFieldValue"</span>);
+<a name="107" href="#107">107</a> 			
+<a name="108" href="#108">108</a> 			main.setDetail(detail);
+<a name="109" href="#109">109</a> 			main.setProxyDetail(proxyDetail);
+<a name="110" href="#110">110</a> 			
+<a name="111" href="#111">111</a> 			persistenceManager.update(main);
+<a name="112" href="#112">112</a> 			persistenceManager.save();
+<a name="113" href="#113">113</a> 
+<a name="114" href="#114">114</a> 			<em class="comment">//---------------------------------------------------------------------------------------------------------</em>
+<a name="115" href="#115">115</a> 			<em class="comment">// Retrieve the main object</em>
+<a name="116" href="#116">116</a> 			<em class="comment">//---------------------------------------------------------------------------------------------------------						</em>
+<a name="117" href="#117">117</a> 
+<a name="118" href="#118">118</a> 			main = (Main) persistenceManager.getObject( <span class="string">"/test"</span>);
+<a name="119" href="#119">119</a> 			assertNotNull(<span class="string">"detail is null"</span>, main.getDetail());
+<a name="120" href="#120">120</a> 			assertTrue(<span class="string">"Invalid detail bean"</span>, main.getDetail().getField().equals(<span class="string">"AnotherFieldValue"</span>));
+<a name="121" href="#121">121</a> 
+<a name="122" href="#122">122</a> 			assertNotNull(<span class="string">"proxydetail is null"</span>, main.getProxyDetail());
+<a name="123" href="#123">123</a> 			proxyObject = main.getProxyDetail();
+<a name="124" href="#124">124</a> 			assertTrue(<span class="string">"Invalid class specify for the proxy bean"</span>, proxyObject  instanceof Detail);
+<a name="125" href="#125">125</a> 			assertTrue(<span class="string">"Invalid proxy detail bean"</span>,proxyDetail .getField().equals(<span class="string">"AnotherProxyFieldValue"</span>));
+<a name="126" href="#126">126</a> 						
+<a name="127" href="#127">127</a> 			assertNull(<span class="string">"nulldetail is not  null"</span>,main.getNullDetail());
+<a name="128" href="#128">128</a> 				
+<a name="129" href="#129">129</a> 	
+<a name="130" href="#130">130</a> 		} <strong>catch</strong> (Exception e) {
+<a name="131" href="#131">131</a> 			e.printStackTrace();
+<a name="132" href="#132">132</a> 			fail();
+<a name="133" href="#133">133</a> 		}
+<a name="134" href="#134">134</a> 
+<a name="135" href="#135">135</a> 		
+<a name="136" href="#136">136</a> 	}
+<a name="137" href="#137">137</a> 	
+<a name="138" href="#138">138</a> 	<strong>public</strong> <strong>void</strong> testCollectionProxy() {
+<a name="139" href="#139">139</a> 
+<a name="140" href="#140">140</a> 		<strong>try</strong> {
+<a name="141" href="#141">141</a> 			PersistenceManager persistenceManager = <strong>this</strong>.getPersistenceManager();
+<a name="142" href="#142">142</a> 
+<a name="143" href="#143">143</a> 			ArrayList  details= <strong>new</strong> ArrayList();
+<a name="144" href="#144">144</a> 			<strong>for</strong>(<strong>int</strong> i=1; i&lt;=100;i++)
+<a name="145" href="#145">145</a> 			{
+<a name="146" href="#146">146</a> 				Detail detail = <strong>new</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/testmodel/proxy/Detail.html">Detail</a>();
+<a name="147" href="#147">147</a> 				detail.setField(<span class="string">"field"</span> + i);				
+<a name="148" href="#148">148</a> 				details.add(detail);
+<a name="149" href="#149">149</a> 			}
+<a name="150" href="#150">150</a> 			
+<a name="151" href="#151">151</a> 			Main main = <strong>new</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/testmodel/proxy/Main.html">Main</a>();
+<a name="152" href="#152">152</a> 			main.setProxyCollection(details);
+<a name="153" href="#153">153</a> 			main.setPath(<span class="string">"/test"</span>);							
+<a name="154" href="#154">154</a>             persistenceManager.insert(main);
+<a name="155" href="#155">155</a> 			persistenceManager.save();
+<a name="156" href="#156">156</a> 			
+<a name="157" href="#157">157</a> 			
+<a name="158" href="#158">158</a> 			<em class="comment">//---------------------------------------------------------------------------------------------------------</em>
+<a name="159" href="#159">159</a> 			<em class="comment">// Retrieve the main object</em>
+<a name="160" href="#160">160</a> 			<em class="comment">//---------------------------------------------------------------------------------------------------------						</em>
+<a name="161" href="#161">161</a> 			main = (Main) persistenceManager.getObject( <span class="string">"/test"</span>);
+<a name="162" href="#162">162</a> 			assertNotNull(<span class="string">"main is null"</span>, main);
+<a name="163" href="#163">163</a> 
+<a name="164" href="#164">164</a>             Collection result = main.getProxyCollection();
+<a name="165" href="#165">165</a>             assertEquals(<span class="string">"Invalide size"</span>, result.size(), 100);
+<a name="166" href="#166">166</a>             assertNull(<span class="string">"nullcollectionproxy  is not null"</span>, main.getNullProxyCollection());
+<a name="167" href="#167">167</a> 			
+<a name="168" href="#168">168</a> 			<em class="comment">//---------------------------------------------------------------------------------------------------------</em>
+<a name="169" href="#169">169</a> 			<em class="comment">// Update  </em>
+<a name="170" href="#170">170</a> 			<em class="comment">//---------------------------------------------------------------------------------------------------------</em>
+<a name="171" href="#171">171</a>             
+<a name="172" href="#172">172</a>             <a href="../../../../../../../org/apache/portals/graffito/jcr/testmodel/proxy/Detail.html">Detail</a> detail = <strong>new</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/testmodel/proxy/Detail.html">Detail</a>();
+<a name="173" href="#173">173</a> 			detail.setField(<span class="string">"newFieldValue"</span>);			
+<a name="174" href="#174">174</a> 			result.add(detail);
+<a name="175" href="#175">175</a> 			main.setProxyCollection(result);
+<a name="176" href="#176">176</a> 			persistenceManager.update(main);
+<a name="177" href="#177">177</a> 			persistenceManager.save();
+<a name="178" href="#178">178</a> 
+<a name="179" href="#179">179</a> 			<em class="comment">//---------------------------------------------------------------------------------------------------------</em>
+<a name="180" href="#180">180</a> 			<em class="comment">// Retrieve the main object</em>
+<a name="181" href="#181">181</a> 			<em class="comment">//---------------------------------------------------------------------------------------------------------						</em>
+<a name="182" href="#182">182</a> 			main = (Main) persistenceManager.getObject(<span class="string">"/test"</span>);
+<a name="183" href="#183">183</a> 			assertNotNull(<span class="string">"main  is null"</span>, main);
+<a name="184" href="#184">184</a>             assertEquals(<span class="string">"Invalide size"</span>,main.getProxyCollection().size(), 101);
+<a name="185" href="#185">185</a>             assertNull(<span class="string">"nullcollectionproxy  is not null"</span>, main.getNullProxyCollection());
+<a name="186" href="#186">186</a>             
+<a name="187" href="#187">187</a> 	
+<a name="188" href="#188">188</a> 		} <strong>catch</strong> (Exception e) {
+<a name="189" href="#189">189</a> 			e.printStackTrace();
+<a name="190" href="#190">190</a> 			fail();
+<a name="191" href="#191">191</a> 		}
+<a name="192" href="#192">192</a> 
+<a name="193" href="#193">193</a> 		
+<a name="194" href="#194">194</a> 	}
+<a name="195" href="#195">195</a> 
+<a name="196" href="#196">196</a> 
+<a name="197" href="#197">197</a> 
+<a name="198" href="#198">198</a> 	    
+<a name="199" href="#199">199</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+

Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/proxy/package-frame.html
URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/proxy/package-frame.html?view=auto&rev=448367
==============================================================================
--- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/proxy/package-frame.html (added)
+++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/proxy/package-frame.html Wed Sep 20 15:17:15 2006
@@ -0,0 +1,31 @@
+
+
+  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+  <html lang="en">
+    <head>
+      <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"></meta>
+      <title>Graffito JCR Mapping 1.0-a1-dev Reference Package org.apache.portals.graffito.jcr.persistence.proxy</title>
+      <link rel="stylesheet" href="../../../../../../../stylesheet.css" type="text/css" title="style"></link>
+    </head>
+    <body>
+
+      <h3>
+        <a href="package-summary.html" target="classFrame">org.apache.portals.graffito.jcr.persistence.proxy</a>
+      </h3>
+
+      <h3>Classes</h3>
+
+      <ul>
+        
+          <li>
+            <a href="AllTests.html" target="classFrame">AllTests</a>
+          </li>
+        
+          <li>
+            <a href="ProxyTest.html" target="classFrame">ProxyTest</a>
+          </li>
+        
+      </ul>
+
+    </body>
+  </html>

Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/proxy/package-summary.html
URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/proxy/package-summary.html?view=auto&rev=448367
==============================================================================
--- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/proxy/package-summary.html (added)
+++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/proxy/package-summary.html Wed Sep 20 15:17:15 2006
@@ -0,0 +1,108 @@
+
+
+  
+
+  
+    
+
+    
+
+    
+
+  
+      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+      <html lang="en">
+        <head>
+          <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"></meta>
+          <title>Graffito JCR Mapping 1.0-a1-dev Reference Package </title>
+          <link rel="stylesheet" href="../../../../../../../stylesheet.css" type="text/css" title="style"></link>
+        </head>
+        <body>
+
+          
+      
+      
+
+      <div class="overview">
+        <ul>
+          <li>
+            <a href="../../../../../../../overview-summary.html">Overview</a>
+          </li>
+          <li class="selected">Package</li>
+        </ul>
+      </div>
+      <div class="framenoframe">
+        <ul>
+          <li>
+            <a href="../../../../../../../index.html" target="_top">FRAMES</a>
+          </li>
+          <li>
+            <a href="package-summary.html" target="_top">NO FRAMES</a>
+          </li>
+        </ul>
+      </div>
+
+      
+
+    
+      
+      <h2>Package org.apache.portals.graffito.jcr.persistence.proxy</h2>
+
+      <table class="summary">
+        <thead>
+          <tr>
+            <th>Class Summary</th>
+          </tr>
+        </thead>
+
+        <tbody>
+          
+            <tr>
+              <td>
+                <a href="AllTests.html" target="classFrame">AllTests</a>
+              </td>
+            </tr>
+          
+            <tr>
+              <td>
+                <a href="ProxyTest.html" target="classFrame">ProxyTest</a>
+              </td>
+            </tr>
+          
+        </tbody>
+      </table>
+
+    
+      
+      
+
+      <div class="overview">
+        <ul>
+          <li>
+            <a href="../../../../../../../overview-summary.html">Overview</a>
+          </li>
+          <li class="selected">Package</li>
+        </ul>
+      </div>
+      <div class="framenoframe">
+        <ul>
+          <li>
+            <a href="../../../../../../../index.html" target="_top">FRAMES</a>
+          </li>
+          <li>
+            <a href="package-summary.html" target="_top">NO FRAMES</a>
+          </li>
+        </ul>
+      </div>
+
+      
+
+    
+    
+
+          <hr></hr>
+
+          Copyright &copy; 2004-2006 The Apache Software Foundation. All Rights Reserved.
+        </body>
+      </html>
+    

Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/query/AllTests.html
URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/query/AllTests.html?view=auto&rev=448367
==============================================================================
--- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/query/AllTests.html (added)
+++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/query/AllTests.html Wed Sep 20 15:17:15 2006
@@ -0,0 +1,62 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>AllTests xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a>   <em class="comment">/*<em class="comment"> ========================================================================</em></em>
+<a name="2" href="#2">2</a>   <em class="comment"> * Copyright 2004 The Apache Software Foundation</em>
+<a name="3" href="#3">3</a>   <em class="comment"> *</em>
+<a name="4" href="#4">4</a>   <em class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</em>
+<a name="5" href="#5">5</a>   <em class="comment"> * you may not use this file except in compliance with the License.</em>
+<a name="6" href="#6">6</a>   <em class="comment"> * You may obtain a copy of the License at</em>
+<a name="7" href="#7">7</a>   <em class="comment"> *</em>
+<a name="8" href="#8">8</a>   <em class="comment"> *     <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="9" href="#9">9</a>   <em class="comment"> *</em>
+<a name="10" href="#10">10</a>  <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a name="11" href="#11">11</a>  <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a name="12" href="#12">12</a>  <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a name="13" href="#13">13</a>  <em class="comment"> * See the License for the specific language governing permissions and</em>
+<a name="14" href="#14">14</a>  <em class="comment"> * limitations under the License.</em>
+<a name="15" href="#15">15</a>  <em class="comment"> * ========================================================================</em>
+<a name="16" href="#16">16</a>  <em class="comment"> */</em>
+<a name="17" href="#17">17</a>  <strong>package</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/persistence/query/package-summary.html">org.apache.portals.graffito.jcr.persistence.query</a>;
+<a name="18" href="#18">18</a>  
+<a name="19" href="#19">19</a>  <strong>import</strong> org.apache.portals.graffito.jcr.RepositoryLifecycleTestSetup;
+<a name="20" href="#20">20</a>  
+<a name="21" href="#21">21</a>  <strong>import</strong> junit.framework.Test;
+<a name="22" href="#22">22</a>  <strong>import</strong> junit.framework.TestSuite;
+<a name="23" href="#23">23</a>  
+<a name="24" href="#24">24</a>  
+<a name="25" href="#25">25</a>  <em>/**<em>*</em></em>
+<a name="26" href="#26">26</a>  <em> * Package level tests.</em>
+<a name="27" href="#27">27</a>  <em> * </em>
+<a name="28" href="#28">28</a>  <em> * @author &lt;a href='<a href="mailto:the_mindstorm" target="alexandria_uri">mailto:the_mindstorm</a>[at]evolva[dot]ro'>Alexandru Popescu&lt;/a></em>
+<a name="29" href="#29">29</a>  <em> */</em>
+<a name="30" href="#30">30</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/AllTests.html">AllTests</a> {
+<a name="31" href="#31">31</a>  
+<a name="32" href="#32">32</a>      <strong>public</strong> <strong>static</strong> Test suite() {
+<a name="33" href="#33">33</a>          <strong>return</strong> <strong>new</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/RepositoryLifecycleTestSetup.html">RepositoryLifecycleTestSetup</a>(buildSuite());
+<a name="34" href="#34">34</a>      }
+<a name="35" href="#35">35</a>  
+<a name="36" href="#36">36</a>      <strong>public</strong> <strong>static</strong> Test buildSuite() {
+<a name="37" href="#37">37</a>          TestSuite suite= <strong>new</strong> TestSuite(<span class="string">"Test for org.apache.portals.graffito.jcr.persistence.query"</span>);
+<a name="38" href="#38">38</a>          <em class="comment">//$JUnit-BEGIN$</em>
+<a name="39" href="#39">39</a>          suite.addTestSuite(PersistenceManagerAtomicQueryTest.<strong>class</strong>);
+<a name="40" href="#40">40</a>          suite.addTestSuite(PersistenceManagerIteratorQueryTest.<strong>class</strong>);
+<a name="41" href="#41">41</a>          suite.addTestSuite(PersistenceManagerMultiValueQueryTest.<strong>class</strong>);
+<a name="42" href="#42">42</a>          suite.addTestSuite(PersistenceManagerScopeQueryTest.<strong>class</strong>);
+<a name="43" href="#43">43</a>          suite.addTestSuite(PersistenceManagerSimpleQueryTest.<strong>class</strong>);
+<a name="44" href="#44">44</a>          
+<a name="45" href="#45">45</a>          <em class="comment">//$JUnit-END$</em>
+<a name="46" href="#46">46</a>  
+<a name="47" href="#47">47</a>          <strong>return</strong> suite;
+<a name="48" href="#48">48</a>      }
+<a name="49" href="#49">49</a>  }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+

Added: incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/query/PersistenceManagerAtomicQueryTest.html
URL: http://svn.apache.org/viewvc/incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/query/PersistenceManagerAtomicQueryTest.html?view=auto&rev=448367
==============================================================================
--- incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/query/PersistenceManagerAtomicQueryTest.html (added)
+++ incubator/graffito/site/jcr-mapping/xref-test/org/apache/portals/graffito/jcr/persistence/query/PersistenceManagerAtomicQueryTest.html Wed Sep 20 15:17:15 2006
@@ -0,0 +1,256 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>PersistenceManagerAtomicQueryTest xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a>   <em class="comment">/*<em class="comment"> ========================================================================</em></em>
+<a name="2" href="#2">2</a>   <em class="comment"> * Copyright 2004 The Apache Software Foundation</em>
+<a name="3" href="#3">3</a>   <em class="comment"> *</em>
+<a name="4" href="#4">4</a>   <em class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</em>
+<a name="5" href="#5">5</a>   <em class="comment"> * you may not use this file except in compliance with the License.</em>
+<a name="6" href="#6">6</a>   <em class="comment"> * You may obtain a copy of the License at</em>
+<a name="7" href="#7">7</a>   <em class="comment"> *</em>
+<a name="8" href="#8">8</a>   <em class="comment"> *     <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="9" href="#9">9</a>   <em class="comment"> *</em>
+<a name="10" href="#10">10</a>  <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a name="11" href="#11">11</a>  <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a name="12" href="#12">12</a>  <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a name="13" href="#13">13</a>  <em class="comment"> * See the License for the specific language governing permissions and</em>
+<a name="14" href="#14">14</a>  <em class="comment"> * limitations under the License.</em>
+<a name="15" href="#15">15</a>  <em class="comment"> * ========================================================================</em>
+<a name="16" href="#16">16</a>  <em class="comment"> */</em>
+<a name="17" href="#17">17</a>  <strong>package</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/persistence/query/package-summary.html">org.apache.portals.graffito.jcr.persistence.query</a>;
+<a name="18" href="#18">18</a>  
+<a name="19" href="#19">19</a>  <strong>import</strong> java.io.ByteArrayInputStream;
+<a name="20" href="#20">20</a>  <strong>import</strong> java.sql.Timestamp;
+<a name="21" href="#21">21</a>  <strong>import</strong> java.util.Calendar;
+<a name="22" href="#22">22</a>  <strong>import</strong> java.util.Collection;
+<a name="23" href="#23">23</a>  <strong>import</strong> java.util.Date;
+<a name="24" href="#24">24</a>  
+<a name="25" href="#25">25</a>  <strong>import</strong> junit.framework.Test;
+<a name="26" href="#26">26</a>  <strong>import</strong> junit.framework.TestSuite;
+<a name="27" href="#27">27</a>  
+<a name="28" href="#28">28</a>  <strong>import</strong> org.apache.commons.logging.Log;
+<a name="29" href="#29">29</a>  <strong>import</strong> org.apache.commons.logging.LogFactory;
+<a name="30" href="#30">30</a>  <strong>import</strong> org.apache.portals.graffito.jcr.RepositoryLifecycleTestSetup;
+<a name="31" href="#31">31</a>  <strong>import</strong> org.apache.portals.graffito.jcr.TestBase;
+<a name="32" href="#32">32</a>  <strong>import</strong> org.apache.portals.graffito.jcr.persistence.PersistenceManager;
+<a name="33" href="#33">33</a>  <strong>import</strong> org.apache.portals.graffito.jcr.query.Filter;
+<a name="34" href="#34">34</a>  <strong>import</strong> org.apache.portals.graffito.jcr.query.Query;
+<a name="35" href="#35">35</a>  <strong>import</strong> org.apache.portals.graffito.jcr.query.QueryManager;
+<a name="36" href="#36">36</a>  <strong>import</strong> org.apache.portals.graffito.jcr.testmodel.Atomic;
+<a name="37" href="#37">37</a>  
+<a name="38" href="#38">38</a>  <em>/**<em>*</em></em>
+<a name="39" href="#39">39</a>  <em> * Test Query on atomic fields</em>
+<a name="40" href="#40">40</a>  <em> *</em>
+<a name="41" href="#41">41</a>  <em> * @author &lt;a href="<a href="mailto:christophe.lombart@sword-technologies.com" target="alexandria_uri">mailto:christophe.lombart@sword-technologies.com</a>">Christophe Lombart&lt;/a></em>
+<a name="42" href="#42">42</a>  <em> */</em>
+<a name="43" href="#43">43</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/persistence/query/PersistenceManagerAtomicQueryTest.html">PersistenceManagerAtomicQueryTest</a> <strong>extends</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/TestBase.html">TestBase</a>
+<a name="44" href="#44">44</a>  {
+<a name="45" href="#45">45</a>  	<strong>private</strong> <strong>final</strong> <strong>static</strong> Log log = LogFactory.getLog(PersistenceManagerAtomicQueryTest.<strong>class</strong>);
+<a name="46" href="#46">46</a>  	<strong>private</strong> Date date = <strong>new</strong> Date();
+<a name="47" href="#47">47</a>  	
+<a name="48" href="#48">48</a>  	<em>/**<em>*</em></em>
+<a name="49" href="#49">49</a>  <em>	 * &lt;p>Defines the test case name for junit.&lt;/p></em>
+<a name="50" href="#50">50</a>  <em>	 * @param testName The test case name.</em>
+<a name="51" href="#51">51</a>  <em>	 */</em>
+<a name="52" href="#52">52</a>  	<strong>public</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/persistence/query/PersistenceManagerAtomicQueryTest.html">PersistenceManagerAtomicQueryTest</a>(String testName) throws Exception
+<a name="53" href="#53">53</a>  	{
+<a name="54" href="#54">54</a>  		<strong>super</strong>(testName);
+<a name="55" href="#55">55</a>  		
+<a name="56" href="#56">56</a>  	}
+<a name="57" href="#57">57</a>  
+<a name="58" href="#58">58</a>  	<strong>public</strong> <strong>static</strong> Test suite()
+<a name="59" href="#59">59</a>  	{
+<a name="60" href="#60">60</a>  		<em class="comment">// All methods starting with "test" will be executed in the test suite.</em>
+<a name="61" href="#61">61</a>  		<strong>return</strong> <strong>new</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/RepositoryLifecycleTestSetup.html">RepositoryLifecycleTestSetup</a>(<strong>new</strong> TestSuite(PersistenceManagerAtomicQueryTest.<strong>class</strong>));
+<a name="62" href="#62">62</a>  	}
+<a name="63" href="#63">63</a>  	
+<a name="64" href="#64">64</a>      
+<a name="65" href="#65">65</a>      <strong>public</strong> <strong>void</strong> tearDown() throws Exception
+<a name="66" href="#66">66</a>      {
+<a name="67" href="#67">67</a>  
+<a name="68" href="#68">68</a>  		<strong>for</strong> (<strong>int</strong> i = 1; i &lt;= 100; i++)
+<a name="69" href="#69">69</a>  		{
+<a name="70" href="#70">70</a>  			<strong>if</strong> (getPersistenceManager().objectExists(<span class="string">"/test"</span> + i))
+<a name="71" href="#71">71</a>  			{
+<a name="72" href="#72">72</a>  				getPersistenceManager().remove(<span class="string">"/test"</span> + i);
+<a name="73" href="#73">73</a>  			}
+<a name="74" href="#74">74</a>  
+<a name="75" href="#75">75</a>  		}
+<a name="76" href="#76">76</a>          getPersistenceManager().save();
+<a name="77" href="#77">77</a>          <strong>super</strong>.tearDown();
+<a name="78" href="#78">78</a>      }	
+<a name="79" href="#79">79</a>  	
+<a name="80" href="#80">80</a>  
+<a name="81" href="#81">81</a>  	<strong>public</strong> <strong>void</strong> testQueryAtomicFields()
+<a name="82" href="#82">82</a>  	{
+<a name="83" href="#83">83</a>  
+<a name="84" href="#84">84</a>  		<strong>try</strong>
+<a name="85" href="#85">85</a>  		{
+<a name="86" href="#86">86</a>  			
+<a name="87" href="#87">87</a>  			<strong>this</strong>.importData(date);
+<a name="88" href="#88">88</a>  			PersistenceManager persistenceManager = <strong>this</strong>.getPersistenceManager();
+<a name="89" href="#89">89</a>  			
+<a name="90" href="#90">90</a>  			<em class="comment">// Test Boolean value </em>
+<a name="91" href="#91">91</a>  			QueryManager queryManager = <strong>this</strong>.getQueryManager();
+<a name="92" href="#92">92</a>  			Filter filter = queryManager.createFilter(Atomic.<strong>class</strong>);
+<a name="93" href="#93">93</a>  			filter.addEqualTo(<span class="string">"booleanObject"</span>, <strong>new</strong> Boolean(<strong>true</strong>));
+<a name="94" href="#94">94</a>  			Query query = queryManager.createQuery(filter);
+<a name="95" href="#95">95</a>  			
+<a name="96" href="#96">96</a>  			<strong>long</strong> start = System.currentTimeMillis();
+<a name="97" href="#97">97</a>  			Collection result = persistenceManager.getObjects(query);
+<a name="98" href="#98">98</a>  			System.out.println(<span class="string">"getObjects  : "</span> + (System.currentTimeMillis() - start));
+<a name="99" href="#99">99</a>  			
+<a name="100" href="#100">100</a> 			assertTrue(<span class="string">"Invalid number of objects - should be = 50"</span>, result.size() == 50);
+<a name="101" href="#101">101</a> 			
+<a name="102" href="#102">102</a> 			filter = queryManager.createFilter(Atomic.<strong>class</strong>);
+<a name="103" href="#103">103</a> 			filter.addEqualTo(<span class="string">"booleanPrimitive"</span>, <strong>new</strong> Boolean(false));
+<a name="104" href="#104">104</a> 			query = queryManager.createQuery(filter);
+<a name="105" href="#105">105</a> 
+<a name="106" href="#106">106</a> 			start = System.currentTimeMillis();
+<a name="107" href="#107">107</a> 			result = persistenceManager.getObjects(query);
+<a name="108" href="#108">108</a> 			System.out.println(<span class="string">"getObjects 2 : "</span> + (System.currentTimeMillis() - start));
+<a name="109" href="#109">109</a> 			assertTrue(<span class="string">"Invalid number of objects - should be = 0"</span>, result.size() == 0);
+<a name="110" href="#110">110</a> 			
+<a name="111" href="#111">111</a> 			
+<a name="112" href="#112">112</a> 			<em class="comment">// Test int value</em>
+<a name="113" href="#113">113</a> 			filter = queryManager.createFilter(Atomic.<strong>class</strong>);
+<a name="114" href="#114">114</a> 			filter.addBetween(<span class="string">"integerObject"</span>, <strong>new</strong> Integer(0), <strong>new</strong> Integer(500));
+<a name="115" href="#115">115</a> 			query = queryManager.createQuery(filter);
+<a name="116" href="#116">116</a> 			
+<a name="117" href="#117">117</a> 			result = persistenceManager.getObjects(query);			
+<a name="118" href="#118">118</a> 			assertTrue(<span class="string">"Invalid number of objects - should be = 5"</span>, result.size() == 5);
+<a name="119" href="#119">119</a> 			
+<a name="120" href="#120">120</a> 			filter = queryManager.createFilter(Atomic.<strong>class</strong>);
+<a name="121" href="#121">121</a> 			filter.addLessOrEqualThan(<span class="string">"intPrimitive"</span>, <strong>new</strong> Integer(236));
+<a name="122" href="#122">122</a> 			query = queryManager.createQuery(filter);
+<a name="123" href="#123">123</a> 			
+<a name="124" href="#124">124</a> 			result = persistenceManager.getObjects(query);			
+<a name="125" href="#125">125</a> 			assertTrue(<span class="string">"Invalid number of objects - should be = 36"</span>, result.size() == 36);
+<a name="126" href="#126">126</a> 
+<a name="127" href="#127">127</a> 			
+<a name="128" href="#128">128</a> 			<em class="comment">//Test Date &amp; Calendar</em>
+<a name="129" href="#129">129</a> 			filter = queryManager.createFilter(Atomic.<strong>class</strong>);
+<a name="130" href="#130">130</a> 			Calendar calendar = Calendar.getInstance();
+<a name="131" href="#131">131</a> 			calendar.set(2012, 12, 01);
+<a name="132" href="#132">132</a> 			filter.addLessThan(<span class="string">"calendar"</span>, calendar);
+<a name="133" href="#133">133</a> 			query = queryManager.createQuery(filter);
+<a name="134" href="#134">134</a> 			
+<a name="135" href="#135">135</a> 			result = persistenceManager.getObjects(query);			
+<a name="136" href="#136">136</a> 			assertTrue(<span class="string">"Invalid number of objects - should be = 100 "</span>, result.size() == 100);
+<a name="137" href="#137">137</a> 
+<a name="138" href="#138">138</a> 			filter = queryManager.createFilter(Atomic.<strong>class</strong>);
+<a name="139" href="#139">139</a> 			calendar = Calendar.getInstance();
+<a name="140" href="#140">140</a> 			calendar.set(1975, 12, 01);
+<a name="141" href="#141">141</a> 			filter.addLessThan(<span class="string">"calendar"</span>, calendar);
+<a name="142" href="#142">142</a> 			query = queryManager.createQuery(filter);
+<a name="143" href="#143">143</a> 			
+<a name="144" href="#144">144</a> 			result = persistenceManager.getObjects(query);			
+<a name="145" href="#145">145</a> 			assertTrue(<span class="string">"Invalid number of objects - should be = 0 "</span>, result.size() == 0);
+<a name="146" href="#146">146</a> 			
+<a name="147" href="#147">147</a> 			filter = queryManager.createFilter(Atomic.<strong>class</strong>);			
+<a name="148" href="#148">148</a> 			filter.addEqualTo(<span class="string">"date"</span>, date);
+<a name="149" href="#149">149</a> 			query = queryManager.createQuery(filter);
+<a name="150" href="#150">150</a> 			
+<a name="151" href="#151">151</a> 			result = persistenceManager.getObjects(query);			
+<a name="152" href="#152">152</a> 			assertTrue(<span class="string">"Invalid number of objects - should be = 100 "</span>, result.size() == 100);
+<a name="153" href="#153">153</a> 
+<a name="154" href="#154">154</a> 			filter = queryManager.createFilter(Atomic.<strong>class</strong>);			
+<a name="155" href="#155">155</a> 			filter.addBetween(<span class="string">"date"</span>, date, <strong>new</strong> Date());
+<a name="156" href="#156">156</a> 			query = queryManager.createQuery(filter);
+<a name="157" href="#157">157</a> 			
+<a name="158" href="#158">158</a> 			result = persistenceManager.getObjects(query);			
+<a name="159" href="#159">159</a> 			assertTrue(<span class="string">"Invalid number of objects - should be = 100 "</span>, result.size() == 100);
+<a name="160" href="#160">160</a> 			
+<a name="161" href="#161">161</a> 			<em class="comment">// Test contains method</em>
+<a name="162" href="#162">162</a> 			filter = queryManager.createFilter(Atomic.<strong>class</strong>);			
+<a name="163" href="#163">163</a> 			filter.addContains(<span class="string">"."</span>, <span class="string">"JCR"</span>);
+<a name="164" href="#164">164</a> 			query = queryManager.createQuery(filter);
+<a name="165" href="#165">165</a> 			
+<a name="166" href="#166">166</a> 			result = persistenceManager.getObjects(query);			
+<a name="167" href="#167">167</a> 			assertTrue(<span class="string">"Invalid number of objects - should be = 50 "</span>, result.size() == 50);
+<a name="168" href="#168">168</a> 			
+<a name="169" href="#169">169</a> 			filter = queryManager.createFilter(Atomic.<strong>class</strong>);			
+<a name="170" href="#170">170</a> 			filter.addContains(<span class="string">"byteArray"</span>, <span class="string">"Graffito"</span>);
+<a name="171" href="#171">171</a> 			query = queryManager.createQuery(filter);
+<a name="172" href="#172">172</a> 			
+<a name="173" href="#173">173</a> 			result = persistenceManager.getObjects(query);			
+<a name="174" href="#174">174</a> 			assertTrue(<span class="string">"Invalid number of objects - should be = 50 "</span>, result.size() == 50);
+<a name="175" href="#175">175</a> 			
+<a name="176" href="#176">176</a> 			filter = queryManager.createFilter(Atomic.<strong>class</strong>);			
+<a name="177" href="#177">177</a> 			filter.addContains(<span class="string">"byteArray"</span>, <span class="string">"String"</span>);
+<a name="178" href="#178">178</a> 			query = queryManager.createQuery(filter);
+<a name="179" href="#179">179</a> 			
+<a name="180" href="#180">180</a> 			result = persistenceManager.getObjects(query);			
+<a name="181" href="#181">181</a> 			assertTrue(<span class="string">"Invalid number of objects - should be = 0 "</span>, result.size() == 0);
+<a name="182" href="#182">182</a> 
+<a name="183" href="#183">183</a> 
+<a name="184" href="#184">184</a> 			
+<a name="185" href="#185">185</a> 		}
+<a name="186" href="#186">186</a> 		<strong>catch</strong> (Exception e)
+<a name="187" href="#187">187</a> 		{
+<a name="188" href="#188">188</a> 			 e.printStackTrace();
+<a name="189" href="#189">189</a>              fail();
+<a name="190" href="#190">190</a> 		}
+<a name="191" href="#191">191</a> 
+<a name="192" href="#192">192</a> 	}
+<a name="193" href="#193">193</a> 
+<a name="194" href="#194">194</a> 	<strong>private</strong> <strong>void</strong> importData(Date date)
+<a name="195" href="#195">195</a> 	{
+<a name="196" href="#196">196</a> 		<strong>try</strong>
+<a name="197" href="#197">197</a> 		{
+<a name="198" href="#198">198</a> 
+<a name="199" href="#199">199</a> 			PersistenceManager persistenceManager = getPersistenceManager();
+<a name="200" href="#200">200</a> 			
+<a name="201" href="#201">201</a> 			<strong>for</strong> (<strong>int</strong> i = 1; i &lt;= 100; i++)
+<a name="202" href="#202">202</a> 			{
+<a name="203" href="#203">203</a> 				Atomic a = <strong>new</strong> <a href="../../../../../../../org/apache/portals/graffito/jcr/testmodel/Atomic.html">Atomic</a>();
+<a name="204" href="#204">204</a> 				a.setPath(<span class="string">"/test"</span> + i);
+<a name="205" href="#205">205</a> 				a.setBooleanObject(<strong>new</strong> Boolean(i%2==0));
+<a name="206" href="#206">206</a> 				a.setBooleanPrimitive(<strong>true</strong>);
+<a name="207" href="#207">207</a> 				a.setIntegerObject(<strong>new</strong> Integer(100 * i));
+<a name="208" href="#208">208</a> 				a.setIntPrimitive(200 + i);
+<a name="209" href="#209">209</a> 				a.setString(<span class="string">"Test String "</span> + i);
+<a name="210" href="#210">210</a> 				a.setDate(date);
+<a name="211" href="#211">211</a> 				Calendar calendar = Calendar.getInstance();
+<a name="212" href="#212">212</a> 				calendar.set(1976, 4, 20, 15, 40);
+<a name="213" href="#213">213</a> 				a.setCalendar(calendar);
+<a name="214" href="#214">214</a> 				a.setDoubleObject(<strong>new</strong> Double(2.12 + i));
+<a name="215" href="#215">215</a> 				a.setDoublePrimitive(1.23 + i);
+<a name="216" href="#216">216</a> 				<strong>long</strong> now = System.currentTimeMillis();
+<a name="217" href="#217">217</a> 				a.setTimestamp(<strong>new</strong> Timestamp(now));
+<a name="218" href="#218">218</a> 				<strong>if</strong> ((i % 2) == 0)
+<a name="219" href="#219">219</a> 				{
+<a name="220" href="#220">220</a> 				     a.setByteArray(<span class="string">"This is small object stored in a JCR repository"</span>.getBytes());
+<a name="221" href="#221">221</a> 				     a.setInputStream(<strong>new</strong> ByteArrayInputStream(<span class="string">"Test inputstream"</span>.getBytes()));
+<a name="222" href="#222">222</a> 				}
+<a name="223" href="#223">223</a> 				<strong>else</strong>
+<a name="224" href="#224">224</a> 				{
+<a name="225" href="#225">225</a> 					 a.setByteArray(<span class="string">"This is small object stored in a Graffito repository"</span>.getBytes());
+<a name="226" href="#226">226</a> 					 a.setInputStream(<strong>new</strong> ByteArrayInputStream(<span class="string">"Another Stream"</span>.getBytes()));
+<a name="227" href="#227">227</a> 				}
+<a name="228" href="#228">228</a> 				persistenceManager.insert(a);
+<a name="229" href="#229">229</a> 				
+<a name="230" href="#230">230</a> 				
+<a name="231" href="#231">231</a> 			}
+<a name="232" href="#232">232</a> 			persistenceManager.save();
+<a name="233" href="#233">233</a> 
+<a name="234" href="#234">234</a> 		}
+<a name="235" href="#235">235</a> 		<strong>catch</strong> (Exception e)
+<a name="236" href="#236">236</a> 		{
+<a name="237" href="#237">237</a> 			e.printStackTrace();
+<a name="238" href="#238">238</a> 			fail(<span class="string">"Exception occurs during the unit test : "</span> + e);
+<a name="239" href="#239">239</a> 		}
+<a name="240" href="#240">240</a> 
+<a name="241" href="#241">241</a> 	}
+<a name="242" href="#242">242</a> 	
+<a name="243" href="#243">243</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+



Mime
View raw message