blob: 3a276373a11d24e31234b73d1e32905a75e55336 [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.core.internal.jpa2.context.java;
import org.eclipse.jpt.core.JpaFactory;
import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
import org.eclipse.jpt.core.internal.context.java.AbstractJavaAttributeMappingDefinition;
import org.eclipse.jpt.core.jpa2.JpaFactory2_0;
import org.eclipse.jpt.core.jpa2.MappingKeys2_0;
import org.eclipse.jpt.core.jpa2.resource.java.ElementCollection2_0Annotation;
public class JavaElementCollectionMappingDefinition2_0
extends AbstractJavaAttributeMappingDefinition
{
// singleton
private static final JavaElementCollectionMappingDefinition2_0 INSTANCE =
new JavaElementCollectionMappingDefinition2_0();
/**
* Return the singleton.
*/
public static JavaAttributeMappingDefinition instance() {
return INSTANCE;
}
/**
* Enforce singleton usage
*/
private JavaElementCollectionMappingDefinition2_0() {
super();
}
public String getKey() {
return MappingKeys2_0.ELEMENT_COLLECTION_ATTRIBUTE_MAPPING_KEY;
}
public String getAnnotationName() {
return ElementCollection2_0Annotation.ANNOTATION_NAME;
}
public JavaAttributeMapping buildMapping(JavaPersistentAttribute parent, JpaFactory factory) {
return ((JpaFactory2_0) factory).buildJavaElementCollectionMapping2_0(parent);
}
}