blob: 2fb4e50da3a9a4d6f3221acfd0ac85fa7a67d9b0 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 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.internal.context.java;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaEmbeddedMapping;
import org.eclipse.jpt.jpa.eclipselink.core.context.java.EclipseLinkJavaConvertibleMapping;
import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaEclipseLinkConverterContainer;
public class JavaEclipseLinkEmbeddedMapping
extends AbstractJavaEmbeddedMapping
implements EclipseLinkJavaConvertibleMapping
{
protected final JavaEclipseLinkConverterContainer converterContainer;
public JavaEclipseLinkEmbeddedMapping(JavaPersistentAttribute parent) {
super(parent);
this.converterContainer = this.buildConverterContainer();
}
// ********** synchronize/update **********
@Override
public void synchronizeWithResourceModel() {
super.synchronizeWithResourceModel();
this.converterContainer.synchronizeWithResourceModel();
}
@Override
public void update() {
super.update();
this.converterContainer.update();
}
// ********** converters **********
public JavaEclipseLinkConverterContainer getConverterContainer() {
return this.converterContainer;
}
protected JavaEclipseLinkConverterContainer buildConverterContainer() {
return new JavaEclipseLinkConverterContainerImpl(this, this);
}
public JavaResourceAnnotatedElement getJavaResourceAnnotatedElement() {
return this.getResourceAttribute();
}
}