You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by aw...@apache.org on 2006/10/03 00:22:21 UTC

svn commit: r452243 [2/6] - in /incubator/openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/ openjpa-kernel/src/main/java/org/apache/openjpa/kernel/ openjpa-kernel/src/ma...

Modified: incubator/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_mapping.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_mapping.xml?view=diff&rev=452243&r1=452242&r2=452243
==============================================================================
--- incubator/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_mapping.xml (original)
+++ incubator/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_mapping.xml Mon Oct  2 15:22:18 2006
@@ -192,20 +192,17 @@
 @Entity
 @IdClass(Magazine.MagazineId.class)
 @Table(name="MAG")
-public class Magazine
-{
+public class Magazine {
     ...
 
-    public static class MagazineId
-    {
+    public static class MagazineId {
         ...
     }
 }
 
 @Entity
 @Table(name="ART")
-public class Article
-{
+public class Article {
     ...
 }
 
@@ -214,21 +211,18 @@
 
 @Entity
 @Table(name="COMP")
-public class Company
-{
+public class Company {
     ...
 }
 
 @Entity
 @Table(name="AUTH")
-public class Author
-{
+public class Author {
     ...
 }
 
 @Embeddable
-public class Address
-{
+public class Address {
     ...
 }
 
@@ -236,45 +230,39 @@
 package org.mag.subscribe;
 
 @MappedSuperclass
-public abstract class Document
-{
+public abstract class Document {
     ...
 }
 
 @Entity
 @Table(schema="CNTRCT")
 public class Contract
-    extends Document
-{
+    extends Document {
     ...
 }
 
 @Entity
 @Table(name="SUB", schema="CNTRCT")
-public class Subscription
-{
+public class Subscription {
     ...
 
     @Entity
     @Table(name="LINE_ITEM", schema="CNTRCT")
     public static class LineItem
-        extends Contract
-    {
+        extends Contract {
         ...
     }
 }
 
 @Entity(name="Lifetime")
 public class LifetimeSubscription
-    extends Subscription
-{
+    extends Subscription {
     ...
 }
 
 @Entity(name="Trial")
 public class TrialSubscription
-    extends Subscription
-{
+    extends Subscription {
     ...
 }
 </programlisting>
@@ -396,8 +384,7 @@
 <programlisting>
 @Entity
 @Table(name="ART", uniqueConstraints=@Unique(columnNames="TITLE"))
-public class Article
-{
+public class Article {
     ...
 }
 </programlisting>
@@ -721,24 +708,23 @@
 @Entity
 @IdClass(Magazine.MagazineId.class)
 @Table(name="MAG")
-public class Magazine
-{
+public class Magazine {
+
     @Column(length=9)
     @Id private String isbn;
     @Id private String title;
 
     ...
 
-    public static class MagazineId
-    {
+    public static class MagazineId {
         ...
     }
 }
 
 @Entity
 @Table(name="ART", uniqueConstraints=@Unique(columnNames="TITLE"))
-public class Article
-{
+public class Article {
+
     @Id private long id;
 
     ...
@@ -749,8 +735,8 @@
 
 @Entity
 @Table(name="COMP")
-public class Company
-{
+public class Company {
+
     @Column(name="CID")
     @Id private long id;
 
@@ -759,8 +745,8 @@
 
 @Entity
 @Table(name="AUTH")
-public class Author
-{
+public class Author {
+
     @Column(name="AID", columnDefinition="INTEGER64")
     @Id private long id;
 
@@ -768,8 +754,7 @@
 }
 
 @Embeddable
-public class Address
-{
+public class Address {
     ...
 }
 
@@ -777,8 +762,8 @@
 package org.mag.subscribe;
 
 @MappedSuperclass
-public abstract class Document
-{
+public abstract class Document {
+
     @Id
     @GeneratedValue(strategy=GenerationType.IDENTITY)
     private long id;
@@ -789,15 +774,14 @@
 @Entity
 @Table(schema="CNTRCT")
 public class Contract
-    extends Document
-{
+    extends Document {
     ...
 }
 
 @Entity
 @Table(name="SUB", schema="CNTRCT")
-public class Subscription
-{
+public class Subscription {
+
     @Id private long id;
 
     ...
@@ -805,23 +789,20 @@
     @Entity
     @Table(name="LINE_ITEM", schema="CNTRCT")
     public static class LineItem
-        extends Contract
-    {
+        extends Contract {
         ...
     }
 }
 
 @Entity(name="Lifetime")
 public class LifetimeSubscription
-    extends Subscription
-{
+    extends Subscription {
     ...
 }
 
 @Entity(name="Trial")
 public class TrialSubscription
-    extends Subscription
-{
+    extends Subscription {
     ...
 }
 </programlisting>
@@ -1253,16 +1234,15 @@
 @Entity
 @IdClass(Magazine.MagazineId.class)
 @Table(name="MAG")
-public class Magazine
-{
+public class Magazine {
+
     @Column(length=9)
     @Id private String isbn;
     @Id private String title;
 
     ...
 
-    public static class MagazineId
-    {
+    public static class MagazineId {
         ...
     }
 }
@@ -1270,8 +1250,8 @@
 @Entity
 @Table(name="ART", uniqueConstraints=@Unique(columnNames="TITLE"))
 @SequenceGenerator(name="ArticleSeq", sequenceName="ART_SEQ")
-public class Article
-{
+public class Article {
+
     @Id
     @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="ArticleSeq") 
     private long id;
@@ -1284,8 +1264,8 @@
 
 @Entity
 @Table(name="COMP")
-public class Company
-{
+public class Company {
+
     @Column(name="CID")
     @Id private long id;
 
@@ -1294,8 +1274,8 @@
 
 @Entity
 @Table(name="AUTH")
-public class Author
-{
+public class Author {
+
     @Id
     @GeneratedValue(strategy=GenerationType.TABLE, generator="AuthorGen")
     @TableGenerator(name="AuthorGen", table="AUTH_GEN", pkColumnName="PK",
@@ -1307,8 +1287,7 @@
 }
 
 @Embeddable
-public class Address
-{
+public class Address {
     ...
 }
 
@@ -1316,8 +1295,8 @@
 package org.mag.subscribe;
 
 @MappedSuperclass
-public abstract class Document
-{
+public abstract class Document {
+
     @Id
     @GeneratedValue(generate=GenerationType.IDENTITY)
     private long id;
@@ -1328,15 +1307,15 @@
 @Entity
 @Table(schema="CNTRCT")
 public class Contract
-    extends Document
-{
+    extends Document {
+
     ...
 }
 
 @Entity
 @Table(name="SUB", schema="CNTRCT")
-public class Subscription
-{
+public class Subscription {
+
     @Id
     @GeneratedValue(strategy=GenerationType.IDENTITY)
     private long id;
@@ -1346,23 +1325,20 @@
     @Entity
     @Table(name="LINE_ITEM", schema="CNTRCT")
     public static class LineItem
-        extends Contract
-    {
+        extends Contract {
         ...
     }
 }
 
 @Entity(name="Lifetime")
 public class LifetimeSubscription
-    extends Subscription
-{
+    extends Subscription {
     ...
 }
 
 @Entity(name="Trial")
 public class TrialSubscription
-    extends Subscription
-{
+    extends Subscription {
     ...
 }
 </programlisting>
@@ -1545,15 +1521,13 @@
 @Entity
 @Table(name="SUB", schema="CNTRCT")
 @Inheritance(strategy=InheritanceType.SINGLE_TABLE)
-public class Subscription
-{
+public class Subscription {
     ...
 }
 
 @Entity(name="Lifetime")
 public class LifetimeSubscription
-    extends Subscription
-{
+    extends Subscription {
     ...
 }
 </programlisting>
@@ -1774,21 +1748,18 @@
 @Table(schema="CNTRCT")
 @Inheritance(strategy=InheritanceType.JOINED)
 public class Contract
-    extends Document
-{
+    extends Document {
     ...
 }
 
-public class Subscription
-{
+public class Subscription {
     ...
 
     @Entity
     @Table(name="LINE_ITEM", schema="CNTRCT")
     @PrimaryKeyJoinColumn(name="ID", referencedColumnName="ID")
     public static class LineItem
-        extends Contract
-    {
+        extends Contract {
         ...
     }
 }
@@ -1823,8 +1794,7 @@
     @PrimaryKeyJoinColumn(name="ID", referencedColumnName="ID")
 })
 public static class LineItem
-    extends Contract
-{
+    extends Contract {
     ...
 }
 </programlisting>
@@ -1977,16 +1947,14 @@
 @Entity
 @Table(name="MAG")
 @Inheritance(strategy=InheritanceType.TABLE_PER_CLASS)
-public class Magazine
-{
+public class Magazine {
     ...
 }
 
 @Entity
 @Table(name="TABLOID")
 public class Tabloid
-    extends Magazine
-{
+    extends Magazine {
     ...
 }
 </programlisting>
@@ -2088,16 +2056,15 @@
 @Entity
 @IdClass(Magazine.MagazineId.class)
 @Table(name="MAG")
-public class Magazine
-{
+public class Magazine {
+
     @Column(length=9)
     @Id private String isbn;
     @Id private String title;
 
     ...
 
-    public static class MagazineId
-    {
+    public static class MagazineId {
         ...
     }
 }
@@ -2105,8 +2072,8 @@
 @Entity
 @Table(name="ART", uniqueConstraints=@Unique(columnNames="TITLE"))
 @SequenceGenerator(name="ArticleSeq", sequenceName="ART_SEQ")
-public class Article
-{
+public class Article {
+
     @Id
     @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="ArticleSeq") 
     private long id;
@@ -2119,8 +2086,8 @@
 
 @Entity
 @Table(name="COMP")
-public class Company
-{
+public class Company {
+
     @Column(name="CID")
     @Id private long id;
 
@@ -2129,8 +2096,8 @@
 
 @Entity
 @Table(name="AUTH")
-public class Author
-{
+public class Author {
+
     @Id
     @GeneratedValue(strategy=GenerationType.TABLE, generator="AuthorGen")
     @TableGenerator(name="AuthorGen", table="AUTH_GEN", pkColumnName="PK",
@@ -2142,8 +2109,7 @@
 }
 
 @Embeddable
-public class Address
-{
+public class Address {
     ...
 }
 
@@ -2151,8 +2117,8 @@
 package org.mag.subscribe;
 
 @MappedSuperclass
-public abstract class Document
-{
+public abstract class Document {
+
     @Id
     @GeneratedValue(strategy=GenerationType.IDENTITY)
     private long id;
@@ -2164,16 +2130,15 @@
 @Table(schema="CNTRCT")
 @Inheritance(strategy=InheritanceType.JOINED)
 public class Contract
-    extends Document
-{
+    extends Document {
     ...
 }
 
 @Entity
 @Table(name="SUB", schema="CNTRCT")
 @Inheritance(strategy=InheritanceType.SINGLE_TABLE)
-public class Subscription
-{
+public class Subscription {
+
     @Id
     @GeneratedValue(strategy=GenerationType.IDENTITY)
     private long id;
@@ -2184,23 +2149,20 @@
     @Table(name="LINE_ITEM", schema="CNTRCT")
     @PrimaryKeyJoinColumn(name="ID", referencedColumnName="ID")
     public static class LineItem
-        extends Contract
-    {
+        extends Contract {
         ...
     }
 }
 
 @Entity(name="Lifetime")
 public class LifetimeSubscription
-    extends Subscription
-{
+    extends Subscription {
     ...
 }
 
 @Entity(name="Trial")
 public class TrialSubscription
-    extends Subscription
-{
+    extends Subscription {
     ...
 }
 </programlisting>
@@ -2485,16 +2447,15 @@
 @IdClass(Magazine.MagazineId.class)
 @Table(name="MAG")
 @DiscriminatorValue("Mag")
-public class Magazine
-{
+public class Magazine {
+
     @Column(length=9)
     @Id private String isbn;
     @Id private String title;
 
     ...
 
-    public static class MagazineId
-    {
+    public static class MagazineId {
         ...
     }
 }
@@ -2502,8 +2463,8 @@
 @Entity
 @Table(name="ART", uniqueConstraints=@Unique(columnNames="TITLE"))
 @SequenceGenerator(name="ArticleSeq", sequenceName="ART_SEQ")
-public class Article
-{
+public class Article {
+
     @Id
     @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="ArticleSeq") 
     private long id;
@@ -2516,8 +2477,8 @@
 
 @Entity
 @Table(name="COMP")
-public class Company
-{
+public class Company {
+
     @Column(name="CID")
     @Id private long id;
 
@@ -2526,8 +2487,8 @@
 
 @Entity
 @Table(name="AUTH")
-public class Author
-{
+public class Author {
+
     @Id
     @GeneratedValue(strategy=GenerationType.TABLE, generator="AuthorGen")
     @TableGenerator(name="AuthorGen", table="AUTH_GEN", pkColumnName="PK",
@@ -2539,8 +2500,7 @@
 }
 
 @Embeddable
-public class Address
-{
+public class Address {
     ...
 }
 
@@ -2548,8 +2508,8 @@
 package org.mag.subscribe;
 
 @MappedSuperclass
-public abstract class Document
-{
+public abstract class Document {
+
     @Id
     @GeneratedValue(strategy=GenerationType.IDENTITY)
     private long id;
@@ -2562,8 +2522,7 @@
 @Inheritance(strategy=InheritanceType.JOINED)
 @DiscriminatorColumn(name="CTYPE")
 public class Contract
-    extends Document
-{
+    extends Document {
     ...
 }
 
@@ -2571,8 +2530,8 @@
 @Table(name="SUB", schema="CNTRCT")
 @DiscriminatorColumn(name="KIND", discriminatorType=DiscriminatorType.INTEGER)
 @DiscriminatorValue("1")
-public class Subscription
-{
+public class Subscription {
+
     @Id
     @GeneratedValue(strategy=GenerationType.IDENTITY)
     private long id;
@@ -2582,8 +2541,7 @@
     @Entity
     @Table(name="LINE_ITEM", schema="CNTRCT")
     public static class LineItem
-        extends Contract
-    {
+        extends Contract {
         ...
     }
 }
@@ -2591,16 +2549,14 @@
 @Entity(name="Lifetime")
 @DiscriminatorValue("2")
 public class LifetimeSubscription
-    extends Subscription
-{
+    extends Subscription {
     ...
 }
 
 @Entity(name="Trial")
 @DiscriminatorValue("3")
 public class TrialSubscription
-    extends Subscription
-{
+    extends Subscription {
     ...
 }
 </programlisting>
@@ -2983,8 +2939,8 @@
 @IdClass(Magazine.MagazineId.class)
 @Table(name="MAG")
 @DiscriminatorValue("Mag")
-public class Magazine
-{
+public class Magazine {
+
     @Column(length=9)
     @Id private String isbn;
     @Id private String title;
@@ -3000,8 +2956,7 @@
 
     ...
 
-    public static class MagazineId
-    {
+    public static class MagazineId {
         ...
     }
 }
@@ -3009,8 +2964,8 @@
 @Entity
 @Table(name="ART", uniqueConstraints=@Unique(columnNames="TITLE"))
 @SequenceGenerator(name="ArticleSeq", sequenceName="ART_SEQ")
-public class Article
-{
+public class Article {
+
     @Id
     @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="ArticleSeq") 
     private long id;
@@ -3029,8 +2984,8 @@
 
 @Entity
 @Table(name="COMP")
-public class Company
-{
+public class Company {
+
     @Column(name="CID")
     @Id private long id;
 
@@ -3047,8 +3002,8 @@
 
 @Entity
 @Table(name="AUTH")
-public class Author
-{
+public class Author {
+
     @Id
     @GeneratedValue(strategy=GenerationType.TABLE, generator="AuthorGen")
     @TableGenerator(name="AuthorGen", table="AUTH_GEN", pkColumnName="PK",
@@ -3069,16 +3024,15 @@
 }
 
 @Embeddable
-public class Address
-{
+public class Address {
     ...
 }
 
 package org.mag.subscribe;
 
 @MappedSuperclass
-public abstract class Document
-{
+public abstract class Document {
+
     @Id
     @GeneratedValue(strategy=GenerationType.IDENTITY)
     private long id;
@@ -3094,8 +3048,8 @@
 @Inheritance(strategy=InheritanceType.JOINED)
 @DiscriminatorColumn(name="CTYPE")
 public class Contract
-    extends Document
-{
+    extends Document {
+
     @Lob
     private String terms;
 
@@ -3106,8 +3060,8 @@
 @Table(name="SUB", schema="CNTRCT")
 @DiscriminatorColumn(name="KIND", discriminatorType=DiscriminatorType.INTEGER)
 @DiscriminatorValue("1")
-public class Subscription
-{
+public class Subscription {
+
     @Id
     @GeneratedValue(strategy=GenerationType.IDENTITY)
     private long id;
@@ -3126,8 +3080,8 @@
     @Entity
     @Table(name="LINE_ITEM", schema="CNTRCT")
     public static class LineItem
-        extends Contract
-    {
+        extends Contract {
+
         @Column(name="COMM")
         private String comments;
 
@@ -3140,8 +3094,8 @@
 @Entity(name="Lifetime")
 @DiscriminatorValue("2")
 public class LifetimeSubscription
-    extends Subscription
-{
+    extends Subscription {
+
     @Basic(fetch=FetchType.LAZY)
     @Column(name="ELITE")
     private boolean getEliteClub () { ... }
@@ -3153,8 +3107,8 @@
 @Entity(name="Trial")
 @DiscriminatorValue("3")
 public class TrialSubscription
-    extends Subscription
-{
+    extends Subscription {
+
     @Column(name="END")
     public Date getEndDate () { ... }
     public void setEndDate (Date end) { ... }
@@ -3405,8 +3359,8 @@
 @Table(name="ART")
 @SecondaryTable(name="ART_DATA", 
     pkJoinColumns=@PrimaryKeyJoinColumn(name="ART_ID", referencedColumnName="ID"))
-public class Article
-{
+public class Article {
+
     @Id private long id;
 
     @Column(table="ART_DATA")
@@ -3550,8 +3504,8 @@
 
 @Entity
 @Table(name="COMP")
-public class Company
-{
+public class Company {
+
     @Embedded
     @AttributeOverrides({
         @AttributeOverride(name="street", column=@Column(name="STRT")),
@@ -3564,8 +3518,8 @@
 
 @Entity
 @Table(name="AUTH")
-public class Author
-{
+public class Author {
+
     // use all defaults from Address class mappings
     private Address address;
     
@@ -3573,8 +3527,8 @@
 }
 
 @Embeddable
-public class Address
-{
+public class Address {
+
     private String street;
     private String city;
     @Column(columnDefinition="CHAR(2)")
@@ -3632,8 +3586,8 @@
                 </title>
 <programlisting>
 @MappedSuperclass
-public abstract class Document
-{
+public abstract class Document {
+
     @Column(name="VERS")
     @Version private int version;
 
@@ -3646,8 +3600,7 @@
 @DiscriminatorColumn(name="CTYPE")
 @AttributeOverride(name="version", column=@Column(name="CVERSION"))
 public class Contract
-    extends Document
-{
+    extends Document {
     ...
 }
 </programlisting>
@@ -3840,8 +3793,8 @@
 package org.mag;
 
 @Table(name="AUTH")
-public class Magazine
-{
+public class Magazine {
+
     @Column(length=9)
     @Id private String isbn;
     @Id private String title;
@@ -3858,8 +3811,8 @@
 }
 
 @Table(name="ART")
-public class Article
-{
+public class Article {
+
     @Id private long id;
 
     ...
@@ -3869,8 +3822,8 @@
 package org.mag.pub;
 
 @Table(name="COMP")
-public class Company
-{
+public class Company {
+
     @Column(name="CID")
     @Id private long id;
 
@@ -3880,14 +3833,13 @@
 
 package org.mag.subscribe;
 
-public class Subscription
-{
+public class Subscription {
     ...
 
     @Table(name="LINE_ITEM", schema="CNTRCT")
     public static class LineItem
-        extends Contract
-    {
+        extends Contract {
+
         @ManyToOne
         @JoinColumns({
             @JoinColumn(name="MAG_ISBN" referencedColumnName="ISBN"),
@@ -4092,8 +4044,8 @@
 
 @Entity
 @Table(name="MAG")
-public class Magazine
-{
+public class Magazine {
+
     @Column(length=9)
     @Id private String isbn;
     @Id private String title;
@@ -4113,8 +4065,8 @@
 
 @Entity
 @Table(name="ART")
-public class Article
-{
+public class Article {
+
     @Id private long id;
 
     @ManyToMany(cascade=CascadeType.PERSIST)
@@ -4132,8 +4084,8 @@
 
 @Entity
 @Table(name="AUTH")
-public class Author
-{
+public class Author {
+
     @Column(name="AID", columnDefinition="INTEGER64")
     @Id private long id;
 
@@ -4273,26 +4225,26 @@
 
 @Entity
 @Table(name="SUB", schema="CNTRCT")
-public class Subscription
-{
-@OneToMany(cascade={CascadeType.PERSIST,CascadeType.REMOVE})
-@MapKey(name="num")
-@JoinTable(name="SUB_ITEMS", schema="CNTRCT",
-    joinColumns=@JoinColumn(name="SUB_ID"),
-    inverseJoinColumns=@JoinColumn(name="ITEM_ID"))
-private Map&lt;Long,LineItem&gt; items;
+public class Subscription {
 
-...
-
-@Entity
-@Table(name="LINE_ITEM", schema="CNTRCT")
-public static class LineItem
-    extends Contract
-{
-    private long num;
+    @OneToMany(cascade={CascadeType.PERSIST,CascadeType.REMOVE})
+    @MapKey(name="num")
+    @JoinTable(name="SUB_ITEMS", schema="CNTRCT",
+        joinColumns=@JoinColumn(name="SUB_ID"),
+        inverseJoinColumns=@JoinColumn(name="ITEM_ID"))
+    private Map&lt;Long,LineItem&gt; items;
 
     ...
-}
+
+    @Entity
+    @Table(name="LINE_ITEM", schema="CNTRCT")
+    public static class LineItem
+        extends Contract {
+
+        private long num;
+
+        ...
+    }
 }
 </programlisting>
                 <para>
@@ -4370,8 +4322,8 @@
 @IdClass(Magazine.MagazineId.class)
 @Table(name="MAG")
 @DiscriminatorValue("Mag")
-public class Magazine
-{
+public class Magazine {
+
     @Column(length=9)
     @Id private String isbn;
     @Id private String title;
@@ -4409,8 +4361,7 @@
 
     ...
 
-    public static class MagazineId
-    {
+    public static class MagazineId {
         ...
     }
 }
@@ -4418,8 +4369,8 @@
 @Entity
 @Table(name="ART", uniqueConstraints=@Unique(columnNames="TITLE"))
 @SequenceGenerator(name="ArticleSeq", sequenceName="ART_SEQ")
-public class Article
-{
+public class Article {
+
     @Id
     @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="ArticleSeq") 
     private long id;
@@ -4445,8 +4396,8 @@
 
 @Entity
 @Table(name="COMP")
-public class Company
-{
+public class Company {
+
     @Column(name="CID")
     @Id private long id;
 
@@ -4479,8 +4430,8 @@
 
 @Entity
 @Table(name="AUTH")
-public class Author
-{
+public class Author {
+
     @Id
     @GeneratedValue(strategy=GenerationType.TABLE, generator="AuthorGen")
     @TableGenerator(name="AuthorGen", tableName="AUTH_GEN", pkColumnName="PK",
@@ -4506,8 +4457,8 @@
 }
 
 @Embeddable
-public class Address
-{
+public class Address {
+
     private String street;
     private String city;
     @Column(columnDefinition="CHAR(2)")
@@ -4519,8 +4470,8 @@
 package org.mag.subscribe;
 
 @MappedSuperclass
-public abstract class Document
-{
+public abstract class Document {
+
     @Id
     @GeneratedValue(strategy=GenerationType.IDENTITY)
     private long id;
@@ -4536,8 +4487,8 @@
 @Inheritance(strategy=InheritanceType.JOINED)
 @DiscriminatorColumn(name="CTYPE")
 public class Contract
-    extends Document
-{
+    extends Document {
+
     @Lob
     private String terms;
 
@@ -4548,8 +4499,8 @@
 @Table(name="SUB", schema="CNTRCT")
 @DiscriminatorColumn(name="KIND", discriminatorType=DiscriminatorType.INTEGER)
 @DiscriminatorValue("1")
-public class Subscription
-{
+public class Subscription {
+
     @Id
     @GeneratedValue(strategy=GenerationType.IDENTITY)
     private long id;
@@ -4575,8 +4526,8 @@
     @Entity
     @Table(name="LINE_ITEM", schema="CNTRCT")
     public static class LineItem
-        extends Contract
-    {
+        extends Contract {
+
         @Column(name="COMM")
         private String comments;
 
@@ -4596,8 +4547,8 @@
 @Entity(name="Lifetime")
 @DiscriminatorValue("2")
 public class LifetimeSubscription
-    extends Subscription
-{
+    extends Subscription {
+
     @Basic(fetch=FetchType.LAZY)
     @Column(name="ELITE")
     private boolean getEliteClub () { ... }
@@ -4609,8 +4560,8 @@
 @Entity(name="Trial")
 @DiscriminatorValue("3")
 public class TrialSubscription
-    extends Subscription
-{
+    extends Subscription {
+
     @Column(name="END")
     public Date getEndDate () { ... }
     public void setEndDate (Date end) { ... }

Modified: incubator/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_meta.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_meta.xml?view=diff&rev=452243&r1=452242&r2=452243
==============================================================================
--- incubator/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_meta.xml (original)
+++ incubator/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_meta.xml Mon Oct  2 15:22:18 2006
@@ -56,9 +56,9 @@
     <orderedlist>
         <listitem>
             <para>
-In a resource named <filename>orm.xml</filename> placed in the <filename>
-META-INF</filename> directory of the classpath or the jar archive containing
-your persistent classes.
+In a resource named <filename>orm.xml</filename> placed in a <filename>
+META-INF</filename> directory within a directory in your classpath or within a 
+jar archive containing your persistent classes.
             </para>
         </listitem>
         <listitem>
@@ -221,7 +221,7 @@
             <itemizedlist>
                 <listitem>
                     <para>
-<literal>class</literal>: This required attribute lists the class name for the
+<literal>class</literal>: Set this required attribute to the name of the
 identity class.
                     </para>
                 </listitem>
@@ -413,19 +413,16 @@
 
 @Entity
 @IdClass(Magazine.MagazineId.class)
-public class Magazine
-{
+public class Magazine {
     ...
 
-    public static class MagazineId
-    {
+    public static class MagazineId {
         ...
     }
 }
 
 @Entity
-public class Article
-{
+public class Article {
     ...
 }
 
@@ -433,20 +430,17 @@
 package org.mag.pub;
 
 @Entity
-public class Company
-{
+public class Company {
     ...
 }
 
 @Entity
-public class Author
-{
+public class Author {
     ...
 }
 
 @Embeddable
-public class Address
-{
+public class Address {
     ...
 }
 
@@ -454,42 +448,36 @@
 package org.mag.subscribe;
 
 @MappedSuperclass
-public abstract class Document
-{
+public abstract class Document {
     ...
 }
 
 @Entity
 public class Contract
-    extends Document
-{
+    extends Document {
     ...
 }
 
 @Entity
-public class Subscription
-{
+public class Subscription {
     ...
 
     @Entity
     public static class LineItem
-        extends Contract
-    {
+        extends Contract {
         ...
     }
 }
 
 @Entity(name="Lifetime")
 public class LifetimeSubscription
-    extends Subscription
-{
+    extends Subscription {
     ...
 }
 
 @Entity(name="Trial")
 public class TrialSubscription
-    extends Subscription
-{
+    extends Subscription {
     ...
 }
 </programlisting>
@@ -587,19 +575,19 @@
 <literal>T</literal>, you must define the following getter method:
         </para>
 <programlisting>
-T getP ();
+T getP();
 </programlisting>
         <para>
 For boolean properties, this is also acceptable:
         </para>
 <programlisting>
-boolean isP ();
+boolean isP();
 </programlisting>
         <para>
 You must also define the following setter method:
         </para>
 <programlisting>
-void setP (T value);
+void setP(T value);
 </programlisting>
         <para>
 To use property access, set your <literal>entity</literal> element's <literal>
@@ -608,9 +596,9 @@
         </para>
 <programlisting>
 @ManyToOne
-private Company getPublisher () { ... }
+private Company getPublisher() { ... }
 
-private void setPublisher (Company publisher) { ... }
+private void setPublisher(Company publisher) { ... }
 </programlisting>
         <warning>
             <para>
@@ -662,7 +650,7 @@
             <para>
 The <classname>Transient</classname> annotation specifies that a field is
 non-persistent. Use it to exclude fields from management that would otherwise be
-persistent. <classname> Transient</classname> is a marker annotation only; it
+persistent. <classname>Transient</classname> is a marker annotation only; it
 has no properties.
             </para>
             <para>
@@ -873,8 +861,8 @@
                 </itemizedlist>
                 <para>
 These string constants are defined in
-<ulink url="../../api/openjpa/persistence/Generator.html"><classname>
-org.apache.openjpa.persistence.Generator</classname></ulink>.
+<ulink url="../apidocs/org/apache/openjpa/persistence/Generator.html">
+<classname>org.apache.openjpa.persistence.Generator</classname></ulink>.
                 </para>
             </note>
         </section>
@@ -998,13 +986,13 @@
 <classname>Basic</classname> signifies a standard value persisted as-is to the
 datastore. You can use the <classname>Basic</classname> annotation on persistent
 fields of the following types: primitives, primitive wrappers, <classname>
-java.lang.String</classname>, <classname>byte[]</classname>, <classname>Byte[]
-</classname>, <classname>char[]</classname>, <classname>Character[]</classname>
-, <classname>java.math.BigDecimal</classname>, <classname>java.math.BigInteger
-</classname>, <classname>java.util.Date</classname>, <classname>
-java.util.Calendar</classname>, <classname>java.sql.Date</classname>,
-<classname>java.sql.Timestamp</classname>, <classname>Enum</classname> s, and
-<classname>Serializable</classname> types.
+java.lang.String</classname>, <classname>byte[]</classname>, <classname>
+Byte[]</classname>, <classname>char[]</classname>, <classname>
+Character[]</classname>, <classname>java.math.BigDecimal</classname>, 
+<classname>java.math.BigInteger</classname>, <classname>
+java.util.Date</classname>, <classname>java.util.Calendar</classname>, 
+<classname>java.sql.Date</classname>, <classname>java.sql.Timestamp</classname>,
+<classname>Enum</classname>s, and <classname>Serializable</classname> types.
             </para>
             <para>
 <classname>Basic</classname> declares these properties:
@@ -1012,9 +1000,9 @@
             <itemizedlist>
                 <listitem>
                     <para>
-<literal>FetchType fetch</literal>: Whether to load the field eagerly (
-<literal>FetchType.EAGER</literal>) or lazily ( <literal>FetchType.LAZY
-</literal> ). Defaults to <literal>FetchType.EAGER</literal>.
+<literal>FetchType fetch</literal>: Whether to load the field eagerly 
+(<literal>FetchType.EAGER</literal>) or lazily (<literal>
+FetchType.LAZY</literal>). Defaults to <literal>FetchType.EAGER</literal>.
                     </para>
                 </listitem>
                 <listitem>
@@ -1187,8 +1175,8 @@
                 </secondary>
             </indexterm>
             <para>
-When an entity <literal>A</literal> references a single entity <literal>B
-</literal>, and other <literal>A</literal>s might also reference the same
+When an entity <literal>A</literal> references a single entity <literal>
+B</literal>, and other <literal>A</literal>s might also reference the same
 <literal>B</literal>, we say there is a <emphasis>many to one</emphasis>
 relation from <literal>A</literal> to <literal>B</literal>. In our sample
 model, for example, each magazine has a reference to its publisher. Multiple
@@ -1214,18 +1202,18 @@
                 </listitem>
                 <listitem>
                     <para>
-<literal>FetchType fetch</literal>: Whether to load the field eagerly (
-<literal>FetchType.EAGER</literal>) or lazily ( <literal>FetchType.LAZY
-</literal> ). Defaults to <literal>FetchType.EAGER</literal>. See
-<xref linkend="jpa_overview_meta_fetch"/> above for details on fetch
-types.
+<literal>FetchType fetch</literal>: Whether to load the field eagerly 
+(<literal>FetchType.EAGER</literal>) or lazily 
+(<literal>FetchType.LAZY</literal>). Defaults to <literal>
+FetchType.EAGER</literal>. See <xref linkend="jpa_overview_meta_fetch"/> above 
+for details on fetch types.
                     </para>
                 </listitem>
                 <listitem>
                     <para>
 <literal>boolean optional</literal>: Whether the related object must exist. If
-<literal>false</literal>, this field cannot be null. Defaults to <literal>true
-</literal>.
+<literal>false</literal>, this field cannot be null. Defaults to <literal>
+true</literal>.
                     </para>
                 </listitem>
             </itemizedlist>
@@ -1247,8 +1235,8 @@
                 </listitem>
                 <listitem>
                     <para>
-<literal>fetch</literal>: One of <literal>EAGER</literal> or <literal>LAZY
-</literal>.
+<literal>fetch</literal>: One of <literal>EAGER</literal> or <literal>
+LAZY</literal>.
                     </para>
                 </listitem>
                 <listitem>
@@ -1279,7 +1267,7 @@
 We introduce the JPA <classname>EntityManager</classname> in
 <xref linkend="jpa_overview_em"/>. The <classname>EntityManager
 </classname> has APIs to persist new entities, remove (delete) existing
-entities, refresh entity state from the datastore, and merge <emphasis> detached
+entities, refresh entity state from the datastore, and merge <emphasis>detached
 </emphasis> entity state back into the persistence context. We explore all of
 these APIs in detail later in the overview.
                 </para>
@@ -1386,8 +1374,8 @@
             </indexterm>
             <para>
 When an entity <literal>A</literal> references multiple <literal>B</literal>
-entities, and no two <literal>A</literal>s reference the same <literal>B
-</literal>, we say there is a <emphasis>one to many</emphasis> relation from
+entities, and no two <literal>A</literal>s reference the same <literal>
+B</literal>, we say there is a <emphasis>one to many</emphasis> relation from
 <literal>A</literal> to <literal>B</literal>.
             </para>
             <para>
@@ -1428,11 +1416,11 @@
                 </listitem>
                 <listitem>
                     <para>
-<literal>FetchType fetch</literal>: Whether to load the field eagerly (
-<literal>FetchType.EAGER</literal>) or lazily ( <literal>FetchType.LAZY
-</literal> ). Defaults to <literal>FetchType.LAZY</literal>. See
-<xref linkend="jpa_overview_meta_fetch"/> above for details on fetch
-types.
+<literal>FetchType fetch</literal>: Whether to load the field eagerly 
+(<literal>FetchType.EAGER</literal>) or lazily 
+(<literal>FetchType.LAZY</literal>). Defaults to <literal>
+FetchType.LAZY</literal>. See <xref linkend="jpa_overview_meta_fetch"/> above 
+for details on fetch types.
                     </para>
                 </listitem>
             </itemizedlist>
@@ -1454,8 +1442,8 @@
                 </listitem>
                 <listitem>
                     <para>
-<literal>fetch</literal>: One of <literal>EAGER</literal> or <literal>LAZY
-</literal>.
+<literal>fetch</literal>: One of <literal>EAGER</literal> or <literal>
+LAZY</literal>.
                     </para>
                 </listitem>
                 <listitem>
@@ -1578,8 +1566,8 @@
                 </secondary>
             </indexterm>
             <para>
-When an entity <literal>A</literal> references a single entity <literal>B
-</literal>, and no other <literal>A</literal>s can reference the same <literal>
+When an entity <literal>A</literal> references a single entity <literal>
+B</literal>, and no other <literal>A</literal>s can reference the same <literal>
 B</literal>, we say there is a <emphasis>one to one</emphasis> relation between
 <literal>A</literal> and <literal>B</literal>. In our sample model, <classname>
 Magazine</classname> has a one to one relation to <classname>Article</classname>
@@ -1615,18 +1603,18 @@
                 </listitem>
                 <listitem>
                     <para>
-<literal>FetchType fetch</literal>: Whether to load the field eagerly (
-<literal>FetchType.EAGER</literal>) or lazily ( <literal>FetchType.LAZY
-</literal> ). Defaults to <literal>FetchType.EAGER</literal>. See
-<xref linkend="jpa_overview_meta_fetch"/> above for details on fetch
-types.
+<literal>FetchType fetch</literal>: Whether to load the field eagerly 
+(<literal>FetchType.EAGER</literal>) or lazily 
+(<literal>FetchType.LAZY</literal>). Defaults to <literal>
+FetchType.EAGER</literal>. See <xref linkend="jpa_overview_meta_fetch"/> above 
+for details on fetch types.
                     </para>
                 </listitem>
                 <listitem>
                     <para>
 <literal>boolean optional</literal>: Whether the related object must exist. If
-<literal>false</literal>, this field cannot be null. Defaults to <literal>true
-</literal>.
+<literal>false</literal>, this field cannot be null. Defaults to <literal>
+true</literal>.
                     </para>
                 </listitem>
             </itemizedlist>
@@ -1648,8 +1636,8 @@
                 </listitem>
                 <listitem>
                     <para>
-<literal>fetch</literal>: One of <literal>EAGER</literal> or <literal>LAZY
-</literal>.
+<literal>fetch</literal>: One of <literal>EAGER</literal> or <literal>
+LAZY</literal>.
                     </para>
                 </listitem>
                 <listitem>
@@ -1692,7 +1680,7 @@
             <para>
 When an entity <literal>A</literal> references multiple <literal>B</literal>
 entities, and other <literal>A</literal>s might reference some of the same
-<literal>B</literal> s, we say there is a <emphasis>many to many</emphasis>
+<literal>B</literal>s, we say there is a <emphasis>many to many</emphasis>
 relation between <literal>A</literal> and <literal>B</literal>. In our sample
 model, for example, each article has a reference to all the authors that
 contributed to the article. Other articles might have some of the same authors.
@@ -1730,11 +1718,11 @@
                 </listitem>
                 <listitem>
                     <para>
-<literal>FetchType fetch</literal>: Whether to load the field eagerly (
-<literal>FetchType.EAGER</literal>) or lazily ( <literal>FetchType.LAZY
-</literal> ). Defaults to <literal>FetchType.LAZY</literal>. See
-<xref linkend="jpa_overview_meta_fetch"/> above for details on fetch
-types.
+<literal>FetchType fetch</literal>: Whether to load the field eagerly 
+(<literal>FetchType.EAGER</literal>) or lazily 
+(<literal>FetchType.LAZY</literal>). Defaults to <literal>
+FetchType.LAZY</literal>. See <xref linkend="jpa_overview_meta_fetch"/> above 
+for details on fetch types.
                     </para>
                 </listitem>
             </itemizedlist>
@@ -1756,8 +1744,8 @@
                 </listitem>
                 <listitem>
                     <para>
-<literal>fetch</literal>: One of <literal>EAGER</literal> or <literal>LAZY
-</literal>.
+<literal>fetch</literal>: One of <literal>EAGER</literal> or <literal>
+LAZY</literal>.
                     </para>
                 </listitem>
                 <listitem>
@@ -1905,21 +1893,21 @@
                 <listitem>
                     <para>
 Fields of any primitive type, primitive wrapper type, <classname>
-java.lang.String</classname>, <classname>byte[]</classname>, <classname>Byte[]
-</classname>, <classname>char[]</classname>, <classname>Character[]</classname>
-, <classname>java.math.BigDecimal</classname>, <classname>java.math.BigInteger
-</classname>, <classname>java.util.Date</classname>, <classname>
-java.util.Calendar</classname>, <classname>java.sql.Date</classname>,
-<classname>java.sql.Timestamp</classname>, or any <classname>Serializable
-</classname> type default to persistent, as if annotated with
-<link linkend="jpa_overview_meta_basic"><literal>@Basic</literal></link>.
+java.lang.String</classname>, <classname>byte[]</classname>, <classname>
+Byte[]</classname>, <classname>char[]</classname>, <classname>
+Character[]</classname>, <classname>java.math.BigDecimal</classname>, 
+<classname>java.math.BigInteger</classname>, <classname>
+java.util.Date</classname>, <classname> java.util.Calendar</classname>, 
+<classname>java.sql.Date</classname>, <classname>java.sql.Timestamp</classname>,
+or any <classname>Serializable</classname> type default to persistent, as if 
+annotated with <link linkend="jpa_overview_meta_basic"><literal>
+@Basic</literal></link>.
                     </para>
                 </listitem>
                 <listitem>
                     <para>
 Fields of an embeddable type default to persistent, as if annotated with
-<link linkend="jpa_overview_meta_embedded"><literal> @Embedded</literal></link>
-.
+<link linkend="jpa_overview_meta_embedded"><literal>@Embedded</literal></link>.
                     </para>
                 </listitem>
                 <listitem>
@@ -3500,8 +3488,8 @@
 
 @Entity
 @IdClass(Magazine.MagazineId.class)
-public class Magazine
-{
+public class Magazine {
+
     @Id private String isbn;
     @Id private String title;
     @Version private int version;
@@ -3524,15 +3512,14 @@
 
     ...
 
-    public static class MagazineId
-    {
+    public static class MagazineId {
         ...
     }
 }
 
 @Entity
-public class Article
-{
+public class Article {
+
     @Id private long id;
     @Version private int version;
     
@@ -3550,8 +3537,8 @@
 package org.mag.pub;
 
 @Entity
-public class Company
-{
+public class Company {
+
     @Id private long id;
     @Version private int version;
 
@@ -3569,8 +3556,8 @@
 }
 
 @Entity
-public class Author
-{
+public class Author {
+
     @Id private long id;
     @Version private int version;
 
@@ -3585,8 +3572,8 @@
 }
 
 @Embeddable
-public class Address
-{
+public class Address {
+
     private String street; // defaults to @Basic
     private String city;   // defaults to @Basic
     private String state;  // defaults to @Basic
@@ -3599,8 +3586,8 @@
 package org.mag.subscribe;
 
 @MappedSuperclass
-public abstract class Document
-{
+public abstract class Document {
+
     @Id private long id;
     @Version private int version;
 
@@ -3609,16 +3596,16 @@
 
 @Entity
 public class Contract
-    extends Document
-{
+    extends Document {
+
     private String terms; // defaults to @Basic
 
     ...
 }
 
 @Entity
-public class Subscription
-{
+public class Subscription {
+
     @Id private long id;
     @Version private int version;
 
@@ -3633,8 +3620,8 @@
 
     @Entity
     public static class LineItem
-        extends Contract
-    {
+        extends Contract {
+
         private String comments; // defaults to @Basic
         private double price;    // defaults to @Basic
         private long num;        // defaults to @Basic
@@ -3648,21 +3635,21 @@
 
 @Entity(name="Lifetime")
 public class LifetimeSubscription
-    extends Subscription
-{
+    extends Subscription {
+
     @Basic(fetch=FetchType.LAZY)
-    private boolean getEliteClub () { ... }
-    public void setEliteClub (boolean elite) { ... }
+    private boolean getEliteClub() { ... }
+    public void setEliteClub(boolean elite) { ... }
 
     ...
 }
 
 @Entity(name="Trial")
 public class TrialSubscription
-    extends Subscription
-{
-    public Date getEndDate () { ... }
-    public void setEndDate (Date end) { ... }
+    extends Subscription {
+
+    public Date getEndDate() { ... }
+    public void setEndDate(Date end) { ... }
 
     ...
 }

Modified: incubator/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_pc.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_pc.xml?view=diff&rev=452243&r1=452242&r2=452243
==============================================================================
--- incubator/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_pc.xml (original)
+++ incubator/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_pc.xml Mon Oct  2 15:22:18 2006
@@ -35,7 +35,7 @@
         </see>
     </indexterm>
     <para>
-JPA recognizes two types of persistent classes: <emphasis> entity</emphasis>
+JPA recognizes two types of persistent classes: <emphasis>entity</emphasis>
 classes and <emphasis>embeddable</emphasis> classes. Each persistent instance of
 an entity class - each <emphasis>entity</emphasis> - represents a unique
 datastore record. You can use the <classname>EntityManager</classname> to find
@@ -49,9 +49,9 @@
 <classname>Query</classname>.
     </para>
     <para>
-Despite these differences, there are few differences between entity classes and
-embeddable classes. In fact, writing either type of persistent class is little
-different than writing any other class. There are no special parent classes to
+Despite these differences, there are few distinctions between entity classes and
+embeddable classes. In fact, writing either type of persistent class is a lot
+like writing any other class. There are no special parent classes to
 extend from, field types to use, or methods to write. This is one important way
 in which JPA makes persistence transparent to you, the developer.
     </para>
@@ -73,43 +73,38 @@
  * Example persistent class.  Notice that it looks exactly like any other
  * class.  JPA makes writing persistent classes completely transparent.
  */
-public class Magazine
-{
-    private String    isbn;
-    private String    title;
-    private Set       articles = new HashSet ();
-    private Article   coverArticle;
-    private int       copiesSold;
-    private double    price;
-    private Company   publisher;
-    private int       version;
+public class Magazine {
 
-    protected Magazine ()
-    {
+    private String isbn;
+    private String title;
+    private Set articles = new HashSet();
+    private Article coverArticle;
+    private int copiesSold;
+    private double price;
+    private Company publisher;
+    private int version;
+
+    protected Magazine() {
     }
 
-    public Magazine (String title, String isbn)
-    {
+    public Magazine(String title, String isbn) {
         this.title = title;
         this.isbn = isbn;
     }
 
-    public void publish (Company publisher, double price)
-    {
+    public void publish(Company publisher, double price) {
         this.publisher = publisher;
-        publisher.addMagazine (this);
+        publisher.addMagazine(this);
         this.price = price;
     }
     
-    public void sell ()
-    {
+    public void sell() {
         copiesSold++;
-        publisher.addRevenue (price);
+        publisher.addRevenue(price);
     }
 
-    public void addArticle (Article article)
-    {
-        articles.add (article);
+    public void addArticle(Article article) {
+        articles.add(article);
     }
 
     // rest of methods omitted
@@ -210,7 +205,7 @@
 the same <literal>isbn</literal> and <literal>title</literal> values.
 <xref linkend="jpa_overview_meta_id"/> will show you how to denote your
 identity fields in JPA metadata. <xref linkend="jpa_overview_pc_identity"/>
- below examines persistent identity.
+below examines persistent identity.
             </para>
             <note>
                 <para>
@@ -241,24 +236,24 @@
             </indexterm>
             <para>
 The <literal>version</literal> field in our <classname>Magazine</classname>
-class may seem out of place. JPA uses a version field in your entity to detect
+class may seem out of place. JPA uses a version field in your entities to detect
 concurrent modifications to the same datastore record. When the JPA runtime
 detects an attempt to concurrently modify the same record, it throws an
 exception to the transaction attempting to commit last. This prevents
 overwriting the previous commit with stale data.
             </para>
             <para>
-The version field is not required, but without one concurrent threads or
+A version field is not required, but without one concurrent threads or
 processes might succeed in making conflicting changes to the same record at the
 same time. This is unacceptable to most applications.
 <xref linkend="jpa_overview_meta_version"/> shows you how to designate a
 version field in JPA metadata.
             </para>
             <para>
-The version field must be an integral type ( <classname> int</classname>,
-<classname>Long</classname>, etc) or a <classname>java.sql.Timestamp</classname>
-. You should consider version fields immutable. Changing the field value has
-undefined results.
+The version field must be an integral type (<classname> int</classname>,
+<classname>Long</classname>, etc) or a <classname>
+java.sql.Timestamp</classname>. You should consider version fields immutable. 
+Changing the field value has undefined results.
             </para>
             <note>
                 <para>
@@ -391,12 +386,12 @@
             <itemizedlist>
                 <listitem>
                     <para>
-All primitives ( <classname>int, float, byte</classname>, etc)
+All primitives (<classname>int, float, byte</classname>, etc)
                     </para>
                 </listitem>
                 <listitem>
                     <para>
-All primitive wrappers ( <classname>java.lang.Integer, java.lang.Float,
+All primitive wrappers (<classname>java.lang.Integer, java.lang.Float,
 java.lang.Byte</classname>, etc)
                     </para>
                 </listitem>
@@ -527,7 +522,7 @@
                 <listitem>
                     <para>
 <classname>java.util.Map</classname>s in which each entry maps the value of one
-of an entity's fields to that entity.
+of a related entity's fields to that entity.
                     </para>
                 </listitem>
             </itemizedlist>
@@ -560,10 +555,9 @@
             </para>
             <note>
                 <para>
-OpenJPA also supports arrays, <classname> java.lang.Number</classname>,
-<classname> java.util.Locale</classname>, all JDK 1.2 <classname> Set
-</classname>, <classname>List</classname>, and <classname> Map</classname>
-types, collections and maps of immutable and embedded as well as entity types,
+OpenJPA also supports arrays, <classname>java.lang.Number</classname>,
+<classname>java.util.Locale</classname>, all JDK 1.2 <classname>Set</classname>,
+<classname>List</classname>, and <classname>Map</classname> types, 
 and many other mutable and immutable field types. OpenJPA also allows you to
 plug in support for custom types.
                 </para>
@@ -688,10 +682,10 @@
 other entites of the same type.
         </para>
         <para>
-Identity fields must be primitives, primitive wrappers, <classname>String
-</classname> s, <classname>Date</classname> s, <classname>Timestamp</classname>
-s, or embeddable types. Notably, other entities instances can <emphasis>not
-</emphasis> be used as identity fields.
+Identity fields must be primitives, primitive wrappers, <classname>
+String</classname>s, <classname>Date</classname>s, <classname>
+Timestamp</classname>s, or embeddable types. Notably, other entities instances 
+can <emphasis>not</emphasis> be used as identity fields.
         </para>
         <note>
             <para>
@@ -726,7 +720,7 @@
             </seealso>
         </indexterm>
 If you are dealing with a single persistence context (see
-<xref linkend="jpa_overview_emfactory_perscontext"/> ), then you do not
+<xref linkend="jpa_overview_emfactory_perscontext"/>), then you do not
 have to compare identity fields to test whether two entity references represent
 the same state in the datastore. There is a much easier way: the <literal>==
 </literal> operator. JPA requires that each persistence context maintain only
@@ -811,7 +805,7 @@
 All entity classes related by inheritance must use the same identity class, or
 else each entity class must have its own identity class whose inheritance
 hierarchy mirrors the inheritance hierarchy of the owning entity classes (see
-<xref linkend="jpa_overview_pc_identity_hierarchy"/> ).
+<xref linkend="jpa_overview_pc_identity_hierarchy"/>).
                     </para>
                 </listitem>
             </itemizedlist>
@@ -835,8 +829,8 @@
 /**
  * Persistent class using application identity.
  */
-public class Magazine
-{
+public class Magazine {
+
     private String isbn;    // identity field
     private String title;   // identity field
 
@@ -846,8 +840,8 @@
     /**
      * Application identity class for Magazine.
      */
-    public static class MagazineId
-    {
+    public static class MagazineId {
+
         // each identity field in the Magazine class must have a
         // corresponding field in the identity class
         public String isbn;
@@ -859,8 +853,7 @@
          * classes directly (some JPA implementations may subclass the
          * identity class).
          */
-        public boolean equals (Object other)
-        {
+        public boolean equals(Object other) {
             if (other == this)
                 return true;
             if (!(other instanceof MagazineId))
@@ -868,22 +861,20 @@
     
             MagazineId mi = (MagazineId) other;
             return (isbn == mi.isbn
-                || (isbn != null &amp;&amp; isbn.equals (mi.isbn)))
+                || (isbn != null &amp;&amp; isbn.equals(mi.isbn)))
                 &amp;&amp; (title == mi.title
-                || (title != null &amp;&amp; title.equals (mi.title)));
+                || (title != null &amp;&amp; title.equals(mi.title)));
         }
      
         /**
          * Hashcode must also depend on identity values.
          */
-        public int hashCode ()
-        {
-            return ((isbn == null) ? 0 : isbn.hashCode ())
-                ^ ((title == null) ? 0 : title.hashCode ());
+        public int hashCode() {
+            return ((isbn == null) ? 0 : isbn.hashCode())
+                ^ ((title == null) ? 0 : title.hashCode());
         } 
 
-        public String toString ()
-        {
+        public String toString() {
             return isbn + ":" + title;
         }
     }
@@ -954,7 +945,7 @@
                     <listitem>
                         <para>
 All subclasses of a concrete identity class must be <methodname>equals
-</methodname> and <methodname> hashCode</methodname> -compatible with the
+</methodname> and <methodname>hashCode</methodname>-compatible with the
 concrete superclass. This means that in our example, a <classname>ManagerId
 </classname> instance and a <classname>FullTimeEmployeeId</classname> instance
 with the same identity field values should have the same hash code, and should
@@ -1106,8 +1097,8 @@
 <ulink url="http://java.sun.com/javaee/5/docs/api/javax/persistence/PreUpdate.html">
 <classname>PreUpdate</classname></ulink>: Methods marked with this annotation
 will be invoked just the persistent values in your objects are flushed to the
-datastore. This is equivalent to the XML element tag <literal>pre-update
-</literal>.
+datastore. This is equivalent to the XML element tag <literal>
+pre-update</literal>.
                     </para>
                     <para>
 <classname>PreUpdate</classname> is the complement to <classname>PostLoad
@@ -1131,8 +1122,7 @@
 <classname>PostUpdate</classname></ulink>: Methods marked with this annotation
 will be invoked after changes to a given instance have been stored to the
 datastore. This is useful for clearing stale data cached at the application
-layer. This is equivalent to the XML element tag <literal>post-update</literal>
-.
+layer. This is equivalent to the XML element tag <literal>post-update</literal>.
                     </para>
                 </listitem>
                 <listitem>
@@ -1150,8 +1140,8 @@
 will be invoked before an object transactions to the deleted state. Access to
 persistent fields is valid within this method. You might use this method to
 cascade the deletion to related objects based on complex criteria, or to perform
-other cleanup. This is equivalent to the XML element tag <literal>pre-remove
-</literal>.
+other cleanup. This is equivalent to the XML element tag <literal>
+pre-remove</literal>.
                     </para>
                 </listitem>
                 <listitem>
@@ -1189,8 +1179,8 @@
  * Example persistent class declaring our entity listener.
  */
 @Entity
-public class Magazine
-{
+public class Magazine {
+
     @Transient 
     private byte[][] data;
 
@@ -1198,17 +1188,15 @@
     private List&lt;Photo&gt; photos;
 
     @PostLoad
-    public void convertPhotos ()
-    {
-        data = new byte[photos.size ()][];
-        for (int i = 0; i &lt; photos.size (); i++)
-            data[i] = photos.get (i).toByteArray ();
+    public void convertPhotos() {
+        data = new byte[photos.size()][];
+        for (int i = 0; i &lt; photos.size(); i++)
+            data[i] = photos.get(i).toByteArray();
     }
 
     @PreDelete
-    public void logMagazineDeletion ()
-    {
-        getLog ().debug ("deleting magazine containing" + photos.size () 
+    public void logMagazineDeletion() {
+        getLog().debug("deleting magazine containing" + photos.size() 
             + " photos.");
     }
 }
@@ -1258,8 +1246,8 @@
  */
 @Entity
 @EntityListeners({ MagazineLogger.class, ... })
-public class Magazine
-{
+public class Magazine {
+
     // ... //
 }
 
@@ -1267,20 +1255,18 @@
 /**
  * Example entity listener.
  */
-public class MagazineLogger
-{
+public class MagazineLogger {
+
     @PostPersist
-    public void logAddition (Object pc)
-    {
+    public void logAddition(Object pc) {
         getLog ().debug ("Added new magazine:" + ((Magazine) pc).getTitle ());
     }
 
 
     @PreRemove
-    public void logDeletion (Object pc)
-    {
-        getLog ().debug ("Removing from circulation:" + 
-            ((Magazine) pc).getTitle ());
+    public void logDeletion(Object pc) {
+        getLog().debug("Removing from circulation:" + 
+            ((Magazine) pc).getTitle());
     }
 }
 </programlisting>

Modified: incubator/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_persistence.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_persistence.xml?view=diff&rev=452243&r1=452242&r2=452243
==============================================================================
--- incubator/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_persistence.xml (original)
+++ incubator/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_persistence.xml Mon Oct  2 15:22:18 2006
@@ -35,15 +35,14 @@
         <imageobject>
             <!-- PNG image data, 427 x 121 (see README) -->
             <imagedata fileref="img/persistence.png" width="285px"/>
-            
         </imageobject>
     </mediaobject>
     <note>
         <para>
 OpenJPA also includes the
-<ulink url="../../api/openjpa/persistence/OpenJPAPersistence.html"><classname>
-OpenJPAPersistence</classname></ulink> helper class to provide additional
-utility methods.
+<ulink url="../apidocs/org/apache/openjpa/persistence/OpenJPAPersistence.html">
+<classname>OpenJPAPersistence</classname></ulink> helper class to provide 
+additional utility methods.
         </para>
     </note>
     <para>
@@ -55,8 +54,8 @@
 EntityManagerFactory</classname> objects in a vendor-neutral fashion.
     </para>
 <programlisting>
-public static EntityManagerFactory createEntityManagerFactory (String name);
-public static EntityManagerFactory createEntityManagerFactory (String name, Map props);
+public static EntityManagerFactory createEntityManagerFactory(String name);
+public static EntityManagerFactory createEntityManagerFactory(String name, Map props);
 </programlisting>
     <para>
 Each <methodname>createEntityManagerFactory</methodname> method searches the
@@ -67,8 +66,8 @@
     </para>
     <para>
 <filename>persistence.xml</filename> files define <classname>
-EntityManagerFactories</classname>. The <methodname> createEntityManagerFactory
-</methodname> methods search for <filename> persistence.xml</filename> files
+EntityManagerFactories</classname>. The <methodname>createEntityManagerFactory
+</methodname> methods search for <filename>persistence.xml</filename> files
 within the <filename>META-INF</filename> directory of any <literal>CLASSPATH
 </literal> element. For example, if your <literal>CLASSPATH</literal> contains
 the <filename>conf</filename> directory, you could place an <classname>
@@ -120,9 +119,9 @@
             </listitem>
             <listitem>
                 <para>
-<literal>transaction-type</literal>: Whether to use managed ( <literal>JTA
-</literal>) or local ( <literal>RESOURCE_LOCAL</literal>) transaction
-management. Defaults to <literal>JTA</literal>.
+<literal>transaction-type</literal>: Whether to use managed 
+(<literal>JTA</literal>) or local (<literal>RESOURCE_LOCAL</literal>) 
+transaction management.
                 </para>
             </listitem>
             <listitem>
@@ -144,7 +143,7 @@
                 <para>
 <literal>jta-data-source</literal>: The JNDI name of a JDBC <classname>
 DataSource</classname> that is automatically enlisted in JTA transactions. This
-may be an XA <classname> DataSource</classname>.
+may be an XA <classname>DataSource</classname>.
                 </para>
             </listitem>
             <listitem>
@@ -155,22 +154,22 @@
             </listitem>
             <listitem>
                 <para>
-<literal>mapping-file</literal> *: The resource names of XML mapping files for
+<literal>mapping-file</literal>*: The resource names of XML mapping files for
 entities and embeddable classes. You can also specify mapping information in an
-<filename> orm.xml</filename> file in your <filename>META-INF</filename>
+<filename>orm.xml</filename> file in your <filename>META-INF</filename>
 directory. If present, the <filename>orm.xml</filename> mapping file will be
 read automatically.
                 </para>
             </listitem>
             <listitem>
                 <para>
-<literal>jar-file</literal> *: The names of jar files containing entities and
+<literal>jar-file</literal>*: The names of jar files containing entities and
 embeddable classes. The implementation will scan the jar for annotated classes.
                 </para>
             </listitem>
             <listitem>
                 <para>
-<literal>class</literal> *: The class names of entities and embeddable classes.
+<literal>class</literal>*: The class names of entities and embeddable classes.
                 </para>
             </listitem>
             <listitem>
@@ -234,11 +233,11 @@
 <programlisting>
 // if your persistence.xml file does not contain all settings already, you
 // can add vendor settings to a map 
-Properties props = new Properties ();
+Properties props = new Properties();
 ...
 
 // create the factory defined by the "openjpa" entity-manager entry
-EntityManagerFactory emf = Persistence.createEntityManagerFactory ("openjpa", props);
+EntityManagerFactory emf = Persistence.createEntityManagerFactory("openjpa", props);
 </programlisting>
         </example>
     </section>