diff options
author | pfullbright | 2008-10-28 20:17:29 +0000 |
---|---|---|
committer | pfullbright | 2008-10-28 20:17:29 +0000 |
commit | 9babe3e8a39b1622f03fda4ceeeb14ad4f2e3953 (patch) | |
tree | 02dc64aa7ce4a690dd966b26d6f1f45f31408819 /jpa/plugins | |
parent | 98b9f5d6046c761f80b0328a0fa6dd070b92cdd1 (diff) | |
download | webtools.dali-9babe3e8a39b1622f03fda4ceeeb14ad4f2e3953.tar.gz webtools.dali-9babe3e8a39b1622f03fda4ceeeb14ad4f2e3953.tar.xz webtools.dali-9babe3e8a39b1622f03fda4ceeeb14ad4f2e3953.zip |
support for change tracking on orm embeddables, entities, and mapped superclasses in context model and UI
Diffstat (limited to 'jpa/plugins')
9 files changed, 208 insertions, 76 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/context/ChangeTrackingType.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/context/ChangeTrackingType.java index 4b11606bc1..396500f9f8 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/context/ChangeTrackingType.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/context/ChangeTrackingType.java @@ -9,6 +9,8 @@ ******************************************************************************/ package org.eclipse.jpt.eclipselink.core.context; +import org.eclipse.jpt.eclipselink.core.resource.orm.XmlChangeTrackingType; + /** * @@ -66,53 +68,39 @@ public enum ChangeTrackingType { } } - -// public static CacheType fromOrmResourceModel(org.eclipse.jpt.core.resource.orm.FetchType ormCacheType) { -// if (ormCacheType == null) { -// return null; -// } -// switch (ormCacheType) { -// case FULL: -// return FULL; -// case WEAK: -// return WEAK; -// case SOFT: -// return SOFT; -// case SOFT_WEAK: -// return SOFT_WEAK; -// case HARD_WEAK: -// return HARD_WEAK; -// case CACHE: -// return CACHE; -// case NONE: -// return NONE; -// default: -// throw new IllegalArgumentException("unknown cache type: " + ormCacheType); -// } -// } -// -// public static org.eclipse.jpt.core.resource.orm.FetchType toOrmResourceModel(CacheType cacheType) { -// if (cacheType == null) { -// return null; -// } -// switch (cacheType) { -// case FULL: -// return org.eclipse.jpt.core.resource.orm.FetchType.FULL; -// case WEAK: -// return org.eclipse.jpt.core.resource.orm.FetchType.WEAK; -// case SOFT: -// return org.eclipse.jpt.core.resource.orm.FetchType.SOFT; -// case SOFT_WEAK: -// return org.eclipse.jpt.core.resource.orm.FetchType.SOFT_WEAK; -// case HARD_WEAK: -// return org.eclipse.jpt.core.resource.orm.FetchType.HARD_WEAK; -// case CACHE: -// return org.eclipse.jpt.core.resource.orm.FetchType.CACHE; -// case NONE: -// return org.eclipse.jpt.core.resource.orm.FetchType.NONE; -// default: -// throw new IllegalArgumentException("unknown cache type: " + cacheType); -// } -// } - + public static ChangeTrackingType fromOrmResourceModel(XmlChangeTrackingType ormChangeTrackingType) { + if (ormChangeTrackingType == null) { + return null; + } + switch (ormChangeTrackingType) { + case ATTRIBUTE: + return ATTRIBUTE; + case OBJECT: + return OBJECT; + case DEFERRED: + return DEFERRED; + case AUTO: + return AUTO; + default: + throw new IllegalArgumentException("unknown change tracking type: " + ormChangeTrackingType); + } + } + + public static XmlChangeTrackingType toOrmResourceModel(ChangeTrackingType changeTrackingType) { + if (changeTrackingType == null) { + return null; + } + switch (changeTrackingType) { + case ATTRIBUTE: + return XmlChangeTrackingType.ATTRIBUTE; + case OBJECT: + return XmlChangeTrackingType.OBJECT; + case DEFERRED: + return XmlChangeTrackingType.DEFERRED; + case AUTO: + return XmlChangeTrackingType.AUTO; + default: + throw new IllegalArgumentException("unknown change tracking type: " + changeTrackingType); + } + } } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmChangeTracking.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmChangeTracking.java new file mode 100644 index 0000000000..fe7d564d88 --- /dev/null +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmChangeTracking.java @@ -0,0 +1,107 @@ +/******************************************************************************* + * Copyright (c) 2008 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 + * + * Contributors: + * Oracle - initial API and implementation + *******************************************************************************/ +package org.eclipse.jpt.eclipselink.core.internal.context.orm; + +import org.eclipse.jpt.core.context.orm.OrmTypeMapping; +import org.eclipse.jpt.core.internal.context.AbstractXmlContextNode; +import org.eclipse.jpt.core.utility.TextRange; +import org.eclipse.jpt.eclipselink.core.context.ChangeTracking; +import org.eclipse.jpt.eclipselink.core.context.ChangeTrackingType; +import org.eclipse.jpt.eclipselink.core.resource.orm.EclipseLinkOrmFactory; +import org.eclipse.jpt.eclipselink.core.resource.orm.XmlChangeTracking; +import org.eclipse.jpt.eclipselink.core.resource.orm.XmlChangeTrackingHolder; + +public class EclipseLinkOrmChangeTracking extends AbstractXmlContextNode + implements ChangeTracking +{ + protected XmlChangeTrackingHolder resource; + + protected ChangeTrackingType defaultType; + + protected ChangeTrackingType specifiedType; + + + public EclipseLinkOrmChangeTracking(OrmTypeMapping parent) { + super(parent); + } + + + public ChangeTrackingType getType() { + return (getSpecifiedType() != null) ? getSpecifiedType() : getDefaultType(); + } + + public ChangeTrackingType getDefaultType() { + return this.defaultType; + } + + protected void setDefaultType_(ChangeTrackingType newDefaultType) { + ChangeTrackingType oldDefaultType = this.defaultType; + this.defaultType = newDefaultType; + firePropertyChanged(DEFAULT_TYPE_PROPERTY, oldDefaultType, newDefaultType); + } + + public ChangeTrackingType getSpecifiedType() { + return this.specifiedType; + } + + public void setSpecifiedType(ChangeTrackingType newSpecifiedType) { + ChangeTrackingType oldSpecifiedType = this.specifiedType; + this.specifiedType = newSpecifiedType; + + if (newSpecifiedType == null) { + this.resource.setChangeTracking(null); + } + else { + if (this.resource.getChangeTracking() == null) { + this.resource.setChangeTracking(EclipseLinkOrmFactory.eINSTANCE.createXmlChangeTracking()); + } + this.resource.getChangeTracking().setType(ChangeTrackingType.toOrmResourceModel(newSpecifiedType)); + } + + firePropertyChanged(SPECIFIED_TYPE_PROPERTY, oldSpecifiedType, newSpecifiedType); + } + + protected void setSpecifiedType_(ChangeTrackingType newSpecifiedType) { + ChangeTrackingType oldSpecifiedType = this.specifiedType; + this.specifiedType = newSpecifiedType; + firePropertyChanged(SPECIFIED_TYPE_PROPERTY, oldSpecifiedType, newSpecifiedType); + } + + + // **************** initialize/update ************************************** + + protected void initialize(XmlChangeTrackingHolder xmlChangeTrackingHolder, ChangeTracking javaChangeTracking) { + this.resource = xmlChangeTrackingHolder; + this.defaultType = calculateDefaultType(javaChangeTracking); + this.specifiedType = calculateSpecifiedType(xmlChangeTrackingHolder); + } + + protected void update(XmlChangeTrackingHolder xmlChangeTrackingHolder, ChangeTracking javaChangeTracking) { + setDefaultType_(calculateDefaultType(javaChangeTracking)); + setSpecifiedType_(calculateSpecifiedType(xmlChangeTrackingHolder)); + } + + protected ChangeTrackingType calculateDefaultType(ChangeTracking javaChangeTracking) { + return (javaChangeTracking != null) ? javaChangeTracking.getType() : ChangeTracking.DEFAULT_TYPE; + } + + protected ChangeTrackingType calculateSpecifiedType(XmlChangeTrackingHolder xmlChangeTrackingHolder) { + XmlChangeTracking xmlChangeTracking = xmlChangeTrackingHolder.getChangeTracking(); + return (xmlChangeTracking != null) ? ChangeTrackingType.fromOrmResourceModel(xmlChangeTracking.getType()) : null; + } + + + // **************** validation ************************************** + + public TextRange getValidationTextRange() { + return this.resource.getValidationTextRange(); + } +} diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmEmbeddable.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmEmbeddable.java index 113bbd6fca..56f618be45 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmEmbeddable.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmEmbeddable.java @@ -19,6 +19,7 @@ import org.eclipse.jpt.eclipselink.core.context.Customizer; import org.eclipse.jpt.eclipselink.core.context.EclipseLinkEmbeddable; import org.eclipse.jpt.eclipselink.core.context.java.EclipseLinkJavaEmbeddable; import org.eclipse.jpt.eclipselink.core.resource.orm.EclipseLinkOrmFactory; +import org.eclipse.jpt.eclipselink.core.resource.orm.XmlChangeTrackingHolder; import org.eclipse.jpt.eclipselink.core.resource.orm.XmlCustomizerHolder; import org.eclipse.wst.validation.internal.provisional.core.IMessage; @@ -27,21 +28,23 @@ public class EclipseLinkOrmEmbeddable extends GenericOrmEmbeddable { protected final EclipseLinkOrmCustomizer customizer; + protected final EclipseLinkOrmChangeTracking changeTracking; + public EclipseLinkOrmEmbeddable(OrmPersistentType parent) { super(parent); this.customizer = new EclipseLinkOrmCustomizer(this); + this.changeTracking = new EclipseLinkOrmChangeTracking(this); } - public ChangeTracking getChangeTracking() { - // TODO Auto-generated method stub - return null; - } - + public Customizer getCustomizer() { return this.customizer; } + public ChangeTracking getChangeTracking() { + return this.changeTracking; + } // **************** resource-context interaction *************************** @@ -55,15 +58,17 @@ public class EclipseLinkOrmEmbeddable extends GenericOrmEmbeddable } @Override - public void initialize(XmlEmbeddable mappedSuperclass) { - super.initialize(mappedSuperclass); - this.customizer.initialize((XmlCustomizerHolder) mappedSuperclass, getJavaCustomizer()); + public void initialize(XmlEmbeddable embeddable) { + super.initialize(embeddable); + this.customizer.initialize((XmlCustomizerHolder) embeddable, getJavaCustomizer()); + this.changeTracking.initialize((XmlChangeTrackingHolder) embeddable, getJavaChangeTracking()); } @Override - public void update(XmlEmbeddable mappedSuperclass) { - super.update(mappedSuperclass); - this.customizer.update((XmlCustomizerHolder) mappedSuperclass, getJavaCustomizer()); + public void update(XmlEmbeddable embeddable) { + super.update(embeddable); + this.customizer.update((XmlCustomizerHolder) embeddable, getJavaCustomizer()); + this.changeTracking.update((XmlChangeTrackingHolder) embeddable, getJavaChangeTracking()); } @Override @@ -71,12 +76,16 @@ public class EclipseLinkOrmEmbeddable extends GenericOrmEmbeddable return (EclipseLinkJavaEmbeddable) super.getJavaEmbeddableForDefaults(); } - protected Customizer getJavaCustomizer() { EclipseLinkJavaEmbeddable javaEmbeddable = getJavaEmbeddableForDefaults(); return (javaEmbeddable == null) ? null : javaEmbeddable.getCustomizer(); } + protected ChangeTracking getJavaChangeTracking() { + EclipseLinkJavaEmbeddable javaEmbeddable = getJavaEmbeddableForDefaults(); + return (javaEmbeddable == null) ? null : javaEmbeddable.getChangeTracking(); + } + // **************** validation ************************************** @@ -84,5 +93,6 @@ public class EclipseLinkOrmEmbeddable extends GenericOrmEmbeddable public void validate(List<IMessage> messages) { super.validate(messages); this.customizer.validate(messages); + this.changeTracking.validate(messages); } } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmEntity.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmEntity.java index 72f4c2df66..a6865d6d2e 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmEntity.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmEntity.java @@ -23,6 +23,7 @@ import org.eclipse.jpt.eclipselink.core.context.java.EclipseLinkJavaEntity; import org.eclipse.jpt.eclipselink.core.context.java.JavaCaching; import org.eclipse.jpt.eclipselink.core.resource.orm.EclipseLinkOrmFactory; import org.eclipse.jpt.eclipselink.core.resource.orm.XmlCacheHolder; +import org.eclipse.jpt.eclipselink.core.resource.orm.XmlChangeTrackingHolder; import org.eclipse.jpt.eclipselink.core.resource.orm.XmlCustomizerHolder; import org.eclipse.jpt.eclipselink.core.resource.orm.XmlReadOnly; import org.eclipse.wst.validation.internal.provisional.core.IMessage; @@ -31,7 +32,11 @@ public class EclipseLinkOrmEntity extends GenericOrmEntity implements EclipseLinkEntity { protected final EclipseLinkOrmReadOnly readOnly; + protected final EclipseLinkOrmCustomizer customizer; + + protected final EclipseLinkOrmChangeTracking changeTracking; + protected final EclipseLinkOrmCaching caching; @@ -39,6 +44,7 @@ public class EclipseLinkOrmEntity extends GenericOrmEntity super(parent); this.readOnly = new EclipseLinkOrmReadOnly(this); this.customizer = new EclipseLinkOrmCustomizer(this); + this.changeTracking = new EclipseLinkOrmChangeTracking(this); this.caching = new EclipseLinkOrmCaching(this); } @@ -46,15 +52,14 @@ public class EclipseLinkOrmEntity extends GenericOrmEntity return this.caching; } - public ChangeTracking getChangeTracking() { - // TODO Auto-generated method stub - return null; - } - public Customizer getCustomizer() { return this.customizer; } + public ChangeTracking getChangeTracking() { + return this.changeTracking; + } + public EclipseLinkOrmReadOnly getReadOnly() { return this.readOnly; } @@ -75,6 +80,7 @@ public class EclipseLinkOrmEntity extends GenericOrmEntity super.initialize(entity); this.readOnly.initialize((XmlReadOnly) entity, getJavaReadOnly()); this.customizer.initialize((XmlCustomizerHolder) entity, getJavaCustomizer()); + this.changeTracking.initialize((XmlChangeTrackingHolder) entity, getJavaChangeTracking()); this.caching.initialize((XmlCacheHolder) entity, getJavaCaching()); } @@ -83,6 +89,7 @@ public class EclipseLinkOrmEntity extends GenericOrmEntity super.update(entity); this.readOnly.update((XmlReadOnly) entity, getJavaReadOnly()); this.customizer.update((XmlCustomizerHolder) entity, getJavaCustomizer()); + this.changeTracking.update((XmlChangeTrackingHolder) entity, getJavaChangeTracking()); this.caching.update((XmlCacheHolder) entity, getJavaCaching()); } @@ -101,6 +108,11 @@ public class EclipseLinkOrmEntity extends GenericOrmEntity return (javaEntity == null) ? null : javaEntity.getCustomizer(); } + protected ChangeTracking getJavaChangeTracking() { + EclipseLinkJavaEntity javaEntity = getJavaEntityForDefaults(); + return (javaEntity == null) ? null : javaEntity.getChangeTracking(); + } + protected JavaCaching getJavaCaching() { EclipseLinkJavaEntity javaEntity = getJavaEntityForDefaults(); return (javaEntity == null) ? null : javaEntity.getCaching(); @@ -114,6 +126,7 @@ public class EclipseLinkOrmEntity extends GenericOrmEntity super.validate(messages); this.readOnly.validate(messages); this.customizer.validate(messages); + this.changeTracking.validate(messages); this.caching.validate(messages); } } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmMappedSuperclass.java index aeb07ab963..d5ba0cc27f 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmMappedSuperclass.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmMappedSuperclass.java @@ -23,15 +23,21 @@ import org.eclipse.jpt.eclipselink.core.context.java.EclipseLinkJavaMappedSuperc import org.eclipse.jpt.eclipselink.core.context.java.JavaCaching; import org.eclipse.jpt.eclipselink.core.resource.orm.EclipseLinkOrmFactory; import org.eclipse.jpt.eclipselink.core.resource.orm.XmlCacheHolder; +import org.eclipse.jpt.eclipselink.core.resource.orm.XmlChangeTrackingHolder; import org.eclipse.jpt.eclipselink.core.resource.orm.XmlCustomizerHolder; import org.eclipse.jpt.eclipselink.core.resource.orm.XmlReadOnly; import org.eclipse.wst.validation.internal.provisional.core.IMessage; + public class EclipseLinkOrmMappedSuperclass extends GenericOrmMappedSuperclass implements EclipseLinkMappedSuperclass { protected final EclipseLinkOrmReadOnly readOnly; + protected final EclipseLinkOrmCustomizer customizer; + + protected final EclipseLinkOrmChangeTracking changeTracking; + protected final EclipseLinkOrmCaching caching; @@ -39,6 +45,7 @@ public class EclipseLinkOrmMappedSuperclass extends GenericOrmMappedSuperclass super(parent); this.readOnly = new EclipseLinkOrmReadOnly(this); this.customizer = new EclipseLinkOrmCustomizer(this); + this.changeTracking = new EclipseLinkOrmChangeTracking(this); this.caching = new EclipseLinkOrmCaching(this); } @@ -46,15 +53,14 @@ public class EclipseLinkOrmMappedSuperclass extends GenericOrmMappedSuperclass return this.caching; } - public ChangeTracking getChangeTracking() { - // TODO Auto-generated method stub - return null; - } - public Customizer getCustomizer() { return this.customizer; } + public ChangeTracking getChangeTracking() { + return this.changeTracking; + } + public EclipseLinkOrmReadOnly getReadOnly() { return this.readOnly; } @@ -75,6 +81,7 @@ public class EclipseLinkOrmMappedSuperclass extends GenericOrmMappedSuperclass super.initialize(mappedSuperclass); this.readOnly.initialize((XmlReadOnly) mappedSuperclass, getJavaReadOnly()); this.customizer.initialize((XmlCustomizerHolder) mappedSuperclass, getJavaCustomizer()); + this.changeTracking.initialize((XmlChangeTrackingHolder) mappedSuperclass, getJavaChangeTracking()); this.caching.initialize((XmlCacheHolder) mappedSuperclass, getJavaCaching()); } @@ -83,6 +90,7 @@ public class EclipseLinkOrmMappedSuperclass extends GenericOrmMappedSuperclass super.update(mappedSuperclass); this.readOnly.update((XmlReadOnly) mappedSuperclass, getJavaReadOnly()); this.customizer.update((XmlCustomizerHolder) mappedSuperclass, getJavaCustomizer()); + this.changeTracking.update((XmlChangeTrackingHolder) mappedSuperclass, getJavaChangeTracking()); this.caching.update((XmlCacheHolder) mappedSuperclass, getJavaCaching()); } @@ -101,6 +109,11 @@ public class EclipseLinkOrmMappedSuperclass extends GenericOrmMappedSuperclass return (javaMappedSuperclass == null) ? null : javaMappedSuperclass.getCustomizer(); } + protected ChangeTracking getJavaChangeTracking() { + EclipseLinkJavaMappedSuperclass javaMappedSuperclass = getJavaMappedSuperclassForDefaults(); + return (javaMappedSuperclass == null) ? null : javaMappedSuperclass.getChangeTracking(); + } + protected JavaCaching getJavaCaching() { EclipseLinkJavaMappedSuperclass javaMappedSuperclass = getJavaMappedSuperclassForDefaults(); return (javaMappedSuperclass == null) ? null : javaMappedSuperclass.getCaching(); @@ -114,6 +127,7 @@ public class EclipseLinkOrmMappedSuperclass extends GenericOrmMappedSuperclass super.validate(messages); this.readOnly.validate(messages); this.customizer.validate(messages); + this.changeTracking.validate(messages); this.caching.validate(messages); } } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/orm/translators/EclipseLinkChangeTrackingTranslator.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/orm/translators/EclipseLinkChangeTrackingTranslator.java index 43fb2fee09..a78f559ec2 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/orm/translators/EclipseLinkChangeTrackingTranslator.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/orm/translators/EclipseLinkChangeTrackingTranslator.java @@ -19,8 +19,8 @@ public class EclipseLinkChangeTrackingTranslator extends Translator private Translator[] children; - public EclipseLinkChangeTrackingTranslator(String domNameAndPath, EStructuralFeature aFeature) { - super(domNameAndPath, aFeature); + public EclipseLinkChangeTrackingTranslator(String domNameAndPath, EStructuralFeature aFeature, int style) { + super(domNameAndPath, aFeature, style); } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/orm/translators/EclipseLinkEmbeddableTranslator.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/orm/translators/EclipseLinkEmbeddableTranslator.java index 61ae27b2fa..54e37881ee 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/orm/translators/EclipseLinkEmbeddableTranslator.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/orm/translators/EclipseLinkEmbeddableTranslator.java @@ -46,6 +46,6 @@ public class EclipseLinkEmbeddableTranslator extends EmbeddableTranslator } protected Translator createChangeTrackingTranslator() { - return new EclipseLinkChangeTrackingTranslator(CHANGE_TRACKING, ECLIPSELINK_ORM_PKG.getXmlChangeTrackingHolder_ChangeTracking()); + return new EclipseLinkChangeTrackingTranslator(CHANGE_TRACKING, ECLIPSELINK_ORM_PKG.getXmlChangeTrackingHolder_ChangeTracking(), END_TAG_NO_INDENT); } } diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/orm/translators/EclipseLinkEntityTranslator.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/orm/translators/EclipseLinkEntityTranslator.java index 2f2e86e1e5..cbeba1a978 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/orm/translators/EclipseLinkEntityTranslator.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/orm/translators/EclipseLinkEntityTranslator.java @@ -84,7 +84,7 @@ public class EclipseLinkEntityTranslator extends EntityTranslator } protected Translator createChangeTrackingTranslator() { - return new EclipseLinkChangeTrackingTranslator(CHANGE_TRACKING, ECLIPSELINK_ORM_PKG.getXmlChangeTrackingHolder_ChangeTracking()); + return new EclipseLinkChangeTrackingTranslator(CHANGE_TRACKING, ECLIPSELINK_ORM_PKG.getXmlChangeTrackingHolder_ChangeTracking(), END_TAG_NO_INDENT); } protected Translator createCacheTranslator() { diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/orm/translators/EclipseLinkMappedSuperclassTranslator.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/orm/translators/EclipseLinkMappedSuperclassTranslator.java index af4ca28654..e12b037128 100644 --- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/orm/translators/EclipseLinkMappedSuperclassTranslator.java +++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/orm/translators/EclipseLinkMappedSuperclassTranslator.java @@ -70,7 +70,7 @@ public class EclipseLinkMappedSuperclassTranslator extends MappedSuperclassTrans } protected Translator createChangeTrackingTranslator() { - return new EclipseLinkChangeTrackingTranslator(CHANGE_TRACKING, ECLIPSELINK_ORM_PKG.getXmlChangeTrackingHolder_ChangeTracking()); + return new EclipseLinkChangeTrackingTranslator(CHANGE_TRACKING, ECLIPSELINK_ORM_PKG.getXmlChangeTrackingHolder_ChangeTracking(), END_TAG_NO_INDENT); } protected Translator createCacheTranslator() { |