openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awh...@apache.org
Subject svn commit: r484738 - /incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml
Date Fri, 08 Dec 2006 20:20:24 GMT
Author: awhite
Date: Fri Dec  8 12:20:22 2006
New Revision: 484738

URL: http://svn.apache.org/viewvc?view=rev&rev=484738
Log:
Document capabilities of new proxy manager.


Modified:
    incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml

Modified: incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml?view=diff&rev=484738&r1=484737&r2=484738
==============================================================================
--- incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml (original)
+++ incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml Fri Dec  8 12:20:22
2006
@@ -1056,9 +1056,9 @@
 OpenJPA smart proxies by using fields of type <classname>java.util.Set
 </classname>, <classname>java.util.TreeSet</classname>, and <classname>
 java.util.HashSet</classname> for your collections whenever possible. Smart
-proxies for these types are more efficient than proxies for <classname>List
-</classname>s. You can also design your own smart proxies to further optimize
-OpenJPA for your usage patterns. See the section on
+proxies for these types are more efficient than proxies for <classname>
+List</classname>s. You can also design your own smart proxies to further 
+optimize OpenJPA for your usage patterns. See the section on
 <link linkend="ref_guide_pc_scos_proxy_custom">custom proxies</link> for
 details.
                 </para>
@@ -1222,9 +1222,49 @@
 <literal>true</literal>.
                         </para>
                     </listitem>
+                    <listitem>
+                        <para>
+<literal>AssertAllowedType</literal>: Whether to immediately throw an exception
+if you attempt to add an element to a collection or map that is not assignable
+to the element type declared in metadata.  Defaults to <literal>false</literal>.
+                        </para>
+                    </listitem>
+                </itemizedlist>
+                <para>
+The default proxy manager can proxy the standard methods of any 
+<classname>Collection</classname>, <classname>List</classname>, 
+<classname>Map</classname>, <classname>Queue</classname>, 
+<classname>Date</classname>, or <classname>Calendar</classname> class,

+including custom implementations.  It can also proxy custom classes whose 
+accessor and mutator methods follow JavaBean naming conventions.  Your custom
+types must, however, meet the following criteria:
+                </para>
+                <itemizedlist>
+                    <listitem>
+                        <para>
+Custom container types must have a public no-arg constructor or a public
+constructor that takes a single <classname>Comparator</classname> parameter.
+                        </para>
+                    </listitem>
+                    <listitem>
+                        <para>
+Custom date types must have a public no-arg constructor or a public
+constructor that takes a single <classname>long</classname> parameter 
+representing the current time.
+                        </para>
+                    </listitem>
+                    <listitem>
+                        <para>
+Other custom types must have a public no-arg constructor or a public copy
+constructor.  If a custom types does not have a copy constructor, it must be 
+possible to fully copy an instance A by creating a new instance B and calling 
+each of B's setters with the value from the corresponding getter on A.
+                        </para>
+                    </listitem>
                 </itemizedlist>
                 <para>
-For custom behavior, OpenJPA allows you to define your own proxy classes, and
+If you have custom classes that must be proxied and do not meet these 
+requirements, OpenJPA allows you to define your own proxy classes and
 your own proxy manager. See the <literal>openjpa.util</literal> package
 <ulink url="../javadoc/">Javadoc</ulink> for details on the interfaces involved,
 and the utility classes OpenJPA provides to assist you.



Mime
View raw message