Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: bddf4eb67a266754f8a28144d27e8793504b8730 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*******************************************************************************
 *  Copyright (c) 2006 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.core.internal.content.orm.resource;

import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.jpt.core.internal.mappings.JpaCoreMappingsPackage;
import org.eclipse.wst.common.internal.emf.resource.Translator;

public abstract class RelationshipTranslator extends AttributeMappingTranslator 
{
	public RelationshipTranslator(String domNameAndPath) {
		super(domNameAndPath, NO_STYLE);
	}
	
	protected Translator createTargetEntityTranslator() {
		return new Translator(TARGET_ENTITY, JpaCoreMappingsPackage.eINSTANCE.getIRelationshipMapping_SpecifiedTargetEntity(), DOM_ATTRIBUTE);
	}
	
	//placeholder until we support in our model, this allow us
	//to keep the elements in the proper order
	protected Translator createCascadeTranslator() {
		return new Translator(CASCADE , (EStructuralFeature) null);
	}

}

Back to the top