blob: fc53c9e34be93d7139b42a8e3832bc11f0f65260 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 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
*
* Contributors:
* Oracle - initial API and implementation
*******************************************************************************/
package org.eclipse.jpt.eclipselink.core.internal.context.orm;
import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
import org.eclipse.jpt.core.internal.context.orm.GenericOrmEmbeddedMapping;
import org.eclipse.jpt.core.resource.orm.XmlTypeMapping;
import org.eclipse.jpt.eclipselink.core.resource.orm.EclipseLinkOrmFactory;
import org.eclipse.jpt.eclipselink.core.resource.orm.XmlEmbedded;
public class EclipseLinkOrmEmbeddedMapping extends GenericOrmEmbeddedMapping
{
public EclipseLinkOrmEmbeddedMapping(OrmPersistentAttribute parent) {
super(parent);
}
// **************** resource-context interaction ***************************
@Override
public XmlEmbedded addToResourceModel(XmlTypeMapping typeMapping) {
XmlEmbedded embedded = EclipseLinkOrmFactory.eINSTANCE.createXmlEmbeddedImpl();
getPersistentAttribute().initialize(embedded);
typeMapping.getAttributes().getEmbeddeds().add(embedded);
return embedded;
}
}