openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwsut...@apache.org
Subject svn commit: r443113 - in /incubator/openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/ openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/strats/ openjpa-jdbc/...
Date Wed, 13 Sep 2006 20:35:08 GMT
Author: kwsutter
Date: Wed Sep 13 13:35:08 2006
New Revision: 443113

URL: http://svn.apache.org/viewvc?view=rev&rev=443113
Log:
Removed references to LockGroups from the messages, documents, and code since these are not provided as
part of the OpenJPA code drop.

Modified:
    incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingDefaultsImpl.java
    incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/localizer.properties
    incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/strats/localizer.properties
    incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties
    incubator/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_trans.xml
    incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_mapping.xml
    incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_meta.xml
    incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml

Modified: incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingDefaultsImpl.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingDefaultsImpl.java?view=diff&rev=443113&r1=443112&r2=443113
==============================================================================
--- incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingDefaultsImpl.java (original)
+++ incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingDefaultsImpl.java Wed Sep 13 13:35:08 2006
@@ -335,7 +335,7 @@
 
     /**
      * Default base name for version identity columns, or null to the mapping's
-     * built-in name. This name may be combined with lock group names.
+     * built-in name.
      */
     public String getVersionColumnName() {
         return _versName;
@@ -343,7 +343,7 @@
 
     /**
      * Default base name for version identity columns, or null to the mapping's
-     * built-in name. This name may be combined with lock group names.
+     * built-in name.
      */
     public void setVersionColumnName(String versName) {
         _versName = versName;

Modified: incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/localizer.properties
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/localizer.properties?view=diff&rev=443113&r1=443112&r2=443113
==============================================================================
--- incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/localizer.properties (original)
+++ incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/localizer.properties Wed Sep 13 13:35:08 2006
@@ -15,14 +15,12 @@
 	declarations.
 bad-targetfield: "{0}" has a column with target field "{1}", but that is not a \
 	primary key field of the related class.
-bad-col-lg-counts: Cannot synchronize mapping information: the number of \
-	version columns is not equal to the number of lock groups.
 no-joinable: You cannot join on column "{0}".  It is not managed by a mapping \
 	that supports joins.
 join-required: Missing table name for field "{0}".  This field cannot reside \
 	in the owning class table.
 bad-discrim-value: The declared discriminator value "{1}" for type "{0}" \
-	cannot be parsed as a number, though it starts with a digit.   
+	cannot be parsed as a number, though it starts with a digit.
 unexpected-cols: You have supplied columns for "{0}", but this mapping cannot \
 	have columns in this context.
 unexpected-index: "{0}" is marked as indexed, but OpenJPA does not support \
@@ -58,7 +56,7 @@
 	in the default fetch group.  You can only order on fields that will be \
 	selected when the related object is loaded.
 order-conflict: Field "{0}" declares both a synthetic ordering column and \
-	order-by values.  You cannot use both.  
+	order-by values.  You cannot use both.
 order-no-col-name: No order column name was given for "{0}".
 order-bad-col-name: "{0}" declares order column "{1}", but this column does \
 	not exist in table "{2}".
@@ -378,24 +376,14 @@
 custom-unused-props: The following customizer properties were not used in \
 	the reverse mapping process: {0}.
 reverse-type: Overriding type mapping for column of type name "{0}" to Java \
-	class "{1}". 
+	class "{1}".
 no-reverse-type: No overridden type mapping for column of type name "{0}".
 no-query-res: There is no query result mapping for "{0}" with name "{1}".
 null-path: Attempt to add a null or empty path to result type "{1}" in mapping \
-	"{0}". 
+	"{0}".
 bad-path: Result path "{2}" in result type "{1}" of mapping "{0}" contains \
 	invalid fields.
 untraversable-path: Result path "{2}" in result type "{1}" of mapping "{0}" \
 	attempts to traverse through a non-relation field.
 num-cols-path: Result path "{2}" in result type "{1}" of mapping "{0}" \
 	attempts to map a field that does not have exactly 1 column.
-lock-group-requires-perf-pack: Field "{0}" declares the lock-group extension. \
-	In order to use custom lock groups, you must have a performance pack or \
-	enterprise edition license. Contact sales@bea.com for details on \
-	upgrading your license.
-sub-lock-groups: Type "{0}" has a mapped superclass, and therefore cannot \
-	declare additional lock groups.  Use the "lock-groups" extension on the \
-	mapped superclass to declare any additional lock groups needed by this \
-	type.  {1}
-vers-mult-lock-groups: Type "{0}" cannot use a version field because it has \
-	multiple lock groups.

Modified: incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/strats/localizer.properties
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/strats/localizer.properties?view=diff&rev=443113&r1=443112&r2=443113
==============================================================================
--- incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/strats/localizer.properties (original)
+++ incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/strats/localizer.properties Wed Sep 13 13:35:08 2006
@@ -13,7 +13,7 @@
 cant-load: "{0}" is not a valid mapping. The related type has subclasses that \
 	are not reachable via joins, so OpenJPA must be able to construct an oid \
 	from the mapped foreign key.  But your foreign key does not represent all \
-	primary key values of the related type. 
+	primary key values of the related type.
 flush-virtual: Attempt to flush an unmapped object of type "{0}" with oid "{1}".
 cant-project-owned: "{0}" cannot be used in a projection, because it can only \
 	be loaded as part of its owning object.
@@ -45,7 +45,7 @@
 oid-not-joinable: Field "{0}" embedded within object id field "{1}" cannot be \
 	a primary key value.  Its mapping does not it to be a join target.
 flat-table: Type "{0}" uses a flat inheritance mapping, but declares a table \
-	name of "{1}", which does not match the superclass table "{2}".  
+	name of "{1}", which does not match the superclass table "{2}".
 not-string: Field "{0}" declares a string field mapping strategy, but is not \
 	a string field.
 not-primitive: Field "{0}" declares a primitive field mapping strategy, but \
@@ -58,7 +58,7 @@
 	not a char array field.
 not-serialized: Field "{0}" declares a blob mapping strategy, but the \
 	field''s value is not serialized.  Set the field''s "serialized" attribute \
-	to true.  
+	to true.
 not-relation: "{0}" declares a relation mapping strategy, but is not a \
 	direct, non-embedded relation to another persistence-capable object.
 not-elem-relation: "{0}" declares a to-many relation strategy, but its \
@@ -83,18 +83,16 @@
 	is mapped by another field.  Use an inverse key or join table mapping.
 not-mapped-by-key: Map field "{0}" is attempting to use an inverse key or join \
 	table mapping, but its key is not mapped by another field.  Use a map \
-	table mapping. 
+	table mapping.
 no-handler: Field "{0}" declares a handler-based mapping strategy, but no \
 	value handler is installed.
 auto-assign-handler: Attempt to use an auto-assigned column value in a handler \
 	with multiple columns.  To use an auto-assigned column value with field \
 	"{0}", you will have to write a custom field mapping that implements the \
 	org.apache.openjpa.jdbc.meta.Joinable interface.
-no-lock-groups: Type "{0}" does not have any fields that participate in \
-	optimistic locking.  Set its version strategy to "none".
 load-subs: Loading subclasses from discriminator column of "{0}".
 no-class-name: The discriminator column "{1}" for type "{1}" contains a null \
-	or empty value. 
+	or empty value.
 cant-init-subs: The discriminator for type "{0}" cannot compute the list of \
 	its subclasses on its own.  You should either use a discriminator strategy \
 	that has this ability (such as the class-name strategy), include the set \

Modified: incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties?view=diff&rev=443113&r1=443112&r2=443113
==============================================================================
--- incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties (original)
+++ incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties Wed Sep 13 13:35:08 2006
@@ -92,13 +92,13 @@
 	The tables used in this select are: "{0}".  You should either configure \
 	your application to avoid multi-table selects, use optimistic locking, \
 	or set the "SimulateLocking" DBDictionary property to allow non-locking \
-	selects within pessimistic transactions. 
+	selects within pessimistic transactions.
 informix-cant-lock: Informix cannot perform FOR UPDATE selects on multiple \
 	tables, or when it is a SELECT DISTINCT.  The tables used in this select \
 	are: "{0}".  You should either configure your application to avoid \
 	multi-table/distinct selects, use optimistic locking, or set the \
 	"SimulateLocking" DBDictionary property to allow non-locking selects \
-	within pessimistic transactions. 
+	within pessimistic transactions.
 bad-param: The specified parameter of type "{0}" is not a valid query parameter.
 warn-generic: Your database configuration was not recognized as a supported \
 	OpenJPA database. The generic dictionary will be used, which may result in \
@@ -113,7 +113,7 @@
 	("{2}") that was not found.
 dd-lock-bug: This version of the DataDirect JDBC driver has a bug that \
 	prevents SELECT FOR UPDATE statements from working.  Please \
-	use version 3.2 or higher of the driver.	
+	use version 3.2 or higher of the driver.
 storage-restriction: The database "{0}" has restrictions that prevent it \
 	from being able to store the value "{1}" of type "{2}". The value \
 	will be rounded to "{3}" for storage.
@@ -135,9 +135,8 @@
 	substring function.
 null-result-provider: supplied array of result object providers is null
 empty-result-provider: supplied array of result object providers is empty
-null-shared-result-set: supplied result set is null  
-illegal-method: {0}.{1}() is illegal to be invoked 
+null-shared-result-set: supplied result set is null
+illegal-method: {0}.{1}() is illegal to be invoked
 column-not-mapped: SQLResultSetMapping "{0}" does not map the columns "{1}" \
 	that are selected by the SQL query\r\n "{2}"
-batch-license: Your license does not have SQL batching capabilities.
 dictionary-configuration: DBDictionary configuration: \n{0}

Modified: incubator/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_trans.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_trans.xml?view=diff&rev=443113&r1=443112&r2=443113
==============================================================================
--- incubator/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_trans.xml (original)
+++ incubator/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_trans.xml Wed Sep 13 13:35:08 2006
@@ -280,11 +280,10 @@
 OpenJPA uses optimistic semantics by default, but supports both optimistic and
 datastore transactions. OpenJPA also offers advanced locking and versioning APIs
 for fine-grained control over database resource allocation and object
-versioning. See <xref linkend="ref_guide_locking"/> and
-<xref linkend="ref_guide_lock_groups"/> of the Reference Guide for details
+versioning. See <xref linkend="ref_guide_locking"/> of the Reference Guide for details
 on locking. <xref linkend="jpa_overview_meta_version"/>
 of this document covers standard object versioning, while
-<xref linkend="ref_guide_mapping_jpa"/> of the Reference Guide discusses 
+<xref linkend="ref_guide_mapping_jpa"/> of the Reference Guide discusses
 additional versioning strategies available in OpenJPA.
             </para>
         </note>
@@ -305,7 +304,7 @@
             <imageobject>
                 <!-- PNG image data, 193 x 157 (see README) -->
                 <imagedata fileref="img/jpa-transaction.png" width="129px"/>
-                
+
             </imageobject>
         </mediaobject>
         <para>

Modified: incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_mapping.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_mapping.xml?view=diff&rev=443113&r1=443112&r2=443113
==============================================================================
--- incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_mapping.xml (original)
+++ incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_mapping.xml Wed Sep 13 13:35:08 2006
@@ -314,7 +314,7 @@
             </example>
             <example id="ref_guid_mapping_ddl_part_ddl">
                 <title>
-                    Create DDL to Update Database for Current 
+                    Create DDL to Update Database for Current
         Mappings
                 </title>
                 <para>
@@ -879,7 +879,7 @@
             </see>
         </indexterm>
         <para>
-In the <emphasis>meet-in-the-middle</emphasis>  
+In the <emphasis>meet-in-the-middle</emphasis>
 mapping approach, you control both the relational model and the object model. It
 is up to you to define the mappings between these models.  The mapping
 tool's <literal>validate</literal> action is useful to meet-in-the-middle
@@ -1126,10 +1126,7 @@
                     </listitem>
                     <listitem>
                         <para>
-<literal>VersionColumnName</literal>: The default name of version columns. If
-you use custom lock groups, this name may be combined with lock group names. See
-<xref linkend="ref_guide_lock_groups"/> for more information on lock
-groups.
+<literal>VersionColumnName</literal>: The default name of version columns.
                         </para>
                     </listitem>
                     <listitem>
@@ -1200,8 +1197,8 @@
                 Configuring Mapping Defaults
             </title>
 <programlisting>
-&lt;property name="openjpa.jdbc.MappingDefaults" 
-    value="ForeignKeyDeleteAction=restrict, 
+&lt;property name="openjpa.jdbc.MappingDefaults"
+    value="ForeignKeyDeleteAction=restrict,
     FieldStrategies='org.mag.data.InfoStruct=org.mag.mapping.InfoStructHandler'"/&gt;
 </programlisting>
         </example>
@@ -1357,7 +1354,7 @@
             <imageobject>
                 <!-- PNG image data, 427 x 211 (see README) -->
                 <imagedata fileref="img/joins-constant.png" width="285px"/>
-                
+
             </imageobject>
         </mediaobject>
         <para>
@@ -1369,7 +1366,7 @@
 <literal>T2.PK2</literal> has the value <literal>a</literal>. Here is how we'd
 accomplish this in mapping metadata.
         </para>
-<programlisting> 
+<programlisting>
 @Entity
 @Table(name="T1")
 public class ...
@@ -1389,7 +1386,7 @@
 need single quotes for numeric constants. For example, the syntax to join
 <literal>T1.R2</literal> to <literal>T2.R4</literal> is:
         </para>
-<programlisting> 
+<programlisting>
 @Entity
 @Table(name="T1")
 public class ...
@@ -1405,7 +1402,7 @@
         <para>
 Finally, from the inverse direction, these joins would look like this:
         </para>
-<programlisting> 
+<programlisting>
 @Entity
 @Table(name="T2")
 public class ...
@@ -1579,9 +1576,7 @@
 You map the surrogate version column with the
 <ulink url="../apidocs/org/apache/openjpa/persistence/jdbc/VersionColumn.html">
 <classname>org.apache.openjpa.persistence.jdbc.VersionColumn</classname></ulink>
-annotation. If you take advantage of OpenJPA's ability to define multiple
-<link linkend="ref_guide_lock_groups">lock groups</link>, you may have multiple
-version columns. In that case, use the
+annotation. You can also use the
 <ulink url="../apidocs/org/apache/openjpa/persistence/jdbc/VersionColumns.html">
 <classname>org.apache.openjpa.persistence.jdbc.VersionColumns</classname>
 </ulink> annotation to declare an array of <classname>VersionColumn</classname>
@@ -1595,11 +1590,6 @@
                 </listitem>
                 <listitem>
                     <para>
-<literal>String lockGroup</literal>
-                    </para>
-                </listitem>
-                <listitem>
-                    <para>
 <literal>int length</literal>
                     </para>
                 </listitem>
@@ -1635,10 +1625,7 @@
                 </listitem>
             </itemizedlist>
             <para>
-The <literal>lockGroup</literal> property allows you to specify that a version
-column is for some lock group other than the default group. See
-<xref linkend="ref_guide_lock_groups"/> for an example. All other
-properties correspond exactly to the same-named properties on the standard
+All properties correspond exactly to the same-named properties on the standard
 <classname>Column</classname> annotation, described in
 <xref linkend="jpa_overview_mapping_column"/>.
             </para>
@@ -2121,7 +2108,7 @@
                 <imageobject>
                     <!-- PNG image data, 392 x 192 (see README) -->
                     <imagedata fileref="img/inv-key-coll.png" width="261"/>
-                    
+
                 </imageobject>
             </mediaobject>
             <para>
@@ -2404,7 +2391,7 @@
                     <imageobject>
                         <!-- PNG image data, 410 x 266 (see README) -->
                         <imagedata fileref="img/string-rel-map.png" width="273px"/>
-                        
+
                     </imageobject>
                 </mediaobject>
             </section>

Modified: incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_meta.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_meta.xml?view=diff&rev=443113&r1=443112&r2=443113
==============================================================================
--- incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_meta.xml (original)
+++ incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_meta.xml Wed Sep 13 13:35:08 2006
@@ -555,19 +555,6 @@
 must be of type <classname>Object</classname>.
                 </para>
             </section>
-            <section id="lock-groups">
-                <title>
-                    Lock Groups
-                </title>
-                <para>
-OpenJPA requires you to pre-declare subclass lock groups in the least-derived
-mapped class. <phrase> The JPA
-<ulink url="../apidocs/org/apache/openjpa/persistence/LockGroups.html">
-<classname>org.apache.openjpa.persistence.LockGroups</classname></ulink>
-annotation accepts an array of lock group names.</phrase> For details on lock
-groups, see <xref linkend="ref_guide_lock_groups_and_subclasses"/>.
-                </para>
-            </section>
         </section>
         <section id="ref_guide_meta_field">
             <title>
@@ -656,9 +643,9 @@
                 </indexterm>
                 <para>
 The <ulink url="../apidocs/org/apache/openjpa/persistence/LoadFetchGroup.html">
-<classname>org.apache.openjpa.persistence.LoadFetchGroup</classname></ulink> 
-annotation specifies a field's load fetch group. 
-<xref linkend="ref_guide_fetch"/> discusses OpenJPA's support for fetch groups 
+<classname>org.apache.openjpa.persistence.LoadFetchGroup</classname></ulink>
+annotation specifies a field's load fetch group.
+<xref linkend="ref_guide_fetch"/> discusses OpenJPA's support for fetch groups
 in general; see <xref linkend="ref_guide_fetch_custom"/> for how to use this
 annotation in particular.
                 </para>
@@ -777,34 +764,6 @@
 extension in detail in <xref linkend="ref_guide_inverses"/>.
                 </para>
             </section>
-            <section id="lock-group">
-                <title>
-                    Lock Group
-                </title>
-                <indexterm zone="lock-group">
-                    <primary>
-                        metadata
-                    </primary>
-                    <secondary>
-                        extensions
-                    </secondary>
-                    <tertiary>
-                        lock group
-                    </tertiary>
-                    <seealso>
-                        locking
-                    </seealso>
-                </indexterm>
-                <para>
-Lock groups allow for fine-grained optimistic locking concurrency. Use <phrase>
-OpenJPA's <ulink url="../apidocs/org/apache/openjpa/persistence/LockGroup.html">
-<classname>org.apache.openjpa.persistence.LockGroup</classname></ulink>
-annotation</phrase> to name the lock group for a field. You can exclude a field
-from optimistic locking with a value of <literal>none</literal>. We discuss
-lock groups and this extension further in <xref linkend="ref_guide_lock_groups"/>
-.
-                </para>
-            </section>
             <section id="read-only">
                 <title>
                     Read-Only
@@ -1056,7 +1015,6 @@
 {
     @ManyToMany
     @LRS
-    @LockGroup(LockGroup.NONE)
     private Collection&lt;Subscriber&gt; subscribers;
 
     @ExternalValues({"true=1", "false=2"})

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=443113&r1=443112&r2=443113
==============================================================================
--- 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 Wed Sep 13 13:35:08 2006
@@ -114,7 +114,7 @@
             <imageobject>
                 <!-- PNG image data, 509 x 133 (see README) -->
                 <imagedata fileref="img/enhancement.png" width="339px"/>
-                
+
             </imageobject>
         </mediaobject>
         <para>
@@ -722,7 +722,7 @@
 {
     @OneToOne
     private Photograph coverPhoto;
-    
+
     ...
 }
 
@@ -732,7 +732,7 @@
     @OneToOne
     @InverseLogical("coverPhoto")
     private Magazine mag;
-    
+
     ...
 }
 </programlisting>
@@ -1099,8 +1099,8 @@
 @Entity
 public class Company
 {
-    @ManyToMany 
-    @LRS private Collection&lt;Employee&gt; employees;     
+    @ManyToMany
+    @LRS private Collection&lt;Employee&gt; employees;
 
     ...
 }
@@ -1230,9 +1230,9 @@
                 </title>
                 <tgroup cols="2" align="left" colsep="1" rowsep="1">
                     <colspec colname="method"/>
-                    
+
                     <colspec colname="extension"/>
-                    
+
                     <thead>
                         <row>
                             <entry colname="method">
@@ -1247,64 +1247,64 @@
                         <row>
                             <entry colname="method">
                                 <literal>
-                                    
+
               public String CustomType.toString()
-              
+
                                 </literal>
                             </entry>
                             <entry colname="extension">
                                 <literal>
-                                    
+
               @Externalizer("toString")
-              
+
                                 </literal>
                             </entry>
                         </row>
                         <row>
                             <entry colname="method">
                                 <literal>
-                                    
+
               public String CustomType.toString(StoreContext ctx)
-              
+
                                 </literal>
                             </entry>
                             <entry colname="extension">
                                 <literal>
-                                    
+
               @Externalizer("toString")
-              
+
                                 </literal>
                             </entry>
                         </row>
                         <row>
                             <entry colname="method">
                                 <literal>
-                                    
+
               public static String AnyClass.toString(CustomType ct)
-              
+
                                 </literal>
                             </entry>
                             <entry colname="extension">
                                 <literal>
-                                    
+
               @Externalizer("AnyClass.toString")
-              
+
                                 </literal>
                             </entry>
                         </row>
                         <row>
                             <entry colname="method">
                                 <literal>
-                                    
+
               public static String AnyClass.toString(CustomType ct, StoreContext ctx)
-              
+
                                 </literal>
                             </entry>
                             <entry colname="extension">
                                 <literal>
-                                    
+
               @Externalizer("AnyClass.toString")
-              
+
                                 </literal>
                             </entry>
                         </row>
@@ -1336,9 +1336,9 @@
                 </title>
                 <tgroup cols="2" align="left" colsep="1" rowsep="1">
                     <colspec colname="method"/>
-                    
+
                     <colspec colname="extension"/>
-                    
+
                     <thead>
                         <row>
                             <entry colname="method">
@@ -1353,78 +1353,78 @@
                         <row>
                             <entry colname="method">
                                 <literal>
-                                    
+
               public CustomType(String str)
-              
+
                                 </literal>
                             </entry>
                             <entry colname="extension">
-                                
+
               none
-              
+
                             </entry>
                         </row>
                         <row>
                             <entry colname="method">
                                 <literal>
-                                    
+
               public static CustomType CustomType.fromString(String str)
-              
+
                                 </literal>
                             </entry>
                             <entry colname="extension">
                                 <literal>
-                                    
+
               @Factory("fromString")
-              
+
                                 </literal>
                             </entry>
                         </row>
                         <row>
                             <entry colname="method">
                                 <literal>
-                                    
+
               public static CustomType CustomType.fromString(String str, StoreContext ctx)
-              
+
                                 </literal>
                             </entry>
                             <entry colname="extension">
                                 <literal>
-                                    
+
               @Factory("fromString")
-              
+
                                 </literal>
                             </entry>
                         </row>
                         <row>
                             <entry colname="method">
                                 <literal>
-                                    
+
               public static CustomType AnyClass.fromString(String str)
-              
+
                                 </literal>
                             </entry>
                             <entry colname="extension">
                                 <literal>
-                                    
+
               @Factory("AnyClass.fromString")
-              
+
                                 </literal>
                             </entry>
                         </row>
                         <row>
                             <entry colname="method">
                                 <literal>
-                                    
+
               public static CustomType AnyClass.fromString(String str, StoreContext ctx)
-              
+
                                 </literal>
                             </entry>
                             <entry colname="extension">
                                 <literal>
-                                    
+
               @Factory("AnyClass.fromString")
-              
+
                                 </literal>
                             </entry>
                         </row>
@@ -1482,19 +1482,19 @@
 {
     // use Class.getName and Class.forName to go to/from strings
     @Persistent
-    @Externalizer("getName") 
+    @Externalizer("getName")
     @Factory("forName")
     private Class cls;
 
-    // use URL.getExternalForm for externalization. no factory; 
+    // use URL.getExternalForm for externalization. no factory;
     // we can rely on the URL string constructor
     @Persistent
     @Externalizer("toExternalForm")
     private URL url;
 
-    // use our custom methods; notice how we use the KeyType and ElementType 
+    // use our custom methods; notice how we use the KeyType and ElementType
     // annotations to specify the metadata for our externalized map
-    @Persistent 
+    @Persistent
     @Externalizer("Magazine.mapFromCustomType")
     @Factory("Magazine.mapToCustomType")
     @KeyType(String.class) @ElementType(String.class)
@@ -1693,7 +1693,7 @@
                 </listitem>
                 <listitem>
                     <para>
-<literal>String[] fetchGroups</literal>: Other fetch groups whose fields to 
+<literal>String[] fetchGroups</literal>: Other fetch groups whose fields to
 include in this group.
                     </para>
                 </listitem>
@@ -1715,15 +1715,15 @@
                 </listitem>
                 <listitem>
                     <para>
-<literal>recursionDepth</literal>: If the attribute represents a relation, the 
+<literal>recursionDepth</literal>: If the attribute represents a relation, the
 maximum number of same-typed relations to eager-fetch from this field.  Defaults
-to 1.  For example, consider an <classname>Employee</classname> class with a 
+to 1.  For example, consider an <classname>Employee</classname> class with a
 <literal>manager</literal> field, also of type <classname>Employee</classname>.
 When we load an <classname>Employee</classname> and the <literal>
 manager</literal> field is in an active fetch group, the recursion depth (along
-with the max fetch depth setting, described below) determines whether we only 
-retrieve the target <classname>Employee</classname> and his manager (depth 1), 
-or whether we also retrieve the manager's manager (depth 2), or the manager's 
+with the max fetch depth setting, described below) determines whether we only
+retrieve the target <classname>Employee</classname> and his manager (depth 1),
+or whether we also retrieve the manager's manager (depth 2), or the manager's
 manager's manager (depth 3), etc.  Use -1 for unlimited depth.
                     </para>
                 </listitem>
@@ -1755,14 +1755,14 @@
             </example>
             <para>
 A field can be a member of any number of fetch groups.  A field can also
-declare a <emphasis>load fetch group</emphasis>.  
+declare a <emphasis>load fetch group</emphasis>.
 When you access a lazy-loaded field for the first time, OpenJPA makes a
 datastore trip to fetch that field's data.  Sometimes, however, you know
 that whenever you access a lazy field A, you're likely to access lazy fields B
 and C as well.  Therefore, it would be more efficient to fetch the data for A,
-B, and C in the same datastore trip.  By setting A's load fetch group to the 
-name of a <link linkend="ref_guide_fetch">fetch group</link> containing B and 
-C, you can tell OpenJPA to load all of these fields together when A is first 
+B, and C in the same datastore trip.  By setting A's load fetch group to the
+name of a <link linkend="ref_guide_fetch">fetch group</link> containing B and
+C, you can tell OpenJPA to load all of these fields together when A is first
 accessed.
             </para>
             <para>
@@ -1828,15 +1828,15 @@
             <para>
 You can also set the system's default maximum fetch depth with the
 <link linkend="openjpa.MaxFetchDepth"><literal>openjpa.MaxFetchDepth</literal>
-</link> configuration property.  The maximum fetch depth determines how "deep" 
+</link> configuration property.  The maximum fetch depth determines how "deep"
 into the object graph to traverse when loading an instance.  The default maximum
-depth is 1, meaning that OpenJPA will load at most the target instance and its 
-immediate relations.  By increasing the depth, you can allow OpenJPA to also 
+depth is 1, meaning that OpenJPA will load at most the target instance and its
+immediate relations.  By increasing the depth, you can allow OpenJPA to also
 load relations of relations, to arbitrary depth.  A value of -1 symbolizes an
 infinite maximum, telling OpenJPA to fetch configured relations until it reaches
-the edges of the object graph.  Of course, which relation fields are loaded 
+the edges of the object graph.  Of course, which relation fields are loaded
 depends on whether the fields are eager or lazy, and on the active fetch groups.
-A fetch group member's recursion depth may also limit the fetch depth to 
+A fetch group member's recursion depth may also limit the fetch depth to
 something less than the configured maximum.
             </para>
             <para>
@@ -1846,10 +1846,10 @@
 <ulink url="../../api/openjpa/persistence/FetchPlan.html"><classname>
 org.apache.openjpa.persistence.FetchPlan</classname></ulink> object. The
 <classname>FetchPlan</classname> maintains the set of active fetch groups and
-the maximum fetch depth. It begins with the groups and depth defined in the 
+the maximum fetch depth. It begins with the groups and depth defined in the
 <literal>openjpa.FetchGroups</literal> and <literal>openjpa.MaxFetchDepth
 </literal> properties, but allows you to add or remove groups and change the
-maximum fetch depth for an individual <classname>EntityManager</classname> or 
+maximum fetch depth for an individual <classname>EntityManager</classname> or
 <classname>Query</classname> through the methods below.
             </para>
 <programlisting>
@@ -1860,7 +1860,7 @@
 public FetchPlan removeFetchGroups (String... groups);
 public FetchPlan removeFetchGroups (Collection groups);
 public FetchPlan resetFetchGroups ();
-public Collection&lt;String&gt; getFetchGroups (); 
+public Collection&lt;String&gt; getFetchGroups ();
 public void clearFetchGroups ();
 public FetchPlan setMaxFetchDepth(int depth);
 public int getMaxFetchDepth();
@@ -1918,7 +1918,7 @@
 public FetchPlan removeFields (Class cls, String... fields);
 public FetchPlan removeFields (Collection fields);
 public FetchPlan removeFields (Class cls, Collection fields);
-public Collection&lt;String&gt; getFields (); 
+public Collection&lt;String&gt; getFields ();
 public void clearFields ();
 </programlisting>
             <para>
@@ -2348,271 +2348,6 @@
                     </para>
                 </listitem>
             </itemizedlist>
-        </section>
-    </section>
-    <section id="ref_guide_lock_groups">
-        <title>
-            Lock Groups
-        </title>
-        <indexterm zone="ref_guide_lock_groups">
-            <primary>
-                locking
-            </primary>
-            <secondary>
-                lock groups
-            </secondary>
-        </indexterm>
-        <indexterm zone="ref_guide_lock_groups">
-            <primary>
-                lock groups
-            </primary>
-            <seealso>
-                locking
-            </seealso>
-        </indexterm>
-        <para>
-OpenJPA supports both optimistic and datastore locking strategies, but
-optimistic locking is the preferred approach in most applications. Typically,
-optimistic locking is performed at the object level of granularity. That is,
-changes to any part of the same object in concurrent transactions will result in
-an optimistic locking exception being thrown by the transaction that commits
-last. In many applications, this is acceptable. However, if your application has
-a high likelihood of concurrent writes to different parts of the same object,
-then it may be advantageous to use a finer-grained optimistic lock.
-Additionally, certain parts of an object model may be best modeled without any
-locking at all, or with a last-commit-wins strategy. It is for these types of
-situations that OpenJPA offers customizable optimistic lock groups, which allow
-you to achieve sub-object-level locking granularity.
-        </para>
-        <para>
-For example, an <classname>Employee</classname> class may have some fields
-configurable by the employee the object represents ( <literal> firstName
-</literal>, <literal>lastName</literal>, <literal> phoneNumber</literal> ), some
-that are only modifiable by that employee's manager ( <literal>salary</literal>
-, <literal>title</literal> ), and some in which concurrent updates are
-acceptable (a list of <literal> projects</literal> ). In such a model, you can
-greatly improve the success of concurrent updates in optimistic transactions by
-putting <literal>firstName</literal>, <literal>lastName</literal>, and <literal>
-phoneNumber</literal> into one lock group, <literal>salary</literal> and
-<literal>title</literal> into another, and excluding the <literal>projects
-</literal> field from optimistic lock checks altogether.
-        </para>
-        <para>
-<phrase> You specify a field's lock group in JPA metadata with the
-<ulink url="../apidocs/org/apache/openjpa/persistence/LockGroup.html">
-<classname>org.apache.openjpa.persistence.LockGroup</classname></ulink>
-annotation.</phrase> See <xref linkend="lock-group"/> for details on lock
-group metadata.
-        </para>
-        <example id="ref_guide_lock_groups_metadata">
-            <title>
-                Lock Group Metadata
-            </title>
-<programlisting>
-import org.apache.openjpa.persistence.*;
-
-@Entity
-public class Employee
-{
-    // default lock group
-    private String firstName;
-    private String lastName;
-    private String phoneNumber;
-
-    // named lock group
-    @LockGroup("corporate") private float  salary;
-    @LockGroup("corporate") private String title;
-
-    // no lock group; allow concurrent modifications
-    @LockGroup(LockGroup.NONE) private Set&lt;Project&gt; projects;
-
-    ...
-}
-</programlisting>
-        </example>
-        <para>
-Currently, lock groups are only supported when using number and timestamp
-version strategies. They are not supported in the state-comparison strategy,
-though you can still exclude fields from participating in optimistic versioning
-under this strategy by setting the their lock group to <literal>none</literal>.
-        </para>
-        <section id="ref_guide_lock_groups_and_subclasses">
-            <title>
-                Lock Groups and Subclasses
-            </title>
-            <indexterm zone="ref_guide_lock_groups_and_subclasses">
-                <primary>
-                    lock groups
-                </primary>
-                <secondary>
-                    subclasses
-                </secondary>
-            </indexterm>
-            <para>
-Due to mapping restrictions, subclasses cannot simply declare additional lock
-groups implicitly, as is done in the example shown above. Instead, the
-least-derived mapped type in the persistent hierarchy must list all lock groups
-that its children can use via the <phrase>
-<ulink url="../apidocs/org/apache/openjpa/persistence/LockGroups.html">
-<classname> org.apache.openjpa.persistence.LockGroups</classname></ulink>
-annotation</phrase> For example, if the <classname>Employee</classname> class in
-the last example extended <classname>Person</classname>, the metadata would
-have looked like so:
-            </para>
-            <example id="ref_guide_lock_groups_and_subclasses_metadata">
-                <title>
-                    Lock Group Metadata
-                </title>
-                <!-- ### -->
-<programlisting>
-import org.apache.openjpa.persistence.*;
-
-@Entity
-@LockGroups({"corporate"})
-public class Person
-{
-    // default lock group
-    private String firstName;
-    private String lastName;
-    private String phoneNumber;
-
-    ...
-}
-
-@Entity
-public class Employee
-    extends Person
-{
-    // named lock group
-    @LockGroup("corporate") private float  salary;
-    @LockGroup("corporate") private String title;
-
-    // no lock group; allow concurrent modifications
-    @LockGroup(LockGroup.NONE) private Set&lt;Project&gt; projects;
-
-    ...
-}
-</programlisting>
-<programlisting>
-public class Person
-{
-    private String firstName;
-    private String lastName;
-    private String phoneNumber;
-
-    ...
-}
-
-
-public class Employee
-    extends Person
-{
-    // these fields can only be set by the employee's manager
-    private float  salary;
-    private String title;
-
-    // this field might be updated concurrently by the employee,
-    // other team members, or the employee's manager
-    private Set projects;
-
-    ...
-}
-
-
-&lt;?xml version="1.0"?&gt;
-&lt;jdo&gt;
-  &lt;package name=""&gt;
-    &lt;class name="Person"&gt;
-      &lt;!-- here we list the lock groups that will be used by Employee --&gt;
-      &lt;extension vendor-name="openjpa" key="lock-groups" value="corporate"/&gt;
-    &lt;/class&gt;
-    &lt;class name="Employee"&gt;
-      &lt;!-- named lock group --&gt;
-      &lt;field name="salary"&gt;
-        &lt;extension vendor-name="openjpa" key="lock-group" value="corporate"/&gt;
-      &lt;/field&gt;
-      &lt;field name="title"&gt;
-        &lt;extension vendor-name="openjpa" key="lock-group" value="corporate"/&gt;
-      &lt;/field&gt;
-      &lt;!-- no lock group; allow concurrent modifications --&gt;
-      &lt;field name="projects"&gt;
-        &lt;collection element-type="Project"/&gt;
-        &lt;extension vendor-name="openjpa" key="lock-group" value="none"/&gt;
-      &lt;/field&gt;
-    &lt;/class&gt;
-  &lt;/package&gt;
-&lt;/jdo&gt;
-</programlisting>
-            </example>
-            <para>
-The exceptions to this rule are the <literal>none</literal> and <literal>
-default</literal> built-in lock groups. They can be used at any point in the
-inheritance hierarchy without pre-declaration. Additionally, the lock groups
-listing can contain lock groups that would otherwise be implicitly defined in
-the least-derived type metadata.
-            </para>
-        </section>
-        <section id="ref_guide_lock_group_mapping">
-            <title>
-                Lock Group Mapping
-            </title>
-            <indexterm zone="ref_guide_lock_group_mapping">
-                <primary>
-                    lock groups
-                </primary>
-                <secondary>
-                    mapping metadata
-                </secondary>
-            </indexterm>
-            <indexterm zone="ref_guide_lock_group_mapping">
-                <primary>
-                    mapping metadata
-                </primary>
-                <secondary>
-                    version
-                </secondary>
-                <tertiary>
-                    lock group mapping
-                </tertiary>
-                <seealso>
-                    lock groups
-                </seealso>
-            </indexterm>
-            <para>
-When using custom lock groups with a relational database, OpenJPA will need a
-version column for each of the groups, instead of just one version column. This
-means that you must use surrogate versioning; you cannot use a version field.
-OpenJPA also currently requires that all the version columns for a given object
-be in the same table. Finally, it is only possible to use a single version
-strategy for a given object. That is, you cannot have one version number column
-and another timestamp version column.
-            </para>
-            <para>
-<phrase> Use the
-<ulink url="../apidocs/org/apache/openjpa/persistence/jdbc/VersionColumn.html">
-<classname>org.apache.openjpa.persistence.jdbc.VersionColumn(s)</classname>
-</ulink> annotation to specify the version column for each lock group in JPA
-mapping.</phrase>
-            </para>
-            <example id="ref_guide_lock_groups_mapping_ex">
-                <title>
-                    Mapping Lock Groups
-                </title>
-<programlisting>
-import org.apache.openjpa.persistence.jdbc.*;
-
-@Entity
-@Table(name="EMP")
-@VersionColumns({
-    @VersionColumn(name="VERS_CORP" lockGroup="corporate"),
-    @VersionColumn(name="VERS")
-})
-public class Employee
-{
-    ...
-}
-</programlisting>
-            </example>
         </section>
     </section>
 </chapter>



Mime
View raw message