[hibernate-commits] Hibernate SVN: r10456 - in trunk/HibernateExt/ejb-api/src/javax/persistence: . spi

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Wed Sep 6 00:01:44 EDT 2006


Author: epbernard
Date: 2006-09-06 00:01:34 -0400 (Wed, 06 Sep 2006)
New Revision: 10456

Modified:
   trunk/HibernateExt/ejb-api/src/javax/persistence/AssociationOverride.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/AssociationOverrides.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/AttributeOverride.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/AttributeOverrides.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/Basic.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/Column.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/ColumnResult.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/DiscriminatorColumn.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/DiscriminatorValue.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/Embeddable.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/Embedded.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/EmbeddedId.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/Entity.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/EntityExistsException.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/EntityListeners.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/EntityNotFoundException.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/EntityResult.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/Enumerated.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/ExcludeDefaultListeners.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/ExcludeSuperclassListeners.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/FieldResult.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/GeneratedValue.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/GenerationType.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/Id.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/IdClass.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/Inheritance.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/InheritanceType.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/JoinTable.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/Lob.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/LockModeType.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/ManyToMany.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/ManyToOne.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/MapKey.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/MappedSuperclass.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/OneToMany.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/OneToOne.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/OrderBy.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/PersistenceContext.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/PersistenceContextType.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/PersistenceContexts.java
   trunk/HibernateExt/ejb-api/src/javax/persistence/spi/PersistenceUnitTransactionType.java
Log:
EJB-211

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/AssociationOverride.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/AssociationOverride.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/AssociationOverride.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -9,9 +9,26 @@
 import static java.lang.annotation.ElementType.METHOD;
 import static java.lang.annotation.ElementType.FIELD;
 
-
+/**
+ * This annotation is used to override a many-to-one or one-to-one mapping of property or field for
+ * an entity relationship.
+ * The AssociationOverride annotation may be applied to an entity that extends a mapped superclass
+ * to override a many-to-one or one-to-one mapping defined by the mapped superclass. If the
+ * AssociationOverride annotation is not specified, the join column is mapped the same as in
+ * the original mapping.
+ *
+ * @author Emmanuel Bernard
+ */
 @Target({TYPE, METHOD, FIELD}) @Retention(RUNTIME)
 public @interface AssociationOverride {
+	/**
+	 * The name of the relationship property whose mapping is being overridden if property-based
+	 * access is being used, or the name of the relationship field if field-based access is used.
+	 */
 	String name();
+
+	/**
+	 * The join column that is being mapped to the persistent attribute.
+	 */
 	JoinColumn[] joinColumns();
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/AssociationOverrides.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/AssociationOverrides.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/AssociationOverrides.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -10,9 +10,15 @@
 import static java.lang.annotation.ElementType.FIELD;
 
 /**
+ * This annotation is used to override mappings of multiple many-to-one
+ * or one-to-one relationship properties or fields.
+ *
  * @author Emmanuel Bernard
  */
 @Target({TYPE, METHOD, FIELD}) @Retention(RUNTIME)
 public @interface AssociationOverrides {
+	/**
+	 * Mapping overrides of relationship properties or fields
+	 */
 	AssociationOverride[] value();
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/AttributeOverride.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/AttributeOverride.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/AttributeOverride.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -10,10 +10,25 @@
 
 
 /**
+ * The AttributeOverride annotation is used to override the mapping of a Basic (whether explicit
+ * or default) property or field or Id property or field.
+ *
+ * The AttributeOverride annotation may be applied to an entity that extends a mapped superclass
+ * or to an embedded field or property to override a basic mapping defined by the mapped superclass
+ * or embeddable class. If the AttributeOverride annotation is not specified, the column is mapped
+ * the same as in the original mapping.
+ *
  * @author Emmanuel Bernard
  */
 @Target({TYPE, METHOD, FIELD}) @Retention(RUNTIME)
 public @interface AttributeOverride {
+	/**
+	 * The column that is being mapped to the persistent attribute
+	 */
 	String name();
+	/**
+	 * The name of the property whose mapping is being overridden if property-based access is being
+	 * used, or the name of the field if field-based access is used.
+	 */
 	Column column();
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/AttributeOverrides.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/AttributeOverrides.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/AttributeOverrides.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -10,9 +10,14 @@
 
 
 /**
+ * Is used to override mappings of multiple properties or fields
+ *
  * @author Emmanuel Bernard
  */
 @Target({TYPE, METHOD, FIELD}) @Retention(RUNTIME)
 public @interface AttributeOverrides {
+	/**
+	 * One or more mapping override
+	 */
 	AttributeOverride[] value();
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/Basic.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/Basic.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/Basic.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -10,10 +10,30 @@
 import static javax.persistence.FetchType.EAGER;
 
 /**
+ * The Basic annotation is the simplest type of mapping to a database column. The Basic
+ * annotation can be applied to a persistent property or instance variable of any of the
+ * following types: Java primitive types, wrappers of the primitive types, String,
+ * java.math.BigInteger, java.math.BigDecimal, java.util.Date, java.util.Calendar,
+ * java.sql.Date, java.sql.Time, java.sql.Timestamp, byte[], Byte[], char[], Character[],
+ * enums, and any other type that implements Serializable.
+ *
+ * The use of the Basic annotation is optional for persistent fields and properties of these types.
+
  * @author Emmanuel Bernard
  */
 @Target({METHOD, FIELD}) @Retention(RUNTIME)
 public @interface Basic {
+	/**
+	 * Defines whether the value of the field or property should be lazily loaded or must be
+	 * eagerly fetched. The EAGER strategy is a requirement on the persistence provider runtime
+	 * that the value must be eagerly fetched. The LAZY strategy is a hint to the persistence
+	 * provider runtime. If not specified, defaults to EAGER.
+	 */
 	FetchType fetch() default EAGER;
+	/**
+	 * Defines whether the value of the field or property may be null. This is a hint and is
+	 * disregarded for primitive types; it may be used in schema generation. If not specified,
+	 * defaults to true.
+	 */
 	boolean optional() default true;
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/Column.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/Column.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/Column.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -9,18 +9,57 @@
 import static java.lang.annotation.RetentionPolicy.*;
 
 /**
+ * Is used to specify a mapped column for a persistent property or field. If no Column annotation is
+ * specified, the default values are applied.
+ *
  * @author Emmanuel Bernard
  */
 @Target({METHOD, FIELD}) @Retention(RUNTIME)
 public @interface Column {
+	/**
+	 * The name of the column. Defaults to the property or field name
+	 */
 	String name() default "";
+	/**
+	 * Whether the property is a unique key. This is a shortcut for the UniqueConstraint
+	 * annotation at the table level and is useful for when the unique key constraint is
+	 * only a single field. This constraint applies in addition to any constraint entailed
+	 * by primary key mapping and to constraints specified at the table level.
+	 */
 	boolean unique() default false;
+	/**
+	 * Whether the database column is nullable
+	 */
 	boolean nullable() default true;
+	/**
+	 * Whether the column is included in SQL INSERT statements generated by the persistence provider.
+	 */
 	boolean insertable() default true;
+	/**
+	 * Whether the column is included in SQL UPDATE statements generated by the persistence provider.
+	 */
 	boolean updatable() default true;
+	/**
+	 * The SQL fragment that is used when generating the DDL for the column.
+	 * Defaults to the generated SQL to create a column of the inferred type.
+	 */
 	String columnDefinition() default "";
+	/**
+	 * The name of the table that contains the column. If absent the column is assumed to
+	 * be in the primary table.
+	 */
 	String table() default "";
+	/**
+	 * The column length. (Applies only if a string-valued column is used.)
+	 */
 	int length() default 255;
-	int precision() default 0; // decimal precision
-	int scale() default 0; // decimal scale
+	/**
+	 * The precision for a decimal (exact numeric) column. (Applies only if a decimal column is used.)
+	 * Value must be set by developer if used when generating the DDL for the column.
+	 */
+	int precision() default 0;
+	/**
+	 * The scale for a decimal (exact numeric) column. (Applies only if a decimal column is used.)
+	 */
+	int scale() default 0;
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/ColumnResult.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/ColumnResult.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/ColumnResult.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -7,9 +7,16 @@
 import java.lang.annotation.RetentionPolicy;
 
 /**
+ * References name of a column in the SELECT clause of a SQL query - i.e.,
+ * column alias, if applicable. Scalar result types can be included in the query
+ * result by specifying this annotation in the metadata.
+ *
  * @author Emmanuel Bernard
  */
 @Target({}) @Retention(RetentionPolicy.RUNTIME)
 public @interface ColumnResult {
+	/**
+	 * The name of a column in the SELECT clause of a SQL query
+	 */
 	String name();
 }
\ No newline at end of file

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/DiscriminatorColumn.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/DiscriminatorColumn.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/DiscriminatorColumn.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -10,12 +10,38 @@
 import static javax.persistence.DiscriminatorType.STRING;
 
 /**
+ * Is used to define the discriminator column for the SINGLE_TABLE and JOINED inheritance
+ * mapping strategies.
+ *
+ * The strategy and the discriminator column are only specified in the root of an entity
+ * class hierarchy or subhierarchy in which a different inheritance strategy is applied
+ *
+ * If the DiscriminatorColumn annotation is missing, and a discriminator column is required,
+ * the name of the discriminator column defaults to "DTYPE" and the discriminator type to
+ * DiscriminatorType.STRING.
+ *
  * @author Emmanuel Bernard
  */
 @Target({TYPE}) @Retention(RUNTIME)
 public @interface DiscriminatorColumn {
+	/**
+	 * The name of column to be used for the discriminator.
+	 */
 	String name() default "DTYPE";
+	/**
+	 * The type of object/column to use as a class discriminator.
+	 * Defaults to DiscriminatorType.STRING
+	 */
 	DiscriminatorType discriminatorType() default STRING;
+	/**
+	 * The SQL fragment that is used when generating the DDL for the discriminator column.
+	 * Defaults to the provider-generated SQL to create a column of the specified
+	 * discriminator type.
+	 */
 	String columnDefinition() default "";
+	/**
+	 * The column length for String-based discriminator types. Ignored for other
+	 * discriminator types.
+	 */
 	int length() default 31;
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/DiscriminatorValue.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/DiscriminatorValue.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/DiscriminatorValue.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -7,9 +7,27 @@
 import static java.lang.annotation.ElementType.TYPE;
 
 /**
+ * Is used to specify the value of the discriminator column for entities of the given type.
+ * The DiscriminatorValue annotation can only be specified on a concrete entity class.
+ * If the DiscriminatorValue annotation is not specified and a discriminator column is used,
+ * a provider-specific function will be used to generate a value representing the entity type.
+ * If the DiscriminatorType is STRING, the discriminator value default is the entity name.
+ *
+ * The inheritance strategy and the discriminator column are only specified in the root
+ * of an entity class hierarchy or subhierarchy in which a different inheritance strategy
+ * is applied. The discriminator value, if not defaulted, should be specified for each entity
+ * class in the hierarchy.
+ *
  * @author Emmanuel Bernard
  */
 @Target({TYPE}) @Retention(RUNTIME)
 public @interface DiscriminatorValue {
+	/**
+	 * The value that indicates that the row is an entity of the annotated entity type.
+	 * 
+	 * If the DiscriminatorValue annotation is not specified and a discriminator column is used,
+	 * a provider-specific function will be used to generate a value representing the entity type.
+	 * If the DiscriminatorType is STRING, the discriminator value default is the entity name.
+	 */
 	String value();
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/Embeddable.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/Embeddable.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/Embeddable.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -10,6 +10,12 @@
 
 
 /**
+ * Defines a class whose instances are stored as an intrinsic part of an owning entity and share
+ * the identity of the entity. Each of the persistent properties or fields of the embedded object
+ * is mapped to the database table for the entity. Only Basic, Column, Lob, Temporal, and
+ * Enumerated mapping annotations may portably be used to map the persistent fields or properties
+ * of classes annotated as Embeddable.
+ *
  * @author Emmanuel Bernard
  */
 @Target({TYPE}) @Retention(RUNTIME)

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/Embedded.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/Embedded.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/Embedded.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -9,6 +9,9 @@
 import static java.lang.annotation.RetentionPolicy.*;
 
 /**
+ * Defines a persistent field or property of an entity whose value is an instance of
+ * an embeddable class. The embeddable class must be annotated as Embeddable.
+ *
  * @author Emmanuel Bernard
  */
 @Target({METHOD, FIELD}) @Retention(RUNTIME)

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/EmbeddedId.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/EmbeddedId.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/EmbeddedId.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -8,6 +8,10 @@
 import java.lang.annotation.Target;
 
 /**
+ * Is applied to a persistent field or property of an entity class or mapped superclass to denote
+ * a composite primary key that is an embeddable class. The embeddable class must be annotated
+ * as Embeddable.
+ * 
  * @author Emmanuel Bernard
  */
 @Target({ElementType.METHOD, ElementType.FIELD})

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/Entity.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/Entity.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/Entity.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -8,9 +8,16 @@
 import java.lang.annotation.Target;
 
 /**
+ * Specifies that the class is an entity. This annotation is applied to the entity class.
+ *
  * @author Emmanuel Bernard
  */
 @Target(TYPE) @Retention(RUNTIME)
 public @interface Entity {
+	/**
+	 * The name of an entity. Defaults to the unqualified name of the entity class.
+	 * This name is used to refer to the entity in queries. The name must not be a
+	 * reserved literal in the Java Persistence query language.
+	 */
 	String name() default "";
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/EntityExistsException.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/EntityExistsException.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/EntityExistsException.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -2,21 +2,43 @@
 package javax.persistence;
 
 /**
+ * Thrown by the persistence provider when EntityManager.persist(Object) is called and the
+ * entity already exists. The current transaction, if one is active, will be marked for rollback.
+ *
  * @author Emmanuel Bernard
  */
 public class EntityExistsException extends PersistenceException {
+	/**
+	 * Constructs a new EntityExistsException exception with null as its detail message.
+	 */
 	public EntityExistsException() {
 		super();
 	}
 
+	/**
+	 * Constructs a new EntityExistsException exception with the specified cause.
+	 *
+	 * @param cause the cause
+	 */
 	public EntityExistsException(Throwable cause) {
 		super( cause );
 	}
 
+	/**
+	 * Constructs a new EntityExistsException exception with the specified detail message.
+	 *
+	 * @param message the detail message.
+	 */
 	public EntityExistsException(String message) {
 		super( message );
 	}
 
+	/**
+	 * Constructs a new EntityExistsException exception with the specified detail message and cause.
+	 *
+	 * @param message the detail message.
+	 * @param cause the cause.
+	 */
 	public EntityExistsException(String message, Throwable cause) {
 		super( message, cause );
 	}

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/EntityListeners.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/EntityListeners.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/EntityListeners.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -13,12 +13,16 @@
 
 
 /**
- * comment
+ * Specifies the callback listener classes to be used for an entity or mapped superclass.
+ * This annotation may be applied to an entity class or mapped superclass.
  *
  * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
  */
 @Target({ElementType.TYPE})
 @Retention(RetentionPolicy.RUNTIME)
 public @interface EntityListeners {
+	/**
+	 * The callback listener classes
+	 */
    Class[] value();
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/EntityNotFoundException.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/EntityNotFoundException.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/EntityNotFoundException.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -2,14 +2,26 @@
 package javax.persistence;
 
 /**
+ * Thrown by the persistence provider when an entity reference obtained by
+ * EntityManager.getReference(Class,Object)  is accessed but the entity does not exist.
+ * Also thrown when EntityManager.refresh(Object) is called and the object no longer exists
+ * in the database. The current transaction, if one is active, will be marked for rollback.
+ *
  * @author Gavin King
  */
 public class EntityNotFoundException extends PersistenceException {
-
+	/**
+	 * Constructs a new EntityNotFoundException exception with null as its detail message.
+	 */
 	public EntityNotFoundException() {
 		super();
 	}
 
+	/**
+	 * Constructs a new EntityNotFoundException exception with the specified detail message.
+	 *
+	 * @param message the detail message
+	 */
 	public EntityNotFoundException(String message) {
 		super( message );
 	}

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/EntityResult.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/EntityResult.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/EntityResult.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -7,11 +7,27 @@
 import java.lang.annotation.RetentionPolicy;
 
 /**
+ * References an entity in the SELECT clause of a SQL query. If this annotation is used,
+ * the SQL statement should select all of the columns that are mapped to the entity object.
+ * This should include foreign key columns to related entities. The results obtained when
+ * insufficient data is available are undefined.
+ *
  * @author Emmanuel Bernard
  */
 @Target({}) @Retention(RetentionPolicy.RUNTIME)
 public @interface EntityResult {
+	/**
+	 * The class of the result
+	 */
 	Class entityClass();
+	/**
+	 * Maps the columns specified in the SELECT list of the query to the properties or
+	 * fields of the entity class.
+	 */
 	FieldResult[] fields() default {};
+	/**
+	 * Specifies the column name (or alias) of the column in the SELECT list that is used to
+	 * determine the type of the entity instance.
+	 */
 	String discriminatorColumn() default "";
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/Enumerated.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/Enumerated.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/Enumerated.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -9,10 +9,16 @@
 import static javax.persistence.EnumType.*;
 
 /**
+ * Specifies that a persistent property or field should be persisted as a enumerated type.
+ * It may be used in conjunction with the Basic annotation.
+ *
  * @author Emmanuel Bernard
  */
 @Target({METHOD, FIELD})
 @Retention(RUNTIME)
 public @interface Enumerated {
+	/**
+	 * The type used in mapping an enum type
+	 */
 	EnumType value() default ORDINAL;
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/ExcludeDefaultListeners.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/ExcludeDefaultListeners.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/ExcludeDefaultListeners.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -7,6 +7,9 @@
 import java.lang.annotation.Target;
 
 /**
+ * Specifies that the invocation of default listeners is to be excluded for the entity class
+ * (or mapped superclass) and its subclasses.
+ *
  * @author Emmanuel Bernard
  */
 @Target(TYPE) @Retention(RUNTIME)

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/ExcludeSuperclassListeners.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/ExcludeSuperclassListeners.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/ExcludeSuperclassListeners.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -7,6 +7,9 @@
 import static java.lang.annotation.ElementType.TYPE;
 
 /**
+ * Specifies that the invocation of superclass listeners is to be excluded for the
+ * entity class (or mapped superclass) and its subclasses.
+ *
  * @author Emmanuel Bernard
  */
 @Target(TYPE) @Retention(RUNTIME)

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/FieldResult.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/FieldResult.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/FieldResult.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -7,10 +7,19 @@
 import java.lang.annotation.RetentionPolicy;
 
 /**
+ * Is used to map the columns specified in the SELECT list of the query to the properties
+ * or fields of the entity class.
+ *
  * @author Emmanuel Bernard
  */
 @Target({}) @Retention(RetentionPolicy.RUNTIME)
 public @interface FieldResult {
+	/**
+	 * Name of the persistent field or property of the class.
+	 */
 	String name();
+	/**
+	 * Name of the column in the SELECT clause - i.e., column aliases, if applicable.
+	 */
 	String column();
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/GeneratedValue.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/GeneratedValue.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/GeneratedValue.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -8,11 +8,25 @@
 import java.lang.annotation.Target;
 
 /**
+ * Provides for the specification of generation strategies for the values of primary keys.
+ * The GeneratedValue annotation may be applied to a primary key property or field of an entity
+ * or mapped superclass in conjunction with the Id annotation.
+ *
  * @author Emmanuel Bernard
  */
 @Target({METHOD, FIELD})
 @Retention(RUNTIME)
 public @interface GeneratedValue {
+	/**
+	 * The primary key generation strategy that the persistence provider must use
+	 * to generate the annotated entity primary key.
+	 */
 	GenerationType strategy() default GenerationType.AUTO;
+	/**
+	 * The name of the primary key generator to use as specified in the SequenceGenerator or
+	 * TableGenerator annotation.
+	 *
+	 * Defaults to the id generator supplied by persistence provider. 
+	 */
 	String generator() default "";
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/GenerationType.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/GenerationType.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/GenerationType.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -3,6 +3,32 @@
 package javax.persistence;
 
 /**
+ * Defines the types of primary key generation.
+ *
  * @author Emmanuel Bernard
  */
-public enum GenerationType { TABLE, SEQUENCE, IDENTITY, AUTO };
+public enum GenerationType {
+	/**
+	 * Indicates that the persistence provider must assign primary keys for the entity using an underlying
+	 * database table to ensure uniqueness.
+	 */
+	TABLE,
+	/**
+	 * Indicates that the persistence provider must assign primary keys for the entity using database
+	 * sequence column.
+	 */
+	SEQUENCE,
+	/**
+	 * Indicates that the persistence provider must assign primary keys for the entity using
+	 * database identity column.
+	 */
+	IDENTITY,
+	/**
+	 * Indicates that the persistence provider should pick an appropriate strategy for the
+	 * particular database. The AUTO generation strategy may expect a database resource
+	 * to exist, or it may attempt to create one. A vendor may provide documentation on how
+	 * to create such resources in the event that it does not support schema generation or cannot
+	 * create the schema resource at runtime.
+	 */
+	AUTO
+};

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/Id.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/Id.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/Id.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -10,6 +10,8 @@
 
 
 /**
+ * Specifies the primary key property or field of an entity.
+ * 
  * @author Emmanuel Bernard
  */
 @Target({METHOD, FIELD}) @Retention(RUNTIME)

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/IdClass.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/IdClass.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/IdClass.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -9,9 +9,18 @@
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**
+ * Specifies a composite primary key class that is mapped to multiple fields or properties
+ * of the entity.
+ *
+ * The names of the fields or properties in the primary key class and the primary key fields
+ * or properties of the entity must correspond and their types must be the same.
+ *
  * @author Emmanuel Bernard
  */
 @Target({TYPE}) @Retention(RUNTIME)
 public @interface IdClass {
+	/**
+	 * Primary key class
+	 */
 	Class value();
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/Inheritance.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/Inheritance.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/Inheritance.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -9,9 +9,15 @@
 import static javax.persistence.InheritanceType.SINGLE_TABLE;
 
 /**
+ * Defines the inheritance strategy to be used for an entity class hierarchy. It is specified
+ * on the entity class that is the root of the entity class hierarchy.
+ *
  * @author Emmanuel Bernard
  */
 @Target({TYPE}) @Retention(RUNTIME)
 public @interface Inheritance {
+	/**
+	 * The strategy to be used
+	 */
 	InheritanceType strategy() default SINGLE_TABLE;
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/InheritanceType.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/InheritanceType.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/InheritanceType.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -3,7 +3,23 @@
 package javax.persistence;
 
 /**
+ * Defines inheritance strategy options.
+ *
  * @author Emmanuel Bernard
  */
 public enum InheritanceType
-{ SINGLE_TABLE, TABLE_PER_CLASS, JOINED };
+{
+	/**
+	 * A single table per class hierarchy
+	 */
+	SINGLE_TABLE,
+	/**
+	 * A table per concrete entity class
+	 */
+	TABLE_PER_CLASS,
+	/**
+	 * A strategy in which fields that are specific to a subclass are mapped to a separate
+	 * table than the fields that are common to the parent class, and a join is performed
+	 * to instantiate the subclass.
+	 */
+	JOINED };

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/JoinTable.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/JoinTable.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/JoinTable.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -9,14 +9,55 @@
 import static java.lang.annotation.RetentionPolicy.*;
 
 /**
+ * This annotation is used in the mapping of associations. It is specified on the owning
+ * side of a many-to-many association, or in a unidirectional one-to-many association.
+ *
+ * If the JoinTable annotation is missing, the default values of the annotation elements apply.
+ * The name of the join table is assumed to be the table names of the associated primary tables
+ * concatenated together (owning side first) using an underscore.
+ *
  * @author Emmanuel Bernard
  */
 @Target({METHOD, FIELD})  @Retention(RUNTIME)
 public @interface JoinTable {
+	/**
+	 * The name of the join table.
+	 *
+	 * Defaults to the concatenated names of the two associated primary entity tables,
+	 * separated by an underscore
+	 */
 	String name() default "";
+	/**
+	 * The catalog of the table.
+	 *
+	 * Defaults to the default catalog.
+	 */
 	String catalog() default "";
+	/**
+	 * The schema of the table.
+	 *
+	 * Defaults to the default schema for user.
+	 */
 	String schema() default "";
+	/**
+	 * The foreign key columns of the join table which reference the primary table of the
+	 * entity owning the association (i.e. the owning side of the association).
+	 *
+	 * Uses the same defaults as for JoinColumn.
+	 */
 	JoinColumn[] joinColumns() default {};
+	/**
+	 * The foreign key columns of the join table which reference the primary table of the entity
+	 * that does not own the association (i.e. the inverse side of the association).
+	 *
+	 * Uses the same defaults as for JoinColumn
+	 */
 	JoinColumn[] inverseJoinColumns() default {};
+	/**
+	 * Unique constraints that are to be placed on the table. These are only used if table
+	 * generation is in effect.
+	 *
+	 * Defaults to no additional constraints
+	 */
 	UniqueConstraint[] uniqueConstraints() default {};
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/Lob.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/Lob.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/Lob.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -12,6 +12,13 @@
 import java.lang.annotation.Retention;
 
 /**
+ * Specifies that a persistent property or field should be persisted as a large object to a
+ * database-supported large object type. The Lob annotation may be used in conjunction with
+ * the Basic annotation. A Lob may be either a binary or character type.
+ *
+ * The Lob type is inferred from the type of the persistent field or property, and except
+ * for string and character-based types defaults to Blob.
+ *  
  * @author Emmanuel Bernard
  */
 @Target({METHOD, FIELD}) @Retention(RUNTIME)

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/LockModeType.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/LockModeType.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/LockModeType.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -2,9 +2,39 @@
 package javax.persistence;
 
 /**
+ * Lock modes that can be specified by means of the EntityManager.lock() method.
+ *
+ * The semantics of requesting locks of type LockModeType.READ and LockModeType.WRITE are t
+ * he following.
+ *
+ * If transaction T1 calls lock(entity, LockModeType.READ) on a versioned object, the entity
+ * manager must ensure that neither of the following phenomena can occur:
+ *
+ * * P1 (Dirty read): Transaction T1 modifies a row. Another transaction T2 then reads
+ * that row and obtains the modified value, before T1 has committed or rolled back.
+ * Transaction T2 eventually commits successfully; it does not matter whether T1 commits or rolls
+ * back and whether it does so before or after T2 commits.
+ *
+ * * P2 (Non-repeatable read): Transaction T1 reads a row. Another transaction T2 then modifies
+ * or deletes that row, before T1 has committed. Both transactions eventually commit successfully.
+ *
+ * Lock modes must always prevent the phenomena P1 and P2.
+ * In addition, calling lock(entity, LockModeType.WRITE) on a versioned object,
+ * will also force an update (increment) to the entity's version column.
+ *
+ * The persistence implementation is not required to support calling EntityManager.lock()
+ * on a non-versioned object. When it cannot support a such lock call, it must
+ * throw the PersistenceException.
+ *
  * @author Emmanuel Bernard
  */
 public enum LockModeType {
+	/**
+	 * Read lock
+	 */
 	READ,
+	/**
+	 * Write lock
+	 */
 	WRITE
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/ManyToMany.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/ManyToMany.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/ManyToMany.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -10,12 +10,42 @@
 import static javax.persistence.FetchType.*;
 
 /**
+ * Defines a many-valued association with many-to-many multiplicity. If the Collection is
+ * defined using generics to specify the element type, the associated target entity class
+ * does not need to be specified; otherwise it must be specified.
+ *
+ * Every many-to-many association has two sides, the owning side and the non-owning, or inverse,
+ * side. The join table is specified on the owning side. If the association is bidirectional,
+ * either side may be designated as the owning side.
+ *
+ * The same annotation elements for the OneToMany annotation apply to the ManyToMany annotation.
+ *
  * @author Emmanuel Bernard
  */
 @Target({METHOD, FIELD}) @Retention(RUNTIME)
 public @interface ManyToMany {
+	/**
+	 * The entity class that is the target of the association. Optional only if the
+	 * collection property is defined using Java generics. Must be specified otherwise.
+	 *
+	 * Defaults to the parameterized type of the collection when defined using generics.
+	 */
 	Class targetEntity() default void.class;
+	/**
+	 * The operations that must be cascaded to the target of the association.
+	 *
+	 * Defaults to no operations being cascaded.
+	 */
 	CascadeType[] cascade() default {};
+	/**
+	 * Whether the association should be lazily loaded or must be eagerly fetched.
+	 * The EAGER strategy is a requirement on the persistenceprovider runtime that
+	 * the associatedentities must be eagerly fetched. The LAZY strategy is a hint
+	 * to the persistence provider runtime.
+	 */
 	FetchType fetch() default LAZY;
+	/**
+	 * The field that owns the relationship. Required unless the relationship is unidirectional.
+	 */
 	String mappedBy() default "";
 }
\ No newline at end of file

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/ManyToOne.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/ManyToOne.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/ManyToOne.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -10,12 +10,35 @@
 import static javax.persistence.FetchType.*;
 
 /**
+ * This annotation defines a single-valued association to another entity class that has
+ * many-to-one multiplicity. It is not normally necessary to specify the target entity
+ * explicitly since it can usually be inferred from the type of the object being referenced.
+ *
  * @author Emmanuel Bernard
  */
 @Target({METHOD, FIELD}) @Retention(RUNTIME)
 public @interface ManyToOne {
+	/**
+	 * The entity class that is the target of the association.
+	 *
+	 * Defaults to the type of the field or property that stores the association
+	 */
 	Class targetEntity() default void.class;
+	/**
+	 * The operations that must be cascaded to the target of the association.
+	 *
+	 * By default no operations are cascaded.
+	 */
 	CascadeType[] cascade() default {};
+	/**
+	 * Whether the association should be lazily loaded or must be eagerly fetched.
+	 * The EAGER strategy is a requirement on the persistence provider runtime that
+	 * the associated entity must be eagerly fetched. The LAZY strategy is a hint to
+	 * the persistence provider runtime.
+	 */
 	FetchType fetch() default EAGER;
+	/**
+	 * Whether the association is optional. If set to false then a non-null relationship must always exist.
+	 */
 	boolean optional() default true;
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/MapKey.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/MapKey.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/MapKey.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -7,9 +7,19 @@
 import java.lang.annotation.Retention;
 
 /**
+ * Is used to specify the map key for associations of type Map.
+ * If a persistent field or property other than the primary key is used as a map key then it
+ * is expected to have a uniqueness constraint associated with it.
+ *
  * @author Emmanuel Bernard
  */
 @Target({METHOD, FIELD}) @Retention(RUNTIME)
 public @interface MapKey {
-	String name() default "";  // name of persistent field or property of map key
+	/**
+	 * The name of the persistent field or property of the associated entity that is used as the map key.
+	 * If the name element is not specified, the primary key of the associated entity is used as the map key.
+	 * If the primary key is a composite primary key and is mapped as IdClass, an instance of the primary key
+	 * class is used as the key.
+	 */
+	String name() default "";
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/MappedSuperclass.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/MappedSuperclass.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/MappedSuperclass.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -9,6 +9,16 @@
 import static java.lang.annotation.RetentionPolicy.*;
 
 /**
+ * Designates a class whose mapping information is applied to the entities that inherit
+ * from it. A mapped superclass has no separate table defined for it.
+ *
+ * A class designated with the MappedSuperclass annotation can be mapped in the same way as
+ * an entity except that the mappings will apply only to its subclasses since no table exists
+ * for the mapped superclass itself. When applied to the subclasses the inherited mappings will
+ * apply in the context of the subclass tables. Mapping information may be overridden in such
+ * subclasses by using the AttributeOverride and AssociationOverride annotations or corresponding *
+ * XML elements.
+ *  
  * @author Emmanuel Bernard
  */
 @Target(TYPE) @Retention(RUNTIME)

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/OneToMany.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/OneToMany.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/OneToMany.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -10,12 +10,38 @@
 import static javax.persistence.FetchType.*;
 
 /**
+ * Defines a many-valued association with one-to-many multiplicity.
+ *
+ * If the collection is defined using generics to specify the element type,
+ * the associated target entity type need not be specified; otherwise the target
+ * entity class must be specified.
+ *
  * @author Emmanuel Bernard
  */
 @Target({METHOD, FIELD}) @Retention(RUNTIME)
 public @interface OneToMany {
+	/**
+	 * The entity class that is the target of the association. Optional only if the collection
+	 * property is defined using Java generics. Must be specified otherwise.
+	 *
+	 * Defaults to the parameterized type of the collection when defined using generics.
+	 */
 	Class targetEntity() default void.class;
+	/**
+	 * The operations that must be cascaded to the target of the association.
+	 *
+	 * Defaults to no operations being cascaded.
+	 */
 	CascadeType[] cascade() default {};
+	/**
+	 * Whether the association should be lazily loaded or must be eagerly fetched.
+	 * The EAGER strategy is a requirement on the persistenceprovider runtime that the
+	 * associatedentities must be eagerly fetched. The LAZY strategy is a hint to the
+	 * persistence provider runtime.
+	 */
 	FetchType fetch() default LAZY;
+	/**
+	 * The field that owns the relationship. Required unless the relationship is unidirectional.
+	 */
 	String mappedBy() default "";
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/OneToOne.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/OneToOne.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/OneToOne.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -10,13 +10,42 @@
 import static javax.persistence.FetchType.*;
 
 /**
+ * This annotation defines a single-valued association to another entity that has
+ * one-to-one multiplicity. It is not normally necessary to specify the associated
+ * target entity explicitly since it can usually be inferred from the type of the object
+ * being referenced.
+ *
  * @author Emmanuel Bernard
  */
 @Target({METHOD, FIELD}) @Retention(RUNTIME)
 public @interface OneToOne {
+	/**
+	 * The entity class that is the target of the association.
+	 *
+	 * Defaults to the type of the field or property that stores the association.
+	 */
 	Class targetEntity() default void.class;
+	/**
+	 * The operations that must be cascaded to the target of the association.
+	 *
+	 * By default no operations are cascaded.
+	 */
 	CascadeType[] cascade() default {};
+	/**
+	 * Whether the association should be lazily loaded or must be eagerly fetched.
+	 * The EAGER strategy is a requirement on the persistence provider runtime that
+	 * the associated entity must be eagerly fetched. The LAZY strategy is a hint to
+	 * the persistence provider runtime.
+	 */
 	FetchType fetch() default EAGER;
+	/**
+	 * Whether the association is optional. If set to false then a non-null relationship must
+	 * always exist.
+	 */
 	boolean optional() default true;
+	/**
+	 * The field that owns the relationship. This element is only specified on the
+	 * inverse (non-owning) side of the association.
+	 */
 	String mappedBy() default "";
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/OrderBy.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/OrderBy.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/OrderBy.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -8,9 +8,32 @@
 import static java.lang.annotation.RetentionPolicy.*;
 
 /**
+ * This annotation specifies the ordering of the elements of a collection valued association at the
+ * point when the association is retrieved.
+ *
+ * The syntax of the value ordering element is an orderby_list, as follows:
+ *   <code>orderby_list::= orderby_item [,orderby_item]*
+ *  orderby_item::= property_or_field_name [ASC | DESC]</code>
+ *
+ * If ASC or DESC is not specified, ASC (ascending order) is assumed.
+ *
+ * If the ordering element is not specified, ordering by the primary key of the associated
+ * entity is assumed.
+ *
+ * The property or field name must correspond to that of a persistent property or field of the
+ * associated class. The properties or fields used in the ordering must correspond to columns
+ * for which comparison operators are supported.
+ *
  * @author Emmanuel Bernard
  */
 @Target({METHOD, FIELD}) @Retention(RUNTIME)
 public @interface OrderBy {
+	/**
+	 * An orderby_list, specified as follows:
+	 * orderby_list::= orderby_item [,orderby_item]* orderby_item::= property_or_field_name [ASC | DESC]
+	 *
+	 * If ASC or DESC is not specified, ASC (ascending order) is assumed.
+	 *
+	 */
 	String value() default "";
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/PersistenceContext.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/PersistenceContext.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/PersistenceContext.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -1,5 +1,5 @@
-/*
- * JBoss, the OpenSource J2EE webOS
+/* $Id$
+ * JBoss Inc
  *
  * Distributable under LGPL license.
  * See terms of license at gnu.org.
@@ -25,17 +25,19 @@
 	 */
 	String name() default "";
 	/**
-	 * The name of the persistence unit. If the unitName element is specified, the persistence unit for the
-	 * entity manager that is accessible in JNDI must have the same name.
+	 * The name of the persistence unit. If the unitName element is specified, the persistence unit
+	 * for the entity manager that is accessible in JNDI must have the same name.
 	 */
 	String unitName() default "";
 	/**
-	 * Used to specify properties for the container or persistence provider. Vendor specific properties may be included
-	 * in this set of properties. Properties that are not recognized by a vendor are ignored.
+	 * Used to specify properties for the container or persistence provider. Vendor specific
+	 * properties may be included in this set of properties. Properties that are not
+	 * recognized by a vendor are ignored.
 	 */
 	PersistenceProperty[] properties() default {};
 	/**
-	 * Specifies whether this is a transaction-scoped persistence context or an extended persistence context.
+	 * Specifies whether this is a transaction-scoped persistence context or
+	 * an extended persistence context.
 	 */
 	PersistenceContextType type() default PersistenceContextType.TRANSACTION;
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/PersistenceContextType.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/PersistenceContextType.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/PersistenceContextType.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -1,7 +1,18 @@
 //$Id$
 package javax.persistence;
 
+/**
+ * Specifies whether a transaction-scoped or extended persistence context is to be used in
+ * PersistenceContext. If the type element is not specified, a transaction-scoped persistence
+ * context is used.
+ */
 public enum PersistenceContextType {
-	  TRANSACTION,
-	  EXTENDED
+	/**
+	 * Transaction-scoped persistence context
+	 */
+	TRANSACTION,
+	/**
+	 * Extended persistence context
+	 */
+	EXTENDED
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/PersistenceContexts.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/PersistenceContexts.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/PersistenceContexts.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -1,5 +1,5 @@
-/*
- * JBoss, the OpenSource J2EE webOS
+/* $Id$
+ * JBoss Inc
  *
  * Distributable under LGPL license.
  * See terms of license at gnu.org.
@@ -12,14 +12,16 @@
 import java.lang.annotation.Target;
 
 /**
- * Comment
+ * Declares one or more PersistenceContext annotations. It is used to express a dependency on
+ * container-managed entity manager persistence contexts.
  *
  * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision$
  */
- at Target({ ElementType.TYPE })
+ at Target({ElementType.TYPE})
 @Retention(RetentionPolicy.RUNTIME)
-public @interface PersistenceContexts
-{
-   PersistenceContext[] value();
+public @interface PersistenceContexts {
+	/**
+	 * One or more persistence context
+	 */
+	PersistenceContext[] value();
 }

Modified: trunk/HibernateExt/ejb-api/src/javax/persistence/spi/PersistenceUnitTransactionType.java
===================================================================
--- trunk/HibernateExt/ejb-api/src/javax/persistence/spi/PersistenceUnitTransactionType.java	2006-09-06 00:05:28 UTC (rev 10455)
+++ trunk/HibernateExt/ejb-api/src/javax/persistence/spi/PersistenceUnitTransactionType.java	2006-09-06 04:01:34 UTC (rev 10456)
@@ -3,7 +3,8 @@
 package javax.persistence.spi;
 
 /**
- * This enum class defines whether the entity managers created by the EntityManagerFactory will be JTA or resource-local entity managers.
+ * This enum class defines whether the entity managers created by the EntityManagerFactory will be
+ * JTA or resource-local entity managers.
  *
  * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
  */




More information about the hibernate-commits mailing list