db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcai...@apache.org
Subject svn commit: r605287 - in /db/jdo/trunk/api2/src: java/javax/jdo/annotations/FetchPlan.java java/javax/jdo/annotations/FetchPlans.java java/javax/jdo/annotations/Query.java schema/javax/jdo/jdo_2_1.xsd
Date Tue, 18 Dec 2007 18:35:16 GMT
Author: mcaisse
Date: Tue Dec 18 10:35:13 2007
New Revision: 605287

URL: http://svn.apache.org/viewvc?rev=605287&view=rev
Log:
JDO-448

Added:
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchPlan.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchPlans.java   (with props)
Modified:
    db/jdo/trunk/api2/src/java/javax/jdo/annotations/Query.java
    db/jdo/trunk/api2/src/schema/javax/jdo/jdo_2_1.xsd

Added: db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchPlan.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchPlan.java?rev=605287&view=auto
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchPlan.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchPlan.java Tue Dec 18 10:35:13 2007
@@ -0,0 +1,59 @@
+/*
+ * 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 plan of a persistence manager, query, or extent.
+ * Corresponds to the xml element "fetch-plan".
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target(ElementType.TYPE) 
+@Retention(RetentionPolicy.RUNTIME)
+public @interface FetchPlan
+{
+    /**
+     * Name of the fetch plan.
+     * @return the name of the fetch plan
+     */
+    String name() default "";
+
+    /**
+     * The fetch groups in this fetch plan.
+     * @return the fetch groups 
+     */
+    String[] fetchGroups() default "";
+
+    /**
+     * The depth of references to instantiate, starting with the root object.
+     * @return the maxium fetch depth
+     */
+    int maxFetchDepth() default 1;
+
+    /** 
+     * The number of instances of multi-valued fields retrieved by queries.
+     * @return the fetch size
+     */
+    int fetchSize() default 0;
+
+}

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

Added: db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchPlans.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchPlans.java?rev=605287&view=auto
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchPlans.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/FetchPlans.java Tue Dec 18 10:35:13 2007
@@ -0,0 +1,39 @@
+/*
+ * 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 FetchPlan objects
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+@Target(ElementType.TYPE) 
+@Retention(RetentionPolicy.RUNTIME)
+public @interface FetchPlans
+{
+    /**
+     * The Fetch Plans
+     * @return The Fetch Plans
+     */
+    FetchPlan[] value();
+}
\ No newline at end of file

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

Modified: db/jdo/trunk/api2/src/java/javax/jdo/annotations/Query.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/annotations/Query.java?rev=605287&r1=605286&r2=605287&view=diff
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/annotations/Query.java (original)
+++ db/jdo/trunk/api2/src/java/javax/jdo/annotations/Query.java Tue Dec 18 10:35:13 2007
@@ -62,6 +62,11 @@
      */
     Class resultClass() default void.class;
 
+    /** The name of the fetch plan used by this query
+     * @return the fetch plan
+     */
+    String fetchPlan() default "";
+
     /** Vendor extensions.
      * @return the vendor extensions
      */

Modified: db/jdo/trunk/api2/src/schema/javax/jdo/jdo_2_1.xsd
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/schema/javax/jdo/jdo_2_1.xsd?rev=605287&r1=605286&r2=605287&view=diff
==============================================================================
--- db/jdo/trunk/api2/src/schema/javax/jdo/jdo_2_1.xsd (original)
+++ db/jdo/trunk/api2/src/schema/javax/jdo/jdo_2_1.xsd Tue Dec 18 10:35:13 2007
@@ -25,6 +25,7 @@
                 <xs:element ref="extension"/>
                 <xs:element ref="package"/>
                 <xs:element ref="query"/>
+                <xs:element ref="fetch-plan"/>
             </xs:choice>
             <xs:attributeGroup ref="attlist.jdo"/>
         </xs:complexType>
@@ -33,6 +34,19 @@
         <xs:attribute name="catalog"/>
         <xs:attribute name="schema"/>
     </xs:attributeGroup>
+    <xs:element name="fetch-plan">
+        <xs:complexType>
+            <xs:choice maxOccurs="unbounded">
+                <xs:element ref="fetch-group"/>
+            </xs:choice>
+            <xs:attributeGroup ref="attlist.fetch-plan"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:attributeGroup name="attlist.fetch-plan">
+        <xs:attribute name="name" default=""/>
+        <xs:attribute name="max-fetch-depth" default="1"/>
+        <xs:attribute name="fetch-size" default="0"/>
+    </xs:attributeGroup>
     <xs:element name="package">
         <xs:complexType>
             <xs:choice maxOccurs="unbounded">
@@ -1187,6 +1201,7 @@
             </xs:simpleType>
         </xs:attribute>
         <xs:attribute name="result-class"/>
+        <xs:attribute name="fetch-plan"/>
     </xs:attributeGroup>
     <xs:element name="unique">
         <xs:complexType>



Mime
View raw message