diff options
author | kmoore | 2008-11-10 22:56:29 +0000 |
---|---|---|
committer | kmoore | 2008-11-10 22:56:29 +0000 |
commit | db8cebefb4f592179eaab4837e83cfc423bf2fd4 (patch) | |
tree | fc9e629d226bb45f715f36054755bcad3f39bad1 /jpa | |
parent | 6c1eb9d77aaad66986fc55e064a20d30fd6f794c (diff) | |
download | webtools.dali-db8cebefb4f592179eaab4837e83cfc423bf2fd4.tar.gz webtools.dali-db8cebefb4f592179eaab4837e83cfc423bf2fd4.tar.xz webtools.dali-db8cebefb4f592179eaab4837e83cfc423bf2fd4.zip |
moved getName() setName() up to abstract VirtualXmlAttributeMapping
Diffstat (limited to 'jpa')
12 files changed, 14 insertions, 139 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlAttributeMapping.java index 4bbe74b21e..3126da1d9a 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlAttributeMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlAttributeMapping.java @@ -13,6 +13,7 @@ import org.eclipse.jpt.core.context.java.JavaAttributeMapping; import org.eclipse.jpt.core.context.orm.OrmTypeMapping; import org.eclipse.jpt.core.resource.common.AbstractJpaEObject; import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping; +import org.eclipse.jpt.core.utility.TextRange; public abstract class VirtualXmlAttributeMapping<T extends JavaAttributeMapping> extends AbstractJpaEObject implements XmlAttributeMapping { @@ -39,4 +40,17 @@ public abstract class VirtualXmlAttributeMapping<T extends JavaAttributeMapping> //or maybe we should be asking the javaAttributeMapping for its default or specified mapping key? throw new UnsupportedOperationException(); } + + public String getName() { + return this.javaAttributeMapping.getPersistentAttribute().getName(); + } + + public void setName(@SuppressWarnings("unused")String newName) { + throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$ + } + + public TextRange getNameTextRange() { + return null; + } + } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlBasic.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlBasic.java index 8aa305ec8a..5594004051 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlBasic.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlBasic.java @@ -35,15 +35,6 @@ public class VirtualXmlBasic extends VirtualXmlAttributeMapping<JavaBasicMapping this.column = new VirtualXmlColumn(ormTypeMapping, javaBasicMapping.getColumn()); } - - public String getName() { - return this.javaAttributeMapping.getPersistentAttribute().getName(); - } - - public void setName(@SuppressWarnings("unused")String newName) { - throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$ - } - public XmlColumn getColumn() { return this.column; } @@ -121,10 +112,6 @@ public class VirtualXmlBasic extends VirtualXmlAttributeMapping<JavaBasicMapping throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$ } - public TextRange getNameTextRange() { - return null; - } - public TextRange getEnumeratedTextRange() { return null; } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlEmbedded.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlEmbedded.java index 7fc3a5e7e1..d3e2c1cfd8 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlEmbedded.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlEmbedded.java @@ -19,7 +19,6 @@ import org.eclipse.jpt.core.resource.orm.OrmPackage; import org.eclipse.jpt.core.resource.orm.XmlAttributeOverride; import org.eclipse.jpt.core.resource.orm.XmlColumn; import org.eclipse.jpt.core.resource.orm.XmlEmbedded; -import org.eclipse.jpt.core.utility.TextRange; import org.eclipse.jpt.utility.internal.CollectionTools; /** @@ -33,14 +32,6 @@ public class VirtualXmlEmbedded extends VirtualXmlAttributeMapping<JavaEmbeddedM super(ormTypeMapping, javaEmbeddedMapping); } - public String getName() { - return this.javaAttributeMapping.getPersistentAttribute().getName(); - } - - public void setName(@SuppressWarnings("unused")String newName) { - throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$ - } - public EList<XmlAttributeOverride> getAttributeOverrides() { EList<XmlAttributeOverride> attributeOverrides = new EObjectContainmentEList<XmlAttributeOverride>(XmlAttributeOverride.class, this, OrmPackage.XML_EMBEDDED__ATTRIBUTE_OVERRIDES); ListIterator<JavaAttributeOverride> javaAttributeOverrides; @@ -57,8 +48,4 @@ public class VirtualXmlEmbedded extends VirtualXmlAttributeMapping<JavaEmbeddedM } return attributeOverrides; } - - public TextRange getNameTextRange() { - return null; - } } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlEmbeddedId.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlEmbeddedId.java index 796852c131..6eaa9302e9 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlEmbeddedId.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlEmbeddedId.java @@ -19,7 +19,6 @@ import org.eclipse.jpt.core.resource.orm.OrmPackage; import org.eclipse.jpt.core.resource.orm.XmlAttributeOverride; import org.eclipse.jpt.core.resource.orm.XmlColumn; import org.eclipse.jpt.core.resource.orm.XmlEmbeddedId; -import org.eclipse.jpt.core.utility.TextRange; import org.eclipse.jpt.utility.internal.CollectionTools; /** @@ -33,14 +32,6 @@ public class VirtualXmlEmbeddedId extends VirtualXmlAttributeMapping<JavaEmbedde super(ormTypeMapping, javaEmbeddedIdMapping); } - public String getName() { - return this.javaAttributeMapping.getPersistentAttribute().getName(); - } - - public void setName(@SuppressWarnings("unused")String newName) { - throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$ - } - public EList<XmlAttributeOverride> getAttributeOverrides() { EList<XmlAttributeOverride> attributeOverrides = new EObjectContainmentEList<XmlAttributeOverride>(XmlAttributeOverride.class, this, OrmPackage.XML_EMBEDDED_ID__ATTRIBUTE_OVERRIDES); ListIterator<JavaAttributeOverride> javaAttributeOverrides; @@ -57,8 +48,4 @@ public class VirtualXmlEmbeddedId extends VirtualXmlAttributeMapping<JavaEmbedde } return attributeOverrides; } - - public TextRange getNameTextRange() { - return null; - } } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlId.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlId.java index a1c6e3c929..71cdff3318 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlId.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlId.java @@ -45,14 +45,6 @@ public class VirtualXmlId extends VirtualXmlAttributeMapping<JavaIdMapping> impl this.virtualSequenceGenerator = new VirtualXmlSequenceGenerator(javaIdMapping, this.isOrmMetadataComplete()); } - public String getName() { - return this.javaAttributeMapping.getPersistentAttribute().getName(); - } - - public void setName(@SuppressWarnings("unused")String newName) { - throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$ - } - public XmlColumn getColumn() { return this.column; } @@ -137,10 +129,6 @@ public class VirtualXmlId extends VirtualXmlAttributeMapping<JavaIdMapping> impl throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$ } - public TextRange getNameTextRange() { - return null; - } - public TextRange getEnumeratedTextRange() { return null; } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlManyToMany.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlManyToMany.java index f71055736c..b186719135 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlManyToMany.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlManyToMany.java @@ -42,14 +42,6 @@ public class VirtualXmlManyToMany extends VirtualXmlAttributeMapping<JavaManyToM this.mapKey = new VirtualMapKey(javaManyToManyMapping, this.isOrmMetadataComplete()); } - public String getName() { - return this.javaAttributeMapping.getPersistentAttribute().getName(); - } - - public void setName(@SuppressWarnings("unused") String newName) { - throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$ - } - public FetchType getFetch() { if (this.isOrmMetadataComplete()) { return org.eclipse.jpt.core.context.FetchType.toOrmResourceModel(this.javaAttributeMapping.getDefaultFetch()); @@ -123,10 +115,6 @@ public class VirtualXmlManyToMany extends VirtualXmlAttributeMapping<JavaManyToM throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$ } - public TextRange getNameTextRange() { - return null; - } - public TextRange getMappedByTextRange() { return null; } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlManyToOne.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlManyToOne.java index 3d5a1fdfcb..af58c5dada 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlManyToOne.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlManyToOne.java @@ -20,7 +20,6 @@ import org.eclipse.jpt.core.resource.orm.OrmPackage; import org.eclipse.jpt.core.resource.orm.XmlJoinColumn; import org.eclipse.jpt.core.resource.orm.XmlJoinTable; import org.eclipse.jpt.core.resource.orm.XmlManyToOne; -import org.eclipse.jpt.core.utility.TextRange; import org.eclipse.jpt.utility.internal.CollectionTools; /** @@ -39,14 +38,6 @@ public class VirtualXmlManyToOne extends VirtualXmlAttributeMapping<JavaManyToOn this.virtualCascadeType = new VirtualCascadeType(javaManyToOneMapping.getCascade(), this.isOrmMetadataComplete()); } - public String getName() { - return this.javaAttributeMapping.getPersistentAttribute().getName(); - } - - public void setName(@SuppressWarnings("unused") String newName) { - throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$ - } - public FetchType getFetch() { if (this.isOrmMetadataComplete()) { return org.eclipse.jpt.core.context.FetchType.toOrmResourceModel(this.javaAttributeMapping.getDefaultFetch()); @@ -106,8 +97,4 @@ public class VirtualXmlManyToOne extends VirtualXmlAttributeMapping<JavaManyToOn public void setTargetEntity(@SuppressWarnings("unused") String value) { throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$ } - - public TextRange getNameTextRange() { - return null; - } } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlNullAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlNullAttributeMapping.java index 0a5e0301b9..5c6c196ce3 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlNullAttributeMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlNullAttributeMapping.java @@ -12,7 +12,6 @@ package org.eclipse.jpt.core.internal.context.orm; import org.eclipse.jpt.core.context.java.JavaAttributeMapping; import org.eclipse.jpt.core.context.orm.OrmTypeMapping; import org.eclipse.jpt.core.resource.orm.XmlNullAttributeMapping; -import org.eclipse.jpt.core.utility.TextRange; /** * VirtualVersion is an implementation of Version used when there is @@ -24,16 +23,4 @@ public class VirtualXmlNullAttributeMapping extends VirtualXmlAttributeMapping<J public VirtualXmlNullAttributeMapping(OrmTypeMapping ormTypeMapping, JavaAttributeMapping javaAttributeMapping) { super(ormTypeMapping, javaAttributeMapping); } - - public String getName() { - return this.javaAttributeMapping.getPersistentAttribute().getName(); - } - - public void setName(@SuppressWarnings("unused") String newName) { - throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$ - } - - public TextRange getNameTextRange() { - return null; - } } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlOneToMany.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlOneToMany.java index c2de9fba5e..dac9874452 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlOneToMany.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlOneToMany.java @@ -43,14 +43,6 @@ public class VirtualXmlOneToMany extends VirtualXmlAttributeMapping<JavaOneToMan this.mapKey = new VirtualMapKey(javaOneToManyMapping, this.isOrmMetadataComplete()); } - public String getName() { - return this.javaAttributeMapping.getPersistentAttribute().getName(); - } - - public void setName(@SuppressWarnings("unused") String newName) { - throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$ - } - public FetchType getFetch() { if (this.isOrmMetadataComplete()) { return org.eclipse.jpt.core.context.FetchType.toOrmResourceModel(this.javaAttributeMapping.getDefaultFetch()); @@ -124,10 +116,6 @@ public class VirtualXmlOneToMany extends VirtualXmlAttributeMapping<JavaOneToMan throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$ } - public TextRange getNameTextRange() { - return null; - } - public TextRange getMappedByTextRange() { return null; } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlOneToOne.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlOneToOne.java index cf205455b0..02f36f8357 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlOneToOne.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlOneToOne.java @@ -40,14 +40,6 @@ public class VirtualXmlOneToOne extends VirtualXmlAttributeMapping<JavaOneToOneM super(ormTypeMapping, javaOneToOneMapping); this.virtualCascadeType = new VirtualCascadeType(javaOneToOneMapping.getCascade(), this.isOrmMetadataComplete()); } - - public String getName() { - return this.javaAttributeMapping.getPersistentAttribute().getName(); - } - - public void setName(@SuppressWarnings("unused") String newName) { - throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$ - } public FetchType getFetch() { if (this.isOrmMetadataComplete()) { @@ -132,10 +124,6 @@ public class VirtualXmlOneToOne extends VirtualXmlAttributeMapping<JavaOneToOneM return joinColumns; } - public TextRange getNameTextRange() { - return null; - } - public TextRange getMappedByTextRange() { return null; } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlTransient.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlTransient.java index ce7e603230..85ae039f1e 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlTransient.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlTransient.java @@ -12,7 +12,6 @@ package org.eclipse.jpt.core.internal.context.orm; import org.eclipse.jpt.core.context.java.JavaTransientMapping; import org.eclipse.jpt.core.context.orm.OrmTypeMapping; import org.eclipse.jpt.core.resource.orm.XmlTransient; -import org.eclipse.jpt.core.utility.TextRange; /** * VirtualTransient is an implementation of Transient used when there is @@ -24,17 +23,4 @@ public class VirtualXmlTransient extends VirtualXmlAttributeMapping<JavaTransien public VirtualXmlTransient(OrmTypeMapping ormTypeMapping, JavaTransientMapping javaTransientMapping) { super(ormTypeMapping, javaTransientMapping); } - - public String getName() { - return this.javaAttributeMapping.getPersistentAttribute().getName(); - } - - public void setName(@SuppressWarnings("unused") String newName) { - throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$ - } - - public TextRange getNameTextRange() { - return null; - } - } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlVersion.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlVersion.java index 243a763fab..0baea36e3d 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlVersion.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlVersion.java @@ -33,14 +33,6 @@ public class VirtualXmlVersion extends VirtualXmlAttributeMapping<JavaVersionMap this.column = new VirtualXmlColumn(ormTypeMapping, javaVersionMapping.getColumn()); } - public String getName() { - return this.javaAttributeMapping.getPersistentAttribute().getName(); - } - - public void setName(@SuppressWarnings("unused") String newName) { - throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$ - } - public XmlColumn getColumn() { return this.column; } @@ -82,10 +74,6 @@ public class VirtualXmlVersion extends VirtualXmlAttributeMapping<JavaVersionMap throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$ } - public TextRange getNameTextRange() { - return null; - } - public TextRange getEnumeratedTextRange() { return null; } |