db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From an...@apache.org
Subject svn commit: r1232104 - in /db/jdo/trunk/api/src: java/javax/jdo/annotations/Embedded.java java/javax/jdo/metadata/EmbeddedMetadata.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 Mon, 16 Jan 2012 18:32:57 GMT
Author: andyj
Date: Mon Jan 16 18:32:56 2012
New Revision: 1232104

URL: http://svn.apache.org/viewvc?rev=1232104&view=rev
Log:
JDO-702 Apply patch to allow specification of embedded inherited objects, adding a discriminator
to <embedded>

Modified:
    db/jdo/trunk/api/src/java/javax/jdo/annotations/Embedded.java
    db/jdo/trunk/api/src/java/javax/jdo/metadata/EmbeddedMetadata.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/Embedded.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api/src/java/javax/jdo/annotations/Embedded.java?rev=1232104&r1=1232103&r2=1232104&view=diff
==============================================================================
--- db/jdo/trunk/api/src/java/javax/jdo/annotations/Embedded.java (original)
+++ db/jdo/trunk/api/src/java/javax/jdo/annotations/Embedded.java Mon Jan 16 18:32:56 2012
@@ -54,4 +54,10 @@ public @interface Embedded
      * @return the members embedded in the field or property being annotated
      */
     Persistent[] members() default {};
+
+    /**
+     * Discriminator for cases where the embedded object has inheritance.
+     * @return the discriminator for inheritance determination
+     */
+    Discriminator discriminatorColumnName() default @Discriminator;
 }

Modified: db/jdo/trunk/api/src/java/javax/jdo/metadata/EmbeddedMetadata.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api/src/java/javax/jdo/metadata/EmbeddedMetadata.java?rev=1232104&r1=1232103&r2=1232104&view=diff
==============================================================================
--- db/jdo/trunk/api/src/java/javax/jdo/metadata/EmbeddedMetadata.java (original)
+++ db/jdo/trunk/api/src/java/javax/jdo/metadata/EmbeddedMetadata.java Mon Jan 16 18:32:56
2012
@@ -92,4 +92,16 @@ public interface EmbeddedMetadata extend
      * @return The PropertyMetadata
      */
     PropertyMetadata newPropertyMetadata(String name);
+
+    /**
+     * Accessor for the discriminator metadata when handling inherited objects.
+     * @return Discriminator details
+     */
+    DiscriminatorMetadata getDiscriminatorMetadata();
+
+    /**
+     * Method to define the new discriminator metadata for handling inherited embedded objects.
+     * @return Discriminator metadata
+     */
+    DiscriminatorMetadata newDiscriminatorMetadata();
 }

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=1232104&r1=1232103&r2=1232104&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 Mon Jan 16 18:32:56 2012
@@ -218,7 +218,7 @@
 <!ATTLIST fetch-plan max-fetch-depth CDATA #IMPLIED>
 <!ATTLIST fetch-plan fetch-size CDATA #IMPLIED>
 
-<!ELEMENT embedded (extension*, (field|property)*, extension*)>
+<!ELEMENT embedded (extension*, discriminator?, (field|property)*, extension*)>
 <!ATTLIST embedded owner-field CDATA #IMPLIED>
 <!ATTLIST embedded null-indicator-column CDATA #IMPLIED>
 <!ATTLIST embedded null-indicator-value 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=1232104&r1=1232103&r2=1232104&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 Mon Jan 16 18:32:56 2012
@@ -1161,6 +1161,7 @@
                 <xs:element ref="extension"/>
                 <xs:element ref="field"/>
                 <xs:element ref="property"/>
+                <xs:element ref="discriminator"/>
             </xs:choice>
             <xs:attributeGroup ref="attlist.embedded"/>
         </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=1232104&r1=1232103&r2=1232104&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 Mon Jan 16 18:32:56 2012
@@ -148,7 +148,7 @@
 <!ATTLIST order column CDATA #IMPLIED>
 <!ATTLIST order mapped-by CDATA #IMPLIED>
 
-<!ELEMENT embedded (extension*, (field|property)*, extension*)>
+<!ELEMENT embedded (extension*, discriminator?, (field|property)*, extension*)>
 <!ATTLIST embedded owner-field CDATA #IMPLIED>
 <!ATTLIST embedded null-indicator-column CDATA #IMPLIED>
 <!ATTLIST embedded null-indicator-value 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=1232104&r1=1232103&r2=1232104&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 Mon Jan 16 18:32:56 2012
@@ -741,6 +741,7 @@
                 <xs:element ref="extension"/>
                 <xs:element ref="field"/>
                 <xs:element ref="property"/>
+                <xs:element ref="discriminator"/>
             </xs:choice>
             <xs:attributeGroup ref="attlist.embedded"/>
         </xs:complexType>



Mime
View raw message