db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcai...@apache.org
Subject svn commit: r547464 [1/2] - /db/jdo/trunk/api2/src/java/javax/jdo/annotations/
Date Fri, 15 Jun 2007 00:31:26 GMT
Author: mcaisse
Date: Thu Jun 14 17:31:23 2007
New Revision: 547464

URL: http://svn.apache.org/viewvc?view=rev&rev=547464
Log:
JDO-403 JDO2 annotations

Added:
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Column.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Columns.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/DatastoreIdentity.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Discriminator.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/DiscriminatorStrategyType.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Element.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Embedded.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/EmbeddedOnly.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Extension.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Extensions.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchField.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchGroup.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchGroups.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Field.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/FieldPersistenceModifier.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKey.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKeyAction.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKeys.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/IdGeneratorStrategy.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/IdentityTypeValue.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Implements.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Index.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Indices.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Inheritance.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/InheritanceStrategyType.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Join.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/JoinTable.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Joins.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Key.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/NullValue.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Order.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/PersistenceAware.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/PersistenceCapable.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/PersistentInterface.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/PrimaryKey.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Property.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Queries.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Query.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/QueryLanguage.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/SecondaryTable.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Sequence.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/SequenceStrategy.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Serialized.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Table.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Transactional.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Transient.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Unique.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Uniques.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Value.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Version.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/VersionStrategyType.java   (with props)

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Column.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Column.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for a column in the datastore.
+ * Maps across to the JDO2 element "column".
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target({ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME)
+public @interface Column
+{
+    /**
+     * Name of the column.
+     * @return 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.
+     */
+    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.
+     */
+    String targetField() default "";
+
+    /**
+     * 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
+     */
+    String sqlType() default "";
+
+    /**
+     * Maximum length of data stored in this column
+     * @return 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
+     */
+    int scale() default -1;
+
+    /**
+     * Whether the column allows nulls to be inserted.
+     * @return Whether the column allows nulls to be inserted.
+     */
+    String allowsNull() default "";
+
+    /**
+     * Default value for this column
+     * @return 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
+     */
+    String insertValue() default "";
+}
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Column.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Columns.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Columns.java?view=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Columns.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Columns.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for a group of columns.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target({ElementType.FIELD, ElementType.METHOD, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME)
+public @interface Columns
+{
+    /** The columns annotation information. */
+    Column[] value();
+}
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Columns.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/jdo/trunk/api2/src/java/javax/jdo/annotations/DatastoreIdentity.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/DatastoreIdentity.java?view=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/DatastoreIdentity.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/DatastoreIdentity.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for the datastore identity of the class.
+ * Maps across to the JDO2 element "datastore-identity" of the "class" element.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME)
+public @interface DatastoreIdentity
+{
+    /**
+     * Strategy to use when generating datastore identities
+     * @return Strategy to use when generating datastore identities
+     */
+    IdGeneratorStrategy strategy() default IdGeneratorStrategy.UNKNOWN;
+
+    /**
+     * Name of sequence to use when the strategy involves sequences
+     * @return Name of sequence to use when the strategy involves sequences
+     */
+    String sequence() default "";
+
+    /**
+     * Name of the column for the datastore identity
+     * @return Name of the column for the datastore identity
+     */
+    String column() default "";
+
+    /**
+     * The column(s) making up the datastore identity.
+     * @return The column(s) making up the datastore identity.
+     */
+    Column[] columns() default {};
+}
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/DatastoreIdentity.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Discriminator.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Discriminator.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for the discriminator of the class.
+ * Maps across to the JDO2 element "discriminator" of the "inheritance" element.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME)
+public @interface Discriminator
+{
+    /**
+     * Strategy to use for discrimination checking.
+     * @return Strategy to use for discrimination checking.
+     */
+    DiscriminatorStrategyType strategy() default DiscriminatorStrategyType.UNKNOWN;
+
+    /**
+     * 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
+     */
+    String column() default "";
+
+    /**
+     * 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).
+     */
+    String value() default "";
+
+    /**
+     * The column(s) making up the discriminator.
+     * @return The column(s) making up the discriminator.
+     */
+    Column[] columns() default {};
+}
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Discriminator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/jdo/trunk/api2/src/java/javax/jdo/annotations/DiscriminatorStrategyType.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/DiscriminatorStrategyType.java?view=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/DiscriminatorStrategyType.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/DiscriminatorStrategyType.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+/**
+ * Enumeration of the JDO2 discriminator strategy values.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+public enum DiscriminatorStrategyType
+{
+    UNKNOWN,
+    NONE,
+    VALUE_MAP,
+    CLASS_NAME
+};
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/DiscriminatorStrategyType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Element.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Element.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+/**
+ * Annotation for the element of a collection/array relation.
+ * Maps across to the JDO2 element "element".
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target({ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME)
+public @interface Element
+{
+    /**
+     * The type of the element. This can be determined for an array, or if using JDK1.5 generics
+     * but is required otherwise.
+     * @return The type of the element.
+     */
+    Class type() default void.class;
+
+    /**
+     * 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
+     */
+    Class[] types() default {};
+
+    /**
+     * Whether the element is to be stored serialised (into a join table)
+     * @return Whether the element is to be stored serialised (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)
+     */
+    String embedded() default "";
+
+    /**
+     * Whether the element is dependent on the owner (and so will be deleted when it is)
+     * @return Whether the element is dependent on the owner (and so will be deleted when it is)
+     */
+    String dependent() default "";
+
+    /**
+     * 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
+     */
+    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
+     */
+    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
+     */
+    ForeignKeyAction updateAction() default ForeignKeyAction.UNKNOWN;
+
+    /**
+     * Whether the element column(s) should be indexed.
+     * @return Whether the element column(s) should be indexed.
+     */
+    String indexed() default "";
+
+    /**
+     * Whether the element column(s) contents should be considered unique
+     * @return Whether the element column(s) contents should be considered unique
+     */
+    String unique() default "";
+
+    /**
+     * Name of a field in the target class that forms a bidirectional relation with this field
+     * @return Name of a field in the target class that forms a bidirectional relation with this field
+     */
+    String mappedBy() default "";
+
+    /**
+     * The column(s) for the element.
+     * @return The column(s) for the element.
+     */
+    Column[] columns() default {};
+}
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Element.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Embedded.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Embedded.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation to define that the object is embedded into the table of the owning object.
+ * Maps across to the JDO2 element "embedded".
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target({ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME)
+public @interface Embedded
+{
+    /** The field in the embedded object that links back to the owning object (where it has a bidirectional relation). */
+    String ownerField() default "";
+
+    /** The column in the embedded object used to judge if the embedded object is null. */
+    String nullIndicatorColumn() default "";
+
+    /** The value in the null column to interpret the object as being null. */
+    String nullIndicatorValue() default "";
+
+    /** Field definitions for this embedding. */
+    Field[] fields() default {};
+}
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Embedded.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/jdo/trunk/api2/src/java/javax/jdo/annotations/EmbeddedOnly.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/EmbeddedOnly.java?view=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/EmbeddedOnly.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/EmbeddedOnly.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for whether the class is only for persisting embedded into another object.
+ * Same as specifying @PersistenceCapable(embeddedOnly="true").
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME)
+public @interface EmbeddedOnly
+{
+}
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/EmbeddedOnly.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Extension.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Extension.java?view=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Extension.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Extension.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for a JDO extension.
+ * Maps across to the JDO2 element "extension".
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME)
+public @interface Extension
+{
+    /** Vendor that the extension applies to */
+    String vendorName();
+
+    /** The key for the extension. */
+    String key();
+
+    /** The value for the extension. */
+    String value();
+}
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Extension.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Extensions.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Extensions.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for a group of extensions
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME)
+public @interface Extensions
+{
+    /**
+     * The extensions.
+     * @return The extensions
+     */
+    Extension[] value();
+}
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Extensions.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchField.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchField.java?view=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchField.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchField.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for defining a field in a FetchGroup.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target({ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME)
+public @interface FetchField
+{
+    /** Name of the field (required). */
+    String name();
+
+    /** Recursion depth for this field. */
+    int recursionDepth() default 1;
+}
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchField.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchGroup.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchGroup.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for the fetch group of a class.
+ * Maps across to the JDO2 element "fetch-group".
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME)
+public @interface FetchGroup
+{
+    /**
+     * Name of the fetch group.
+     * @return  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 process.
+     */
+    String postLoad() default "";
+
+    /**
+     * Field definition for the fetch group
+     * @return Field definition for the fetch group
+     */
+    FetchField[] fields();
+
+    // Annotations are badly designed in that they dont allow nested groups and object about "cycle detection"
+    // so we cant have nested fetch groups in annotations
+}
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchGroup.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchGroups.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchGroups.java?view=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchGroups.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchGroups.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for a group of fetch-group objects
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME)
+public @interface FetchGroups
+{
+    /**
+     * The Fetch Groups
+     * @return The Fetch Groups
+     */
+    FetchGroup[] value();
+}
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchGroups.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Field.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Field.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for defining the persistence of a field.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target({ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME)
+public @interface Field
+{
+    /** Modifier for this field. */
+    FieldPersistenceModifier persistenceModifier() default FieldPersistenceModifier.UNKNOWN;
+
+    /** Whether this field is in the default fetch group. */
+    String defaultFetchGroup() default "";
+
+    /** Behaviour when inserting a null value. */
+    NullValue nullValue() default NullValue.NONE;
+
+    /** Whether this field is embedded. */
+    String embedded() default "";
+
+    /** Whether this field is serialised into a single column. */
+    String serialized() default "";
+
+    /** Whether related object(s) of this field are dependent
+     *  and so deleted when this object is deleted. */
+    String dependent() default "";
+
+    /** Whether this field is part of the PK of the class. */
+    String primaryKey() default "";
+
+    /** Value strategy to use to populate this field (if any): */
+    IdGeneratorStrategy valueStrategy() default IdGeneratorStrategy.UNKNOWN;
+
+    /** Name of a sequence to use with particular value strategies. */
+    String sequence() default "";
+
+    /** Name of the fetch-group to use when this field is loaded 
+      * due to being referenced etc */
+    String loadFetchGroup() default "";
+
+    /** Type of the field. Used when the field is a reference type 
+      * and we want to be specific. */
+    Class fieldType() default void.class;
+
+    /** Type of the field. This is used as an alternative to "tfieldType" 
+      * when the implementation supports specification of multiple key types.
+      * If "fieldType" is specified then this is ignored. */
+    Class[] fieldTypes() default {};
+
+    /** Name of the field in the fields class where this value is stored 
+      * (bidir relations). */
+    String mappedBy() default "";
+
+    /** Column definition(s) for this field. Used for embedded fields. */
+    Column[] columns() default {}; 
+
+    /** Name of the field when this is embedded in another object. */
+    String embeddedFieldName() default ""; 
+
+    /** Vendor extensions for this field. */
+    Extension[] extensions() default {};
+}

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Field.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/jdo/trunk/api2/src/java/javax/jdo/annotations/FieldPersistenceModifier.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/FieldPersistenceModifier.java?view=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/FieldPersistenceModifier.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/FieldPersistenceModifier.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+/**
+ * Enumeration of the JDO2 persistence-modifier values for a field.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+public enum FieldPersistenceModifier
+{
+    UNKNOWN,
+    PERSISTENT,
+    TRANSACTIONAL,
+    NONE
+};
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/FieldPersistenceModifier.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKey.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKey.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for a JDO foreign-key.
+ * Maps across to the JDO2 element "foreign-key".
+ *
+ * @version 2.1
+ * @since 2.1
+ */
+@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME)
+public @interface ForeignKey
+{
+    /** Name of the foreign-key. */
+    String name() default "";
+
+    /** Table for the foreign-key. */
+    String table() default "";
+
+    /** Whether this foreign-key is deferred */
+    String deferred() default "";
+
+    /** Whether this foreign-key is unique */
+    String unique() default "";
+
+    /** The delete action of this FK */
+    ForeignKeyAction deleteAction() default ForeignKeyAction.RESTRICT;
+
+    /** The update action of this FK */
+    ForeignKeyAction updateAction() default ForeignKeyAction.RESTRICT;
+
+    /** Field names that comprise this index. */
+    String[] fields() default {};
+
+    /** Columns that comprise this index. */
+    Column[] columns() default {};
+}

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKey.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKeyAction.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKeyAction.java?view=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKeyAction.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKeyAction.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+/**
+ * Enumeration of the JDO2 foreign-key delete/update action values.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+public enum ForeignKeyAction
+{
+    UNKNOWN,
+    RESTRICT,
+    CASCADE,
+    NULL,
+    DEFAULT,
+    NONE
+};
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKeyAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKeys.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKeys.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for a group of foreign-key constraints.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME)
+public @interface ForeignKeys
+{
+    /**
+     * The foreign keys.
+     * @return The foreign keys
+     */
+    ForeignKey[] value();
+}
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/ForeignKeys.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/IdGeneratorStrategy.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/IdGeneratorStrategy.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+/**
+ * Enumeration of the JDO2 id generator strategy values.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+public enum IdGeneratorStrategy
+{
+    UNKNOWN,
+    NATIVE,
+    SEQUENCE,
+    IDENTITY,
+    INCREMENT,
+    UUIDSTRING,
+    UUIDHEX
+    // Allow for implementations own types ... e.g add CUSTOM as an option
+};
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/IdGeneratorStrategy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/jdo/trunk/api2/src/java/javax/jdo/annotations/IdentityTypeValue.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/IdentityTypeValue.java?view=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/IdentityTypeValue.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/IdentityTypeValue.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+/**
+ * Enumeration of the JDO2 identity type values.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+public enum IdentityTypeValue
+{
+    UNKNOWN,
+    APPLICATION,
+    DATASTORE,
+    NONDURABLE
+};
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/IdentityTypeValue.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Implements.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Implements.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for the interfaces implemented by a class.
+ * Maps across to the JDO2 element "implements".
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME)
+public @interface Implements
+{
+    /** Interfaces implemented by this PersistenceCapable (class names of the interfaces). */
+    String[] value();
+}
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Implements.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Index.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Index.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for a JDO index.
+ * Maps across to the JDO2 element "index".
+ *
+ * @version 2.1
+ * @since 2.1
+ */
+@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME)
+public @interface Index
+{
+    /** Name of the index */
+    String name() default "";
+
+    /** Table for the index (if required). */
+    String table() default "";
+
+    /** Whether this index is unique */
+    String unique() default "";
+
+    /** Field names that comprise this index. */
+    String[] fields() default {};
+
+    /** Columns that comprise this index. */
+    Column[] columns() default {};
+}

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Index.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Indices.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Indices.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for a group of index constraints.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME)
+public @interface Indices
+{
+    /**
+     * The indices
+     * @return The indices
+     */
+    Index[] value();
+}
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Indices.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Inheritance.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Inheritance.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for the inheritance of the class.
+ * Maps across to the JDO2 element "inheritance" of the "class" element.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME)
+public @interface Inheritance
+{
+    /** Strategy to use for inheritance. Relates to where the data for the class is stored. */
+    InheritanceStrategyType strategy();
+}
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Inheritance.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/jdo/trunk/api2/src/java/javax/jdo/annotations/InheritanceStrategyType.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/InheritanceStrategyType.java?view=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/InheritanceStrategyType.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/InheritanceStrategyType.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+/**
+ * Enumeration of the JDO2 inheritance strategy values.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+public enum InheritanceStrategyType
+{
+    NEW_TABLE,
+    SUBCLASS_TABLE,
+    SUPERCLASS_TABLE
+};
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/InheritanceStrategyType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Join.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Join.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for the join of a relation.
+ * Maps across to the JDO2 element "join".
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME)
+public @interface Join
+{
+    /** Table to join to (used when joining to secondary tables). */
+    String table() default "";
+
+    /** Name of the column in the join table. */
+    String column() default "";
+
+    /** Whether the join column is indexed. */
+    String indexed() default "";
+
+    /** Whether the join column is unique */
+    String unique() default "";
+
+    /** Whether to use an outer join. */
+    String outer() default "";
+
+    /** Delete action to be applied to any ForeignKey on this join. */
+    ForeignKeyAction deleteAction() default ForeignKeyAction.UNKNOWN;
+
+    /** Detail definition of the join column(s). */
+    Column[] columns() default {};
+}
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Join.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/jdo/trunk/api2/src/java/javax/jdo/annotations/JoinTable.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/JoinTable.java?view=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/JoinTable.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/JoinTable.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for the table where a one-to-many, many-to-many relation can be stored (join table).
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target({ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME)
+public @interface JoinTable
+{
+    /** Table to use for persisting the join information. */
+    String table() default "";
+
+    /** Catalog to use for persisting the join information. */
+    String catalog() default "";
+
+    /** Schema to use for persisting the join information. */
+    String schema() default "";
+}
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/JoinTable.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Joins.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Joins.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for a group of joins.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME)
+public @interface Joins
+{
+    /**
+     * The join definitions
+     * @return The join definitions
+     */
+    Join[] value();
+}
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Joins.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Key.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Key.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+/**
+ * Annotation for the key of a map relation.
+ * Maps across to the JDO2 element "key".
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@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.
+     */
+    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
+     */
+    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)
+     */
+    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)
+     */
+    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)
+     */
+    String dependent() default "";
+
+    /**
+     * 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
+     */
+    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
+     */
+    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
+     */
+    ForeignKeyAction updateAction() default ForeignKeyAction.UNKNOWN;
+
+    /**
+     * Whether the key column(s) should be indexed.
+     * @return Whether the key column(s) should be indexed.
+     */
+    String indexed() default "";
+
+    /**
+     * Whether the key column(s) contents should be considered unique
+     * @return Whether the key column(s) contents should be considered unique
+     */
+    String unique() 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
+     */
+    String mappedBy() default "";
+
+    /**
+     * The column(s) for the key
+     * @return The column(s) for the key
+     */
+    Column[] columns() default {};
+}
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Key.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/NullValue.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/NullValue.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+/**
+ * Enumeration of the JDO2 "null-value" behaviour values.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+public enum NullValue
+{
+    NONE,
+    EXCEPTION,
+    DEFAULT
+};
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/NullValue.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Order.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Order.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for the order of a container field.
+ * Maps across to the JDO2 element "order".
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@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). */
+    String column() default "";
+
+    /** Name of a field in the target object that acts as the ordering for this Collection/List. */
+    String mappedBy() default "";
+
+    /** The definition of the column(s) to use for ordering. */
+    Column[] columns() default {};
+}
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Order.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/PersistenceAware.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/PersistenceAware.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for whether the class is persistence-aware.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME)
+public @interface PersistenceAware
+{
+}
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/PersistenceAware.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/jdo/trunk/api2/src/java/javax/jdo/annotations/PersistenceCapable.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/PersistenceCapable.java?view=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/PersistenceCapable.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/PersistenceCapable.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for whether the class is persistence-capable.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME)
+public @interface PersistenceCapable
+{
+    /** Whether we require the ability to have extents of this class. */
+    String requiresExtent() default "";
+
+    /** Whether objects of this class can only be embedded. */
+    String embeddedOnly() default "";
+
+    /** Whether this class is detachable. */
+    String detachable() default "";
+
+    /** Type of identity for this class. */
+    IdentityTypeValue identityType() default IdentityTypeValue.DATASTORE;
+
+    /** Primary key class when using application identity and using own PK. */
+    Class objectIdClass() default void.class;
+
+    /** Any vendor extensions. */
+    Extension[] extensions() default {};
+}

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/PersistenceCapable.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/jdo/trunk/api2/src/java/javax/jdo/annotations/PersistentInterface.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/PersistentInterface.java?view=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/PersistentInterface.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/PersistentInterface.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for whether the interface is a persistent interface
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME)
+public @interface PersistentInterface
+{
+    /** Whether we require the ability to have extents of this interface. */
+    String requiresExtent() default "";
+
+    /** Whether objects of implementations of this interface can only be embedded. */
+    String embeddedOnly() default "";
+
+    /** Whether this objects of implementations of this interface are detachable. */
+    String detachable() default "";
+
+    /** Type of identity for this persistent interface. */
+    IdentityTypeValue identityType() default IdentityTypeValue.DATASTORE;
+
+    /** Primary key class when using application identity and using own PK. */
+    Class objectIdClass() default void.class;
+
+    /** Any vendor extensions. */
+    Extension[] extensions() default {};
+}

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/PersistentInterface.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/PrimaryKey.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/PrimaryKey.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.jdo.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for the primary key of a class.
+ * Maps across to the JDO2 element "primary-key".
+ * Also used to define a field as being (part of) the primary key.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@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
+     */
+    String name() default "";
+
+    /**
+     * Name of the column to use for the primary key
+     * @return 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
+     */
+    Column[] columns() default {};
+}
\ No newline at end of file

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/annotations/PrimaryKey.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message