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 [2/2] - /db/jdo/trunk/api2/src/java/javax/jdo/annotations/
Date Fri, 15 Jun 2007 00:31:26 GMT
Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Property.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Property.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,71 @@
+/*
+ * 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 property of a persistent interface.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target({ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME)
+public @interface Property
+{
+    /** Modifier for this property. */
+    FieldPersistenceModifier persistenceModifier() default FieldPersistenceModifier.UNKNOWN;
+
+    /** Whether this property is in the default fetch group. */
+    String defaultFetchGroup() default "";
+
+    /** Behaviour when inserting a null value. */
+    NullValue nullValue() default NullValue.NONE;
+
+    /** Whether this property is embedded. */
+    String embedded() default "";
+
+    /** Whether this property is serialised into a single column. */
+    String serialized() default "";
+
+    /** Whether related object(s) of this property are dependent and so deleted when this
object is deleted. */
+    String dependent() default "";
+
+    /** Whether this property is part of the PK of the class. */
+    String primaryKey() default "";
+
+    /** Value strategy to use to populate this property (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 property is loaded due to being referenced
etc */
+    String loadFetchGroup() default "";
+
+    /** Type of the field. Used when the property is a reference type and we want to be specific.
*/
+    Class fieldType() default void.class;
+
+    /** Name of the field in the properties class where this value is stored (bidir relations).
*/
+    String mappedBy() default "";
+
+    /** Vendor extensions for this property. */
+    Extension[] extensions() default {};
+}

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

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Queries.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Queries.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 named queries.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME)
+public @interface Queries
+{
+    /**
+     * The named queries
+     * @return The named queries
+     */
+    Query[] value();
+}
\ No newline at end of file

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

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Query.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Query.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,51 @@
+/*
+ * 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 named query.
+ * Maps across to the JDO2 element "query".
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME)
+public @interface Query
+{
+    /** Name of the query (mandatory) */
+    String name();
+
+    /** The query string (mandatory) */
+    String value();
+
+    /** The query language */
+    QueryLanguage language() default QueryLanguage.JDOQL;
+
+    /** Whether the query is unmodifiable. */
+    String unmodifiable() default "";
+
+    /** Whether the query returns unique results. */
+    String unique() default "";
+
+    /** Result Class to dump the results into */
+    Class resultClass() default void.class;
+}

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

Added: db/jdo/trunk/api2/src/java/javax/jdo/annotations/QueryLanguage.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/QueryLanguage.java?view=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/QueryLanguage.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/QueryLanguage.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 query languages.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+public enum QueryLanguage
+{
+    JDOQL,
+    SQL
+    // Allow for implementations own languages ... e.g add CUSTOM as an option
+};
\ No newline at end of file

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

Added: db/jdo/trunk/api2/src/java/javax/jdo/annotations/SecondaryTable.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/SecondaryTable.java?view=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/SecondaryTable.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/SecondaryTable.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 a secondary table storing some attributes of a primary class.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target({ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME)
+public @interface SecondaryTable
+{
+    /** Table to use for persisting the secondary field information. */
+    String table() default "";
+
+    /** Catalog to use for persisting the secondary field information. */
+    String catalog() default "";
+
+    /** Schema to use for persisting the secondary field information. */
+    String schema() default "";
+}
\ No newline at end of file

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

Added: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Sequence.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Sequence.java?view=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Sequence.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Sequence.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 datastore sequence.
+ * Maps across to the JDO2 element "sequence".
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME)
+public @interface Sequence
+{
+    /** The symbolic name of the datastore sequence. */
+    String name();
+
+    /** Strategy for the sequence. */
+    SequenceStrategy strategy();
+
+    /** Name of the sequence in the datastore. */
+    String datastoreSequence() default "";
+
+    /** Name of a factory class for generating the sequence values. */
+    Class factoryClass() default void.class;
+
+    /** Vendor extensions for this sequence. */
+    Extension[] extensions() default {};
+}
\ No newline at end of file

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

Added: db/jdo/trunk/api2/src/java/javax/jdo/annotations/SequenceStrategy.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/SequenceStrategy.java?view=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/SequenceStrategy.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/SequenceStrategy.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 sequence strategy values.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+public enum SequenceStrategy
+{
+    NONTRANSACTIONAL,
+    CONTIGUOUS,
+    NONCONTIGUOUS
+};
\ No newline at end of file

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

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Serialized.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Serialized.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 field is stored serialised.
+ * This is the same as specifying @Field(serialized="true").
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target({ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME)
+public @interface Serialized
+{
+}
\ No newline at end of file

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

Added: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Table.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Table.java?view=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Table.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Table.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 class is persisted.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME)
+public @interface Table
+{
+    /** Table to use for persisting this class. */
+    String table() default "";
+
+    /** Catalog to use for persisting this class. */
+    String catalog() default "";
+
+    /** Schema to use for persisting this class. */
+    String schema() default "";
+}
\ No newline at end of file

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

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Transactional.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Transactional.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 field is 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)
+public @interface Transactional
+{
+}
\ No newline at end of file

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

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Transient.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Transient.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 field is transient (not persisted).
+ * This is the same as specifying @Field(persistenceModifier=FieldPersistenceModifier.NONE).
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target({ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME)
+public @interface Transient
+{
+}
\ No newline at end of file

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

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Unique.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Unique.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 unique constraint.
+ * Maps across to the JDO2 element "unique".
+ *
+ * @version 2.1
+ * @since 2.1
+ */
+@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME)
+public @interface Unique
+{
+    /** Name of the unique constraint. */
+    String name() default "";
+
+    /** Table for the unique constraint (if required). */
+    String table() default "";
+
+    /** Whether this unique constraint is deferred */
+    String deferred() 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/Unique.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Uniques.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Uniques.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 unique constraints.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME)
+public @interface Uniques
+{
+    /**
+     * The (unique) candidate keys
+     * @return The (unique) candidate keys
+     */
+    Unique[] value();
+}
\ No newline at end of file

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

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Value.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Value.java Thu Jun 14 17:31:23 2007
@@ -0,0 +1,112 @@
+/*
+ * 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 value of a map relation.
+ * Maps across to the JDO2 element "value".
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@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.
+     * @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
+     */
+    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)
+     */
+    String serialized() default "";
+
+    /**
+     * Whether the value is to be stored embedded (into 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)
+     */
+    String dependent() default "";
+
+    /**
+     * Name of the table for the value
+     * @return 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
+     */
+    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
+     */
+    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
+     */
+    ForeignKeyAction updateAction() default ForeignKeyAction.UNKNOWN;
+
+    /**
+     * Whether the value column(s) should be indexed.
+     * @return Whether the value 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 key class where this value is stored.
+     * @return 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
+     */
+    Column[] columns() default {};
+}
\ No newline at end of file

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

Added: 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=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Version.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Version.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 versioning of the class.
+ * Maps across to the JDO2 element "version" of the "class" element.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@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
+     */
+    VersionStrategyType strategy();
+
+    /**
+     * Name of the column for the version
+     * @return 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
+     */
+    String indexed() default "";
+
+    /**
+     * The column(s) making up the version.
+     * @return The column(s) making up the version.
+     */
+    Column[] columns() default {};
+}
\ No newline at end of file

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

Added: db/jdo/trunk/api2/src/java/javax/jdo/annotations/VersionStrategyType.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/VersionStrategyType.java?view=auto&rev=547464
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/VersionStrategyType.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/VersionStrategyType.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 version strategy values.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+public enum VersionStrategyType
+{
+    NONE,
+    STATE_IMAGE,
+    DATE_TIME,
+    VERSION_NUMBER
+};
\ No newline at end of file

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



Mime
View raw message