diff options
author | kmoore | 2009-01-22 22:09:12 +0000 |
---|---|---|
committer | kmoore | 2009-01-22 22:09:12 +0000 |
commit | e9a8811005e930f2265da520db8a2cc2b9acc9be (patch) | |
tree | e329e0cd33d65c3f5bab87ace2bb59b7557dcaf6 /jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm | |
parent | 0d56f07f1138680506082e0129930719174e26e2 (diff) | |
download | webtools.dali-e9a8811005e930f2265da520db8a2cc2b9acc9be.tar.gz webtools.dali-e9a8811005e930f2265da520db8a2cc2b9acc9be.tar.xz webtools.dali-e9a8811005e930f2265da520db8a2cc2b9acc9be.zip |
change to virtual orm persistent attributes to build the wrapped javaPersistentAttribute rather than taking it from the JavaPersistentType. Changed how java access is determined
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm')
7 files changed, 27 insertions, 34 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmBasicMapping.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmBasicMapping.java index 82bf185cbe..0c741c2b61 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmBasicMapping.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmBasicMapping.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 Oracle. + * Copyright (c) 2008, 2009 Oracle. * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v1.0 which * accompanies this distribution, and is available at @@ -15,7 +15,6 @@ import org.eclipse.jpt.core.context.orm.OrmConverter; import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute; import org.eclipse.jpt.core.internal.context.orm.GenericOrmBasicMapping; import org.eclipse.jpt.core.resource.orm.AbstractXmlTypeMapping; -import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping; import org.eclipse.jpt.eclipselink.core.context.Convert; import org.eclipse.jpt.eclipselink.core.context.EclipseLinkBasicMapping; import org.eclipse.jpt.eclipselink.core.context.Mutable; @@ -53,12 +52,12 @@ public class EclipseLinkOrmBasicMapping extends GenericOrmBasicMapping } @Override - protected String specifiedConverterType() { + protected String getResourceConverterType() { //check @Convert first, this is the order that EclipseLink searches if (((XmlBasic) this.resourceAttributeMapping).getConvert() != null) { return Convert.ECLIPSE_LINK_CONVERTER; } - return super.specifiedConverterType(); + return super.getResourceConverterType(); } @@ -73,8 +72,8 @@ public class EclipseLinkOrmBasicMapping extends GenericOrmBasicMapping } @Override - public void initialize(XmlAttributeMapping attributeMapping) { - super.initialize(attributeMapping); + protected void initialize() { + super.initialize(); this.mutable.initialize((XmlMutable) this.resourceAttributeMapping); } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmIdMapping.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmIdMapping.java index 54d4aae114..508833594e 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmIdMapping.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmIdMapping.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 Oracle. + * Copyright (c) 2008, 2009 Oracle. * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v1.0 which * accompanies this distribution, and is available at @@ -15,7 +15,6 @@ import org.eclipse.jpt.core.context.orm.OrmConverter; import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute; import org.eclipse.jpt.core.internal.context.orm.GenericOrmIdMapping; import org.eclipse.jpt.core.resource.orm.AbstractXmlTypeMapping; -import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping; import org.eclipse.jpt.eclipselink.core.context.Convert; import org.eclipse.jpt.eclipselink.core.context.EclipseLinkIdMapping; import org.eclipse.jpt.eclipselink.core.context.Mutable; @@ -53,12 +52,12 @@ public class EclipseLinkOrmIdMapping extends GenericOrmIdMapping } @Override - protected String specifiedConverterType() { + protected String getResourceConverterType() { //check @Convert first, this is the order that EclipseLink searches if (((XmlId) this.resourceAttributeMapping).getConvert() != null) { return Convert.ECLIPSE_LINK_CONVERTER; } - return super.specifiedConverterType(); + return super.getResourceConverterType(); } // **************** resource-context interaction *************************** @@ -72,8 +71,8 @@ public class EclipseLinkOrmIdMapping extends GenericOrmIdMapping } @Override - public void initialize(XmlAttributeMapping xmlAttributeMapping) { - super.initialize(xmlAttributeMapping); + protected void initialize() { + super.initialize(); this.mutable.initialize((XmlMutable) this.resourceAttributeMapping); } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmManyToManyMapping.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmManyToManyMapping.java index 9c805dabfc..0b3164aee1 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmManyToManyMapping.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmManyToManyMapping.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 Oracle. + * Copyright (c) 2008, 2009 Oracle. * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v1.0 which * accompanies this distribution, and is available at @@ -14,7 +14,6 @@ import java.util.List; import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute; import org.eclipse.jpt.core.internal.context.orm.GenericOrmManyToManyMapping; import org.eclipse.jpt.core.resource.orm.AbstractXmlTypeMapping; -import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping; import org.eclipse.jpt.eclipselink.core.context.EclipseLinkRelationshipMapping; import org.eclipse.jpt.eclipselink.core.context.JoinFetch; import org.eclipse.jpt.eclipselink.core.resource.orm.EclipseLinkOrmFactory; @@ -51,8 +50,8 @@ public class EclipseLinkOrmManyToManyMapping } @Override - public void initialize(XmlAttributeMapping attributeMapping) { - super.initialize(attributeMapping); + protected void initialize() { + super.initialize(); this.joinFetch.initialize((XmlJoinFetch) this.resourceAttributeMapping); } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmManyToOneMapping.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmManyToOneMapping.java index fe53115d43..dba564fa12 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmManyToOneMapping.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmManyToOneMapping.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 Oracle. + * Copyright (c) 2008, 2009 Oracle. * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v1.0 which * accompanies this distribution, and is available at @@ -14,7 +14,6 @@ import java.util.List; import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute; import org.eclipse.jpt.core.internal.context.orm.GenericOrmManyToOneMapping; import org.eclipse.jpt.core.resource.orm.AbstractXmlTypeMapping; -import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping; import org.eclipse.jpt.core.resource.orm.XmlManyToOne; import org.eclipse.jpt.eclipselink.core.context.EclipseLinkRelationshipMapping; import org.eclipse.jpt.eclipselink.core.context.JoinFetch; @@ -50,8 +49,8 @@ public class EclipseLinkOrmManyToOneMapping extends GenericOrmManyToOneMapping } @Override - public void initialize(XmlAttributeMapping attributeMapping) { - super.initialize(attributeMapping); + protected void initialize() { + super.initialize(); this.joinFetch.initialize((XmlJoinFetch) this.resourceAttributeMapping); } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmOneToManyMapping.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmOneToManyMapping.java index 7d1fb25f4a..04b9343e91 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmOneToManyMapping.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmOneToManyMapping.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 Oracle. + * Copyright (c) 2008, 2009 Oracle. * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v1.0 which * accompanies this distribution, and is available at @@ -16,7 +16,6 @@ import org.eclipse.jpt.core.context.AttributeMapping; import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute; import org.eclipse.jpt.core.internal.context.orm.GenericOrmOneToManyMapping; import org.eclipse.jpt.core.resource.orm.AbstractXmlTypeMapping; -import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping; import org.eclipse.jpt.eclipselink.core.context.EclipseLinkOneToManyMapping; import org.eclipse.jpt.eclipselink.core.context.JoinFetch; import org.eclipse.jpt.eclipselink.core.context.PrivateOwned; @@ -67,8 +66,8 @@ public class EclipseLinkOrmOneToManyMapping extends GenericOrmOneToManyMapping } @Override - public void initialize(XmlAttributeMapping attributeMapping) { - super.initialize(attributeMapping); + protected void initialize() { + super.initialize(); this.privateOwned.initialize((XmlPrivateOwned) this.resourceAttributeMapping); this.joinFetch.initialize((XmlJoinFetch) this.resourceAttributeMapping); } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmOneToOneMapping.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmOneToOneMapping.java index b5aa086121..5e7b9fa53b 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmOneToOneMapping.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmOneToOneMapping.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 Oracle. All rights reserved. + * Copyright (c) 2008, 2009 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -13,7 +13,6 @@ import java.util.List; import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute; import org.eclipse.jpt.core.internal.context.orm.GenericOrmOneToOneMapping; import org.eclipse.jpt.core.resource.orm.AbstractXmlTypeMapping; -import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping; import org.eclipse.jpt.eclipselink.core.context.EclipseLinkOneToOneMapping; import org.eclipse.jpt.eclipselink.core.context.JoinFetch; import org.eclipse.jpt.eclipselink.core.context.PrivateOwned; @@ -58,8 +57,8 @@ public class EclipseLinkOrmOneToOneMapping extends GenericOrmOneToOneMapping } @Override - public void initialize(XmlAttributeMapping attributeMapping) { - super.initialize(attributeMapping); + protected void initialize() { + super.initialize(); this.privateOwned.initialize((XmlPrivateOwned) this.resourceAttributeMapping); this.joinFetch.initialize((XmlJoinFetch) this.resourceAttributeMapping); } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmVersionMapping.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmVersionMapping.java index 103ad77c76..adf5f27c61 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmVersionMapping.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmVersionMapping.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 Oracle. + * Copyright (c) 2008, 2009 Oracle. * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v1.0 which * accompanies this distribution, and is available at @@ -15,7 +15,6 @@ import org.eclipse.jpt.core.context.orm.OrmConverter; import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute; import org.eclipse.jpt.core.internal.context.orm.GenericOrmVersionMapping; import org.eclipse.jpt.core.resource.orm.AbstractXmlTypeMapping; -import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping; import org.eclipse.jpt.eclipselink.core.context.Convert; import org.eclipse.jpt.eclipselink.core.context.EclipseLinkVersionMapping; import org.eclipse.jpt.eclipselink.core.context.Mutable; @@ -53,12 +52,12 @@ public class EclipseLinkOrmVersionMapping extends GenericOrmVersionMapping } @Override - protected String specifiedConverterType() { + protected String getResourceConverterType() { //check @Convert first, this is the order that EclipseLink searches if (((XmlVersion) this.resourceAttributeMapping).getConvert() != null) { return Convert.ECLIPSE_LINK_CONVERTER; } - return super.specifiedConverterType(); + return super.getResourceConverterType(); } // **************** resource-context interaction *************************** @@ -72,8 +71,8 @@ public class EclipseLinkOrmVersionMapping extends GenericOrmVersionMapping } @Override - public void initialize(XmlAttributeMapping attributeMapping) { - super.initialize(attributeMapping); + protected void initialize() { + super.initialize(); this.mutable.initialize((XmlMutable) this.resourceAttributeMapping); } |