db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From an...@apache.org
Subject svn commit: r1026440 - in /db/jdo/trunk/api/src: java/javax/jdo/annotations/Sequence.java java/javax/jdo/metadata/SequenceMetadata.java schema/javax/jdo/jdo_3_1.dtd schema/javax/jdo/jdo_3_1.xsd schema/javax/jdo/orm_3_1.dtd schema/javax/jdo/orm_3_1.xsd
Date Fri, 22 Oct 2010 18:35:33 GMT
Author: andyj
Date: Fri Oct 22 18:35:32 2010
New Revision: 1026440

URL: http://svn.apache.org/viewvc?rev=1026440&view=rev
Log:
JDO-662 Add allocationSize, initialValue to sequence (annotation, XML, metadata api)

Modified:
    db/jdo/trunk/api/src/java/javax/jdo/annotations/Sequence.java
    db/jdo/trunk/api/src/java/javax/jdo/metadata/SequenceMetadata.java
    db/jdo/trunk/api/src/schema/javax/jdo/jdo_3_1.dtd
    db/jdo/trunk/api/src/schema/javax/jdo/jdo_3_1.xsd
    db/jdo/trunk/api/src/schema/javax/jdo/orm_3_1.dtd
    db/jdo/trunk/api/src/schema/javax/jdo/orm_3_1.xsd

Modified: db/jdo/trunk/api/src/java/javax/jdo/annotations/Sequence.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api/src/java/javax/jdo/annotations/Sequence.java?rev=1026440&r1=1026439&r2=1026440&view=diff
==============================================================================
--- db/jdo/trunk/api/src/java/javax/jdo/annotations/Sequence.java (original)
+++ db/jdo/trunk/api/src/java/javax/jdo/annotations/Sequence.java Fri Oct 22 18:35:32 2010
@@ -56,4 +56,18 @@ public @interface Sequence
      * @return vendor extensions
      */
     Extension[] extensions() default {};
+
+    /**
+     * Initial value for the sequence.
+     * @return Initial value for the sequence
+     * @since 3.1
+     */
+    int initialValue() default 1;
+
+    /**
+     * Allocation size for the sequence.
+     * @return Allocation size for the sequence
+     * @since 3.1
+     */
+    int allocationSize() default 50;
 }

Modified: db/jdo/trunk/api/src/java/javax/jdo/metadata/SequenceMetadata.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api/src/java/javax/jdo/metadata/SequenceMetadata.java?rev=1026440&r1=1026439&r2=1026440&view=diff
==============================================================================
--- db/jdo/trunk/api/src/java/javax/jdo/metadata/SequenceMetadata.java (original)
+++ db/jdo/trunk/api/src/java/javax/jdo/metadata/SequenceMetadata.java Fri Oct 22 18:35:32
2010
@@ -64,4 +64,36 @@ public interface SequenceMetadata extend
      * @return The factory class
      */
     String getFactoryClass();
+
+    /**
+     * Method to set the initial value for the sequence
+     * 
+     * @param val Initial value to use
+     * @since 3.1
+     */
+    SequenceMetadata setInitialValue(int val);
+
+    /**
+     * Accessor for the initial value of the sequence (if any).
+     * 
+     * @return initial value
+     * @since 3.1
+     */
+    Integer getInitialValue();
+
+    /**
+     * Method to set the allocation size for the sequence
+     * 
+     * @param size Allocation size to use
+     * @since 3.1
+     */
+    SequenceMetadata setAllocationSize(int size);
+
+    /**
+     * Accessor for the allocation size of the sequence (if any).
+     * 
+     * @return allocation size
+     * @since 3.1
+     */
+    Integer getAllocationSize();
 }

Modified: db/jdo/trunk/api/src/schema/javax/jdo/jdo_3_1.dtd
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api/src/schema/javax/jdo/jdo_3_1.dtd?rev=1026440&r1=1026439&r2=1026440&view=diff
==============================================================================
--- db/jdo/trunk/api/src/schema/javax/jdo/jdo_3_1.dtd (original)
+++ db/jdo/trunk/api/src/schema/javax/jdo/jdo_3_1.dtd Fri Oct 22 18:35:32 2010
@@ -228,6 +228,8 @@
 <!ATTLIST sequence datastore-sequence CDATA #IMPLIED>
 <!ATTLIST sequence factory-class CDATA #IMPLIED>
 <!ATTLIST sequence strategy (nontransactional|contiguous|noncontiguous) #REQUIRED>
+<!ATTLIST sequence allocation-size CDATA #IMPLIED>
+<!ATTLIST sequence initial-value CDATA #IMPLIED>
 
 <!ELEMENT index (extension*, (column* | field* | property*), extension*)>
 <!ATTLIST index name CDATA #IMPLIED>

Modified: db/jdo/trunk/api/src/schema/javax/jdo/jdo_3_1.xsd
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api/src/schema/javax/jdo/jdo_3_1.xsd?rev=1026440&r1=1026439&r2=1026440&view=diff
==============================================================================
--- db/jdo/trunk/api/src/schema/javax/jdo/jdo_3_1.xsd (original)
+++ db/jdo/trunk/api/src/schema/javax/jdo/jdo_3_1.xsd Fri Oct 22 18:35:32 2010
@@ -1191,6 +1191,8 @@
                 </xs:restriction>
             </xs:simpleType>
         </xs:attribute>
+        <xs:attribute name="allocation-size" default="50"/>
+        <xs:attribute name="initial-value" default="1"/>
     </xs:attributeGroup>
     <xs:element name="index">
         <xs:complexType>

Modified: db/jdo/trunk/api/src/schema/javax/jdo/orm_3_1.dtd
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api/src/schema/javax/jdo/orm_3_1.dtd?rev=1026440&r1=1026439&r2=1026440&view=diff
==============================================================================
--- db/jdo/trunk/api/src/schema/javax/jdo/orm_3_1.dtd (original)
+++ db/jdo/trunk/api/src/schema/javax/jdo/orm_3_1.dtd Fri Oct 22 18:35:32 2010
@@ -158,6 +158,8 @@
 <!ATTLIST sequence datastore-sequence CDATA #IMPLIED>
 <!ATTLIST sequence factory-class CDATA #IMPLIED>
 <!ATTLIST sequence strategy (nontransactional|contiguous|noncontiguous) #REQUIRED>
+<!ATTLIST sequence allocation-size CDATA #IMPLIED>
+<!ATTLIST sequence initial-value CDATA #IMPLIED>
 
 <!ELEMENT index (extension*, (column* | field* | property*), extension*)>
 <!ATTLIST index name CDATA #IMPLIED>

Modified: db/jdo/trunk/api/src/schema/javax/jdo/orm_3_1.xsd
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api/src/schema/javax/jdo/orm_3_1.xsd?rev=1026440&r1=1026439&r2=1026440&view=diff
==============================================================================
--- db/jdo/trunk/api/src/schema/javax/jdo/orm_3_1.xsd (original)
+++ db/jdo/trunk/api/src/schema/javax/jdo/orm_3_1.xsd Fri Oct 22 18:35:32 2010
@@ -771,6 +771,8 @@
                 </xs:restriction>
             </xs:simpleType>
         </xs:attribute>
+        <xs:attribute name="allocation-size" default="50"/>
+        <xs:attribute name="initial-value" default="1"/>
     </xs:attributeGroup>
     <xs:element name="index">
         <xs:complexType>



Mime
View raw message