Index: test/java/javax/jdo/annotations/TestEmbeddedSet.java =================================================================== --- test/java/javax/jdo/annotations/TestEmbeddedSet.java (revision 0) +++ test/java/javax/jdo/annotations/TestEmbeddedSet.java (revision 0) @@ -0,0 +1,61 @@ +/* + * 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.util.Set; + +/* + * TestEmbeddedSet.java + * + * Created on July 18, 2007, 9:40 AM + * + */ +@PersistenceCapable +public abstract class TestEmbeddedSet { + + /** Creates a new instance of TestEmbeddedSet */ + + public TestEmbeddedSet() { + } + + @Field (table="LINES", embeddedElement="true") + @Join(column="OWNER_FK") + @Element ( + embedded=@Embedded( + fields={ + @Field(name="point1.x", column="POINT1_X"), + @Field(name="point1.y", column="POINT2_Y"), + @Field(name="point2.x", column="POINT2_X"), + @Field(name="point2.y", column="POINT2_Y") + })) + Set lines; + + @Property (embeddedElement="true") + @Join(column="OWNER_FK") + @Element ( + embedded=@Embedded( + properties={ + @Property(name="point1.x", column="POINT1_X"), + @Property(name="point1.y", column="POINT2_Y"), + @Property(name="point2.x", column="POINT2_X"), + @Property(name="point2.y", column="POINT2_Y") + })) + abstract Set getLines(); + + +} Property changes on: test/java/javax/jdo/annotations/TestEmbeddedSet.java ___________________________________________________________________ Name: svn:eol-style + LF Index: test/java/javax/jdo/annotations/Line.java =================================================================== --- test/java/javax/jdo/annotations/Line.java (revision 0) +++ test/java/javax/jdo/annotations/Line.java (revision 0) @@ -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; + +/* + * Line.java + * + * Created on July 18, 2007, 9:41 AM + * + */ +public class Line { + + /** Creates a new instance of Line */ + public Line() { + } + + Point point1; + Point point2; +} Property changes on: test/java/javax/jdo/annotations/Line.java ___________________________________________________________________ Name: svn:eol-style + LF Index: test/java/javax/jdo/annotations/TestEmbeddedMap.java =================================================================== --- test/java/javax/jdo/annotations/TestEmbeddedMap.java (revision 0) +++ test/java/javax/jdo/annotations/TestEmbeddedMap.java (revision 0) @@ -0,0 +1,60 @@ +/* + * 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.util.Map; + +/* + * TestEmbeddedMap.java + * + * Created on July 18, 2007, 10:16 AM + * + */ +public abstract class TestEmbeddedMap { + + /** Creates a new instance of TestEmbeddedMap */ + public TestEmbeddedMap() { + } + + @Field(table="INTEGER_LINES", embeddedKey="true", embeddedValue="true") + @Join(column="OWNER_FK") + @Key(column="INTEGER") + @Value( + embedded=@Embedded( + fields={ + @Field(name="point1.x", column="POINT1_X"), + @Field(name="point1.y", column="POINT2_Y"), + @Field(name="point2.x", column="POINT2_X"), + @Field(name="point2.y", column="POINT2_Y") + })) + Map integerLines; + + @Property(table="INTEGER_LINES", embeddedKey="true", embeddedValue="true") + @Join(column="OWNER_FK") + @Key(column="INTEGER") + @Value( + embedded=@Embedded( + properties={ + @Property(name="point1.x", column="POINT1_X"), + @Property(name="point1.y", column="POINT2_Y"), + @Property(name="point2.x", column="POINT2_X"), + @Property(name="point2.y", column="POINT2_Y") + })) + abstract Map getIntegerLines(); + +} Property changes on: test/java/javax/jdo/annotations/TestEmbeddedMap.java ___________________________________________________________________ Name: svn:eol-style + LF Index: test/java/javax/jdo/annotations/Point.java =================================================================== --- test/java/javax/jdo/annotations/Point.java (revision 0) +++ test/java/javax/jdo/annotations/Point.java (revision 0) @@ -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; + +/* + * Point.java + * + * Created on July 18, 2007, 9:41 AM + * + */ +public class Point { + + /** Creates a new instance of Point */ + public Point() { + } + + int x; + Integer y; +} Property changes on: test/java/javax/jdo/annotations/Point.java ___________________________________________________________________ Name: svn:eol-style + LF Index: src/java/javax/jdo/annotations/Field.java =================================================================== --- src/java/javax/jdo/annotations/Field.java (revision 557331) +++ src/java/javax/jdo/annotations/Field.java (working copy) @@ -57,6 +57,21 @@ */ String embedded() default ""; + /** Whether the elements of this field are embedded. + * @return whether the elements of this field are embedded + */ + String embeddedElement() default ""; + + /** Whether the keys of this field are embedded. + * @return whether the keys of this field are embedded + */ + String embeddedKey() default ""; + + /** Whether the values of this field are embedded. + * @return whether the values of this field are embedded + */ + String embeddedValue() default ""; + /** Whether this field is serialised into a single column. * @return whether this field is serialized into a single column */ Index: src/java/javax/jdo/annotations/Property.java =================================================================== --- src/java/javax/jdo/annotations/Property.java (revision 557331) +++ src/java/javax/jdo/annotations/Property.java (working copy) @@ -57,6 +57,21 @@ */ String embedded() default ""; + /** Whether the elements of this field are embedded. + * @return whether the elements of this field are embedded + */ + String embeddedElement() default ""; + + /** Whether the keys of this field are embedded. + * @return whether the keys of this field are embedded + */ + String embeddedKey() default ""; + + /** Whether the values of this field are embedded. + * @return whether the values of this field are embedded + */ + String embeddedValue() default ""; + /** Whether this property is serialised into a single column. * @return whether this property is serialized into a single column */ Index: src/java/javax/jdo/annotations/Value.java =================================================================== --- src/java/javax/jdo/annotations/Value.java (revision 557331) +++ src/java/javax/jdo/annotations/Value.java (working copy) @@ -55,11 +55,10 @@ String serialized() default ""; /** - * Whether the value is to be stored embedded (into one or several columns - * of a join table). - * @return Whether the value is to be stored embedded (into a join table) + * The embedded mapping for the value. + * @return the embedded mapping for the value */ - String embedded() default ""; + Embedded[] embedded() default {}; /** * Whether the value is dependent on the owner (and will be deleted Index: src/java/javax/jdo/annotations/Key.java =================================================================== --- src/java/javax/jdo/annotations/Key.java (revision 557331) +++ src/java/javax/jdo/annotations/Key.java (working copy) @@ -56,11 +56,10 @@ String serialized() default ""; /** - * Whether the key is to be stored embedded (into one or several columns - * of a join table). - * @return whether the key is to be stored embedded (into a join table) + * The embedded mapping for the key. + * @return the embedded mapping for the key */ - String embedded() default ""; + Embedded[] embedded() default {}; /** * Whether the key is dependent on the owner (and will be deleted Index: src/java/javax/jdo/annotations/Element.java =================================================================== --- src/java/javax/jdo/annotations/Element.java (revision 557331) +++ src/java/javax/jdo/annotations/Element.java (working copy) @@ -56,10 +56,10 @@ 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) + * The embedded mapping for the element. + * @return the embedded mapping for the element */ - String embedded() default ""; + Embedded[] embedded() default {}; /** * Whether the element is dependent on the owner, and will be deleted