From jdo-commits-return-1839-apmail-db-jdo-commits-archive=www.apache.org@db.apache.org Wed Jul 18 17:00:10 2007 Return-Path: Delivered-To: apmail-db-jdo-commits-archive@www.apache.org Received: (qmail 87036 invoked from network); 18 Jul 2007 17:00:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jul 2007 17:00:09 -0000 Received: (qmail 47472 invoked by uid 500); 18 Jul 2007 16:59:57 -0000 Mailing-List: contact jdo-commits-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-commits@db.apache.org Received: (qmail 47449 invoked by uid 99); 18 Jul 2007 16:59:56 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jul 2007 09:59:56 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jul 2007 09:59:52 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 289C61A981A; Wed, 18 Jul 2007 09:59:32 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r557331 - /db/jdo/trunk/api2/src/java/javax/jdo/annotations/ Date: Wed, 18 Jul 2007 16:58:38 -0000 To: jdo-commits@db.apache.org From: clr@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070718165932.289C61A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: clr Date: Wed Jul 18 09:58:32 2007 New Revision: 557331 URL: http://svn.apache.org/viewvc?view=rev&rev=557331 Log: JDO-403 Added generateForeignKey and foreignKey to Element, Key, Value Added uniqueKey and index to Element, Key, Value Added generatePrimaryKey and primaryKey to Join Updated javadoc M annotations/Join.java M annotations/Extensions.java M annotations/PersistenceAware.java M annotations/Query.java M annotations/FetchGroup.java M annotations/Unique.java M annotations/NullValue.java M annotations/Implements.java M annotations/Joins.java M annotations/Field.java M annotations/Property.java M annotations/ForeignKeys.java M annotations/Version.java M annotations/IdGeneratorStrategy.java M annotations/Embedded.java M annotations/Serialized.java M annotations/ForeignKey.java M annotations/Transactional.java M annotations/Index.java M annotations/Discriminator.java M annotations/Transient.java M annotations/Order.java M annotations/Value.java M annotations/Queries.java M annotations/Indices.java M annotations/Key.java M annotations/Inheritance.java M annotations/Element.java M annotations/Uniques.java M annotations/PrimaryKey.java M annotations/Column.java Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Column.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/Discriminator.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/Element.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/Embedded.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/Extensions.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchGroup.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/Field.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKey.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKeys.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/IdGeneratorStrategy.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/Implements.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/Index.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/Indices.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/Inheritance.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/Join.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/Joins.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/Key.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/NullValue.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/Order.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/PersistenceAware.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/PrimaryKey.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/Property.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/Queries.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/Query.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/Serialized.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/Transactional.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/Transient.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/Unique.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/Uniques.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/Value.java db/jdo/trunk/api2/src/java/javax/jdo/annotations/Version.java Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Column.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Column.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Column.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Column.java Wed Jul 18 09:58:32 2007 @@ -34,61 +34,65 @@ { /** * Name of the column. - * @return Name of the column + * @return the name of the column */ String name() default ""; /** - * Target column for this column when part of a foreign key relation. - * @return Target column for this column when part of a foreign key relation. + * Target column for this column in the other table when part of a + * foreign key relation. + * @return the target column in the other table for this column + * when part of a foreign key relation. */ String target() default ""; /** - * Target field for this column when part of a bidirectional relation. - * @return Target field for this column when part of a bidirectional relation. + * Target field in the other class or interface for this column + * when part of a bidirectional relation. + * @return the target field for this column when part of + * a bidirectional relation. */ String targetField() default ""; /** - * JDBC Type for this column - * @return JDBC Type for this column + * JDBC Type for this column. + * @return JDBC type for this column */ String jdbcType() default ""; /** - * SQL Type for this column - * @return SQL Type for this column + * SQL Type for this column. + * @return SQL type for this column */ String sqlType() default ""; /** - * Maximum length of data stored in this column - * @return Maximum length of data stored in this column + * Maximum length of data stored in this column. + * @return the maximum length of data stored in this column */ int length() default -1; /** - * Scale for the column when handling floating point values - * @return Scale for the column when handling floating point values + * Scale for the column when handling floating point values. + * @return the scale for the column when handling floating point values */ int scale() default -1; /** - * Whether the column allows nulls to be inserted. - * @return Whether the column allows nulls to be inserted. + * Whether the column allows null values to be inserted. + * @return whether the column allows null values to be inserted */ String allowsNull() default ""; /** - * Default value for this column - * @return Default value for this column + * Default value for this column. + * @return the default value for this column */ String defaultValue() default ""; /** * Value to be inserted when this is an "unmapped" column - * @return Value to be inserted when this is an "unmapped" column + * @return the value to be inserted when this is an "unmapped" column */ String insertValue() default ""; } Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Discriminator.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Discriminator.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Discriminator.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Discriminator.java Wed Jul 18 09:58:32 2007 @@ -35,20 +35,20 @@ /** * Strategy to use for discriminator. The discriminator determines * the class associated with a row in the datastore. - * @return Strategy to use for discriminator. + * @return the strategy to use for discriminator */ DiscriminatorStrategy strategy() default DiscriminatorStrategy.UNKNOWN; /** * Whether the discriminator is indexed. - * @return Whether the discriminator is indexed. + * @return whether the discriminator is indexed */ String indexed() default ""; /** * Name of the column for the discriminator - * @return Name of the column for the discriminator + * @return the name of the column for the discriminator */ String column() default ""; @@ -56,13 +56,13 @@ * The value for the discriminator for objects of this class * when using "value-map" strategy. * @return The value for the discriminator for objects of this class - * when using "value-map" strategy. + * when using "value-map" strategy */ String value() default ""; /** * The column(s) making up the discriminator. - * @return The column(s) making up the discriminator. + * @return the column(s) making up the discriminator */ Column[] columns() default {}; } Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Element.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Element.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Element.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Element.java Wed Jul 18 09:58:32 2007 @@ -44,78 +44,101 @@ * Types of the elements. This is used as an alternative to "type" when * the implementation supports specification of multiple element types. * If "type" is specified then this is ignored. - * @return The types of elements + * @return the types of elements */ Class[] types() default {}; /** - * Whether the element is to be stored serialised (into a join table) - * @return Whether the element is to be stored serialised + * Whether the element is to be stored serialized (into a join table) + * @return whether the element is to be stored serialized * (into a join table) */ String serialized() default ""; /** - * Whether the element is to be stored embedded (into a join table) - * @return Whether the element is to be stored embedded (into a join table) + * Whether the element is to be stored embedded (into a join table). + * @return whether the element is to be stored embedded (into a join table) */ String embedded() default ""; /** * Whether the element is dependent on the owner, and will be deleted - * when the owner is deleted - * @return Whether the element is dependent on the owner, and will be + * when the owner is deleted. + * @return whether the element is dependent on the owner, and will be * deleted when the owner is deleted */ String dependent() default ""; /** - * Name of the table for the element - * @return Name of the table for the element + * Name of the table for the element. + * @return name of the table for the element */ String table() default ""; /** - * Name of the column to store the element in - * @return Name of the column to store the element in + * Name of the column to store the element in. + * @return name of the column to store the element in */ String column() default ""; /** - * Delete action to apply to any foreign-key for the element - * @return Delete action to apply to any foreign-key for the element + * Delete action to apply to any foreign key for the element. + * @return delete action to apply to any foreign key for the element */ ForeignKeyAction deleteAction() default ForeignKeyAction.UNKNOWN; /** - * Update action to apply to any foreign-key for the element - * @return Update action to apply to any foreign-key for the element + * Update action to apply to any foreign key for the element + * @return update action to apply to any foreign key for the element */ ForeignKeyAction updateAction() default ForeignKeyAction.UNKNOWN; /** - * Whether the element column(s) should be indexed. - * @return Whether the element column(s) should be indexed. + * Whether the value column(s) should be indexed. + * @return whether the value column(s) should be indexed. */ String indexed() default ""; + /** The name of the index to generate. + * @return the name of the index + */ + String index() default ""; + /** - * Whether the element column(s) contents are unique - * @return Whether the element column(s) contents are unique + * Whether a unique constraint should be generated or assumed. + * @return whether a unique constraint should be generated or assumed */ String unique() default ""; /** + * The name of the unique key constraint to generate. + * @return the name of the unique key constraint + */ + String uniqueKey() default ""; + + /** * Name of the field in the target class that forms a bidirectional * relationship with this field. - * @return Name of the field in the target class that forms a bidirectional + * @return name of the field in the target class that forms a bidirectional * relationship with this field */ String mappedBy() default ""; /** * The column(s) for the element. - * @return The column(s) for the element. + * @return the column(s) for the element */ Column[] columns() default {}; + + /** Generate or assume a foreign key constraint exists on the column + * or columns associated with this join. Specify "true" or "false". + * @return whether to generate or assume a primary key constraint + */ + String generateForeignKey() default ""; + + /** Name for a generated primary key constraint. + * @return the name of the generated primary key constraint + */ + String foreignKey() default ""; + } Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Embedded.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Embedded.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Embedded.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Embedded.java Wed Jul 18 09:58:32 2007 @@ -51,10 +51,12 @@ String nullIndicatorValue() default ""; /** Field definitions for this embedding. + * @return the fields embedded in the field or property being annotated */ Field[] fields() default {}; /** Property definitions for this embedding. - */ + * @return the properties embedded in the field or property being annotated + */ Property[] properties() default {}; } Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Extensions.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Extensions.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Extensions.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Extensions.java Wed Jul 18 09:58:32 2007 @@ -33,7 +33,7 @@ { /** * The extensions. - * @return The extensions + * @return the extensions */ Extension[] value(); } Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchGroup.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchGroup.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchGroup.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchGroup.java Wed Jul 18 09:58:32 2007 @@ -34,20 +34,20 @@ { /** * Name of the fetch group. - * @return the name of the fetch group. + * @return the name of the fetch group */ String name() default ""; /** * Whether we should load this group as part of the post load process. - * @return Whether we should load this group as part of the post load + * @return whether we should load this group as part of the post load * process. */ String postLoad() default ""; /** - * Field definition for the fetch group - * @return Field definition for the fetch group + * Field definition for the fetch group. + * @return field definition for the fetch group */ FetchField[] fields(); Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Field.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Field.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Field.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Field.java Wed Jul 18 09:58:32 2007 @@ -84,7 +84,7 @@ String sequence() default ""; /** Name of the fetch-group to use when this field is loaded - * due to being referenced when not already loaded + * due to being referenced when not already loaded. * @return the name of the load fetch group */ String loadFetchGroup() default ""; @@ -128,7 +128,10 @@ */ String nullIndicatorColumn() default ""; - /** Name of the field when this is embedded in another object. + /** Name of the field when this is embedded in another object. + * The fully-qualified field name is used. For example, + * "line.point.x" refers to the field x in class Point that is embedded + * in class Line that is embedded in a field called line. * @return the name of the field */ String name() default ""; Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKey.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKey.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKey.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKey.java Wed Jul 18 09:58:32 2007 @@ -28,30 +28,49 @@ * @version 2.1 * @since 2.1 */ -@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) public @interface ForeignKey { - /** Name of the foreign-key. */ + /** Name of the foreign key. + * @return the name of the foreign key + */ String name() default ""; - /** Table for the foreign-key. */ + /** Table for the foreign key. This is needed iff annotating a type where + * the foreign key is not defined on the primary table for the type. + * @return the table on which the foreign key is defined + */ String table() default ""; - /** Whether this foreign-key is deferred */ + /** Whether this foreign key is deferred + * (constraint is checked only at commit). + * @return whether this foreign key is deferred + */ String deferred() default ""; - /** Whether this foreign-key is unique */ + /** Whether this foreign key is unique. + * @return whether this foreign key is unique + */ String unique() default ""; - /** The delete action of this FK */ + /** The delete action of this foreign key. + * @return the delete action of this foreign key + */ ForeignKeyAction deleteAction() default ForeignKeyAction.RESTRICT; - /** The update action of this FK */ + /** The update action of this foreign key. + * @return the update action of this foreign key + */ ForeignKeyAction updateAction() default ForeignKeyAction.RESTRICT; - /** Field names that comprise this index. */ + /** Field names that comprise this foreign key. + * @return the field names that comprise this foreign key + */ String[] fields() default {}; - /** Columns that comprise this index. */ + /** Columns that comprise this foreign key. + * @return the columns that comprise this foreign key + */ Column[] columns() default {}; } Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKeys.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKeys.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKeys.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKeys.java Wed Jul 18 09:58:32 2007 @@ -27,7 +27,8 @@ * @version 2.1 * @since 2.1 */ -@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) public @interface ForeignKeys { /** Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/IdGeneratorStrategy.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/IdGeneratorStrategy.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/IdGeneratorStrategy.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/IdGeneratorStrategy.java Wed Jul 18 09:58:32 2007 @@ -31,5 +31,4 @@ INCREMENT, UUIDSTRING, UUIDHEX - // Allow for implementations own types ... e.g add CUSTOM as an option }; Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Implements.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Implements.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Implements.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Implements.java Wed Jul 18 09:58:32 2007 @@ -28,9 +28,13 @@ * @version 2.1 * @since 2.1 */ -@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) public @interface Implements { - /** Interfaces implemented by this PersistenceCapable (class names of the interfaces). */ + /** Interfaces implemented by this PersistenceCapable (class names + * of the interfaces). + * @return the names of interfaces implemented by the class + */ String[] value(); } Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Index.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Index.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Index.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Index.java Wed Jul 18 09:58:32 2007 @@ -28,21 +28,30 @@ * @version 2.1 * @since 2.1 */ -@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) public @interface Index { - /** Name of the index */ + /** Name of the index + * @return the name of the index + */ String name() default ""; - /** Table for the index (if required). */ + /** Table for the index. This is needed iff annotating a type where + * the index is not defined on the primary table for the type. + * @return the table on which the index is defined + */ String table() default ""; - /** Whether this index is unique */ + /** Whether this index is unique + */ String unique() default ""; - /** Field names that comprise this index. */ + /** Field names that comprise this index. + */ String[] fields() default {}; - /** Columns that comprise this index. */ + /** Columns that comprise this index. + */ Column[] columns() default {}; } Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Indices.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Indices.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Indices.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Indices.java Wed Jul 18 09:58:32 2007 @@ -27,7 +27,8 @@ * @version 2.1 * @since 2.1 */ -@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) public @interface Indices { /** Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Inheritance.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Inheritance.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Inheritance.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Inheritance.java Wed Jul 18 09:58:32 2007 @@ -28,9 +28,13 @@ * @version 2.1 * @since 2.1 */ -@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) public @interface Inheritance { - /** Strategy to use for inheritance. Relates to where the data for the class is stored. */ + /** Strategy to use for inheritance. Specifies where the data for + * the class is stored. + * @return the inheritance strategy + */ InheritanceStrategy strategy(); } Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Join.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Join.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Join.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Join.java Wed Jul 18 09:58:32 2007 @@ -28,27 +28,76 @@ * @version 2.1 * @since 2.1 */ -@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) public @interface Join { - /** Table to join to (used when joining to secondary tables). */ + /** Table to join to (used when joining to secondary tables). + * @return the table + */ String table() default ""; - /** Name of the column in the join table. */ + /** Name of the column in the join table. + * @return the name of the column in the join table + */ String column() default ""; - /** Whether the join column is indexed. */ + /** Whether the join column is indexed. + * @return whether the join column(s) is(are) indexed + */ String indexed() default ""; - /** Whether the join column is unique */ + /** The name of the index to generate. + * @return the name of the index + */ + String index() default ""; + + /** Whether the join column is unique + * @return whether the join column(s) is(are) is unique + */ String unique() default ""; - /** Whether to use an outer join. */ + /** + * The name of the unique key constraint to generate. + * @return the name of the unique key constraint + */ + String uniqueKey() default ""; + + /** Whether to use an outer join. + * @return whether to use an outer join + */ String outer() default ""; - /** Delete action to be applied to any ForeignKey on this join. */ + /** Delete action to be applied to any ForeignKey on this join. + * @return the delete action + */ ForeignKeyAction deleteAction() default ForeignKeyAction.UNKNOWN; - /** Detail definition of the join column(s). */ + /** Detail definition of the join column(s). This is needed for + * more than one join column. + * @return the join columns + */ Column[] columns() default {}; + + /** Generate or assume a primary key constraint exists on the column + * or columns associated with this join. Specify "true" or "false". + * @return whether to generate or assume a primary key constraint + */ + String generatePrimaryKey() default ""; + + /** Name for a generated primary key constraint. + * @return the name of the generated primary key constraint + */ + String primaryKey() default ""; + + /** Generate or assume a foreign key constraint exists on the column + * or columns associated with this join. Specify "true" or "false". + * @return whether to generate or assume a primary key constraint + */ + String generateForeignKey() default ""; + + /** Name for a generated primary key constraint. + * @return the name of the generated primary key constraint + */ + String foreignKey() default ""; } Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Joins.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Joins.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Joins.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Joins.java Wed Jul 18 09:58:32 2007 @@ -27,12 +27,16 @@ * @version 2.1 * @since 2.1 */ -@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) public @interface Joins { /** - * The join definitions - * @return The join definitions + * The join definitions used for the mapping of this type. Joins for + * secondary tables are usually defined at the type level and not the + * field or property level. This allows multiple fields and properties + * to share the same join definition and avoid redundancies. + * @return the join definitions */ Join[] value(); } Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Key.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Key.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Key.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Key.java Wed Jul 18 09:58:32 2007 @@ -29,85 +29,114 @@ * @version 2.1 * @since 2.1 */ -@Target({ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.FIELD, ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) public @interface Key { /** - * The type of the key. This can be determined if using JDK1.5 generics but is required otherwise. - * @return The type of the key. + * The type of the key. This can be determined if using JDK1.5 generics + * but is required otherwise. + * @return the type of the key */ Class type() default void.class; /** - * Types of the keys. This is used as an alternative to "type" when the implementation supports - * specification of multiple key types. If "type" is specified then this is ignored. - * @return The types of keys + * Types of the keys. This is used as an alternative to "type" when the + * implementation supports specification of multiple key types. + * If "type" is specified then this is ignored. + * @return the types of keys */ Class[] types() default {}; /** - * Whether the key is to be stored serialised (into a join table) - * @return Whether the key is to be stored serialised (into a join table) + * Whether the key is to be stored serialized (into a single column of a + * join table). + * @return whether the key is to be stored serialized */ String serialized() default ""; /** - * Whether the key is to be stored embedded (into a join table) - * @return Whether the key is to be stored embedded (into a join table) + * Whether the key is to be stored embedded (into one or several columns + * of a join table). + * @return whether the key is to be stored embedded (into a join table) */ String embedded() default ""; /** - * Whether the key is dependent on the owner (and so will be deleted when it is) - * @return Whether the key is dependent on the owner (and so will be deleted when it is) + * Whether the key is dependent on the owner (and will be deleted + * when the owner is deleted). + * @return whether the key is dependent on the owner */ String dependent() default ""; /** - * Name of the table for the key - * @return Name of the table for the key + * Name of the table for the key. + * @return name of the table for the key */ String table() default ""; /** - * Name of the column to store the key in - * @return Name of the column to store the key in + * Name of the column to store the key in. + * @return name of the column to store the key in */ String column() default ""; /** - * Delete action to apply to any foreign-key for the key - * @return Delete action to apply to any foreign-key for the key + * Delete action to apply to the foreign key for the key. + * @return delete action to apply to the foreign key for the key */ ForeignKeyAction deleteAction() default ForeignKeyAction.UNKNOWN; /** - * Update action to apply to any foreign-key for the key - * @return Update action to apply to any foreign-key for the key + * Update action to apply to the foreign key for the key. + * @return update action to apply to the foreign key for the key */ ForeignKeyAction updateAction() default ForeignKeyAction.UNKNOWN; /** - * Whether the key column(s) should be indexed. - * @return Whether the key column(s) should be indexed. + * Whether the value column(s) should be indexed. + * @return whether the value column(s) should be indexed. */ String indexed() default ""; + /** The name of the index to generate. + * @return the name of the index + */ + String index() default ""; + /** - * Whether the key column(s) contents should be considered unique - * @return Whether the key column(s) contents should be considered unique + * Whether the element column(s) contents should be considered unique + * @return whether the element column(s) contents should be considered unique */ String unique() default ""; /** + * The name of the unique key constraint to generate. + * @return the name of the unique key constraint + */ + String uniqueKey() default ""; + + /** * Name of a field in the value class where this key value is stored. - * @return Name of a field in the value where this key is stored + * @return the name of a field in the value where this key is stored */ String mappedBy() default ""; /** * The column(s) for the key - * @return The column(s) for the key + * @return the column(s) for the key */ Column[] columns() default {}; + + /** Generate or assume a foreign key constraint exists on the column + * or columns associated with this join. Specify "true" or "false". + * @return whether to generate or assume a primary key constraint + */ + String generateForeignKey() default ""; + + /** Name for a generated primary key constraint. + * @return the name of the generated primary key constraint + */ + String foreignKey() default ""; + } Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/NullValue.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/NullValue.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/NullValue.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/NullValue.java Wed Jul 18 09:58:32 2007 @@ -17,7 +17,7 @@ package javax.jdo.annotations; /** - * Enumeration of the JDO2 "null-value" behaviour values. + * Enumeration of the JDO2 "null-value" behavior values. * * @version 2.1 * @since 2.1 Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Order.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Order.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Order.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Order.java Wed Jul 18 09:58:32 2007 @@ -28,15 +28,24 @@ * @version 2.1 * @since 2.1 */ -@Target({ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.FIELD, ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) public @interface Order { - /** The name of the column to use for the ordering column (1-N relations). */ + /** The name of the column to use for the ordering column (1-N and M-N + * relations). + * @return the name of the ordering column + */ String column() default ""; - /** Name of a field in the target object that acts as the ordering for this Collection/List. */ + /** Name of a field or property in the target class that acts as the + * ordering field or property for this Collection/List/Array. + * Return the name of the field or property in the target class + */ String mappedBy() default ""; - /** The definition of the column(s) to use for ordering. */ + /** The definition of the column(s) to use for ordering. + * @return the columns to use for ordering + */ Column[] columns() default {}; } Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/PersistenceAware.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/PersistenceAware.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/PersistenceAware.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/PersistenceAware.java Wed Jul 18 09:58:32 2007 @@ -27,7 +27,8 @@ * @version 2.1 * @since 2.1 */ -@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) public @interface PersistenceAware { } Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/PrimaryKey.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/PrimaryKey.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/PrimaryKey.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/PrimaryKey.java Wed Jul 18 09:58:32 2007 @@ -29,24 +29,25 @@ * @version 2.1 * @since 2.1 */ -@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) public @interface PrimaryKey { /** * Name of the primary key constraint - * @return Name of the primary key constraint + * @return the name of the primary key constraint */ String name() default ""; /** * Name of the column to use for the primary key - * @return Name of the column to use for the primary key + * @return the name of the column to use for the primary key */ String column() default ""; /** * The column(s) for the primary key - * @return The column(s) for the primary key + * @return the column(s) for the primary key */ Column[] columns() default {}; } Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Property.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Property.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Property.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Property.java Wed Jul 18 09:58:32 2007 @@ -27,7 +27,8 @@ * @version 2.1 * @since 2.1 */ -@Target({ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.FIELD, ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) public @interface Property { /** Modifier for this property. Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Queries.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Queries.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Queries.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Queries.java Wed Jul 18 09:58:32 2007 @@ -27,7 +27,8 @@ * @version 2.1 * @since 2.1 */ -@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) public @interface Queries { /** Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Query.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Query.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Query.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Query.java Wed Jul 18 09:58:32 2007 @@ -28,24 +28,37 @@ * @version 2.1 * @since 2.1 */ -@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) public @interface Query { - /** Name of the query (mandatory) */ + /** Name of the query (mandatory) + * @return the name of the query + */ String name(); - /** The query string (mandatory) */ + /** The query string (mandatory) + * @return the query string + */ String value(); - /** The query language */ + /** The query language + * @return the query language + */ QueryLanguage language() default QueryLanguage.JDOQL; - /** Whether the query is unmodifiable. */ + /** Whether the query is unmodifiable. + * @return whether the query is unmodifiable + */ String unmodifiable() default ""; - /** Whether the query returns unique results. */ + /** Whether the query returns a single unique result. + * @return whether the query returns a single unique result + */ String unique() default ""; - /** Result Class to dump the results into */ + /** Result class to put the results into + * @return the class of the result + */ Class resultClass() default void.class; } Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Serialized.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Serialized.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Serialized.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Serialized.java Wed Jul 18 09:58:32 2007 @@ -22,13 +22,14 @@ import java.lang.annotation.Target; /** - * Annotation for whether the field is stored serialised. + * Annotation for whether the field is stored serialized. * This is the same as specifying @Field(serialized="true"). * * @version 2.1 * @since 2.1 */ -@Target({ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.FIELD, ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) public @interface Serialized { } Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Transactional.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Transactional.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Transactional.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Transactional.java Wed Jul 18 09:58:32 2007 @@ -23,12 +23,14 @@ /** * Annotation for whether the field is transactional. - * This is the same as specifying @Field(persistenceModifier=FieldPersistenceModifier.TRANSACTIONAL). + * This is the same as specifying + * "@Field(persistenceModifier=FieldPersistenceModifier.TRANSACTIONAL)". * * @version 2.1 * @since 2.1 */ -@Target({ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.FIELD, ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) public @interface Transactional { } Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Transient.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Transient.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Transient.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Transient.java Wed Jul 18 09:58:32 2007 @@ -23,12 +23,14 @@ /** * Annotation for whether the field is transient (not persisted). - * This is the same as specifying @Field(persistenceModifier=FieldPersistenceModifier.NONE). + * This is the same as specifying + * "@Field(persistenceModifier=FieldPersistenceModifier.NONE)". * * @version 2.1 * @since 2.1 */ -@Target({ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.FIELD, ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) public @interface Transient { } Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Unique.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Unique.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Unique.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Unique.java Wed Jul 18 09:58:32 2007 @@ -28,21 +28,34 @@ * @version 2.1 * @since 2.1 */ -@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) public @interface Unique { - /** Name of the unique constraint. */ + /** Name of the unique constraint. + * @return the name of the unique constraint + */ String name() default ""; - /** Table for the unique constraint (if required). */ + /** Table for the unique constraint. This is needed iff annotating a type + * where the unique constraint is not defined on the primary table for + * the type. + * @return the table on which the unique constraint is defined + */ String table() default ""; - /** Whether this unique constraint is deferred */ + /** Whether this unique constraint is deferred until commit. + * @return whether this unique constraint is deferred until commit + */ String deferred() default ""; - /** Field names that comprise this index. */ + /** Field names that comprise this unique constraint. + * @return field names that comprise this unique constraint + */ String[] fields() default {}; - /** Columns that comprise this index. */ + /** Columns that comprise this unique constraint. + * @return columns that comprise this unique constraint + */ Column[] columns() default {}; } Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Uniques.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Uniques.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Uniques.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Uniques.java Wed Jul 18 09:58:32 2007 @@ -27,12 +27,13 @@ * @version 2.1 * @since 2.1 */ -@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) public @interface Uniques { /** - * The (unique) candidate keys - * @return The (unique) candidate keys + * The unique constraints. + * @return The unique constraints */ Unique[] value(); } Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Value.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Value.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Value.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Value.java Wed Jul 18 09:58:32 2007 @@ -28,85 +28,114 @@ * @version 2.1 * @since 2.1 */ -@Target({ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.FIELD, ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) public @interface Value { /** - * The type of the value. This can be determined if using JDK1.5 generics but is required otherwise. + * The type of the value. This can be determined if using JDK1.5 generics + * but is required otherwise. * @return The type of the value. */ Class type() default void.class; /** - * Types of the values. This is used as an alternative to "type" when the implementation supports - * specification of multiple value types. If "type" is specified then this is ignored. - * @return The types of values + * Types of the values. This is used as an alternative to "type" when the + * implementation supports specification of multiple value types. + * If "type" is specified then this is ignored. + * @return the types of values */ Class[] types() default {}; /** - * Whether the value is to be stored serialised (into a join table) - * @return Whether the value is to be stored serialised (into a join table) + * Whether the value is to be stored serialized (into a single column of a + * join table). + * @return Whether the value is to be stored serialized (into a join table) */ String serialized() default ""; /** - * Whether the value is to be stored embedded (into a join table) + * Whether the value is to be stored embedded (into one or several columns + * of a join table). * @return Whether the value is to be stored embedded (into a join table) */ String embedded() default ""; /** - * Whether the value is dependent on the owner (and so will be deleted when it is) - * @return Whether the value is dependent on the owner (and so will be deleted when it is) + * Whether the value is dependent on the owner (and will be deleted + * when the owner is deleted). + * @return whether the value is dependent on the owner */ String dependent() default ""; /** - * Name of the table for the value - * @return Name of the table for the value + * Name of the table for the value. + * @return the name of the table for the value */ String table() default ""; /** - * Name of the column to store the value in - * @return Name of the column to store the value in + * Name of the column to store the value in. + * @return the name of the column to store the value in */ String column() default ""; /** - * Delete action to apply to any foreign-key for the value - * @return Delete action to apply to any foreign-key for the value + * Delete action to apply to any foreign key for the value. + * @return delete action to apply to any foreign key for the value */ ForeignKeyAction deleteAction() default ForeignKeyAction.UNKNOWN; /** - * Update action to apply to any foreign-key for the value - * @return Update action to apply to any foreign-key for the value + * Update action to apply to any foreign key for the value. + * @return update action to apply to any foreign key for the value */ ForeignKeyAction updateAction() default ForeignKeyAction.UNKNOWN; /** * Whether the value column(s) should be indexed. - * @return Whether the value column(s) should be indexed. + * @return whether the value column(s) should be indexed. */ String indexed() default ""; + /** The name of the index to generate. + * @return the name of the index + */ + String index() default ""; + /** * Whether the element column(s) contents should be considered unique - * @return Whether the element column(s) contents should be considered unique + * @return whether the element column(s) contents should be considered unique */ String unique() default ""; /** + * The name of the unique key constraint to generate. + * @return the name of the unique key constraint + */ + String uniqueKey() default ""; + + /** * Name of a field in the key class where this value is stored. - * @return Name of a field in the key class where this value is stored + * @return the name of a field in the key class where this value is stored */ String mappedBy() default ""; /** - * The column(s) for the value - * @return The column(s) for the value + * The column(s) for the value. + * @return the column(s) for the value */ Column[] columns() default {}; + + /** Generate or assume a foreign key constraint exists on the column + * or columns associated with this join. Specify "true" or "false". + * @return whether to generate or assume a primary key constraint + */ + String generateForeignKey() default ""; + + /** Name for a generated primary key constraint. + * @return the name of the generated primary key constraint + */ + String foreignKey() default ""; + } Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Version.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Version.java?view=diff&rev=557331&r1=557330&r2=557331 ============================================================================== --- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Version.java (original) +++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Version.java Wed Jul 18 09:58:32 2007 @@ -28,30 +28,31 @@ * @version 2.1 * @since 2.1 */ -@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) public @interface Version { /** - * Strategy for versioning of objects of this class - * @return Strategy for versioning objects of this class + * Strategy for versioning of objects of this class. + * @return the strategy for versioning objects of this class */ VersionStrategy strategy(); /** - * Name of the column for the version - * @return Name of the column for the version + * Name of the column for the version. + * @return the name of the column for the version */ String column() default ""; /** - * Whether the version column(s) is indexed - * @return Whether the version column(s) is indexed + * Whether the version column(s) is(are) indexed. + * @return whether the version column(s) is(are) indexed */ String indexed() default ""; /** * The column(s) making up the version. - * @return The column(s) making up the version. + * @return the column(s) making up the version */ Column[] columns() default {}; }