| /******************************************************************************* |
| * Copyright (c) 2008, 2011 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.jpa.eclipselink.core.tests.internal.context; |
| |
| import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDataModelProperties; |
| import org.eclipse.jpt.jpa.core.tests.internal.context.ContextModelTestCase; |
| import org.eclipse.jpt.jpa.eclipselink.core.EclipseLinkJpaProject; |
| import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaEclipseLinkEntity; |
| import org.eclipse.jpt.jpa.eclipselink.core.context.persistence.EclipseLinkPersistenceUnit; |
| import org.eclipse.jpt.jpa.eclipselink.core.platform.EclipseLinkPlatform; |
| import org.eclipse.wst.common.frameworks.datamodel.IDataModel; |
| |
| public abstract class EclipseLinkContextModelTestCase |
| extends ContextModelTestCase |
| { |
| protected EclipseLinkContextModelTestCase(String name) { |
| super(name); |
| } |
| |
| |
| @Override |
| protected IDataModel buildJpaConfigDataModel() { |
| IDataModel dataModel = super.buildJpaConfigDataModel(); |
| dataModel.setProperty(JpaFacetInstallDataModelProperties.PLATFORM, EclipseLinkPlatform.VERSION_1_0); |
| return dataModel; |
| } |
| |
| @Override |
| protected EclipseLinkJpaProject getJpaProject() { |
| return (EclipseLinkJpaProject) super.getJpaProject(); |
| } |
| |
| @Override |
| protected EclipseLinkPersistenceUnit getPersistenceUnit() { |
| return (EclipseLinkPersistenceUnit) super.getPersistenceUnit(); |
| } |
| |
| @Override |
| protected JavaEclipseLinkEntity getJavaEntity() { |
| return (JavaEclipseLinkEntity) getJavaPersistentType().getMapping(); |
| } |
| } |