blob: acbb6cc15efd4932d40feb641e1954bd931991d3 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2010 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.core.internal.jpa2.context.java;
import org.eclipse.jpt.common.utility.internal.ArrayTools;
import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
import org.eclipse.jpt.jpa.core.context.java.DefaultJavaAttributeMappingDefinition;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaEmbeddedMappingDefinition;
import org.eclipse.jpt.jpa.core.resource.java.AssociationOverrideAnnotation;
import org.eclipse.jpt.jpa.core.resource.java.AssociationOverridesAnnotation;
public class JavaEmbeddedMappingDefinition2_0
extends AbstractJavaEmbeddedMappingDefinition
{
// singleton
private static final DefaultJavaAttributeMappingDefinition INSTANCE = new JavaEmbeddedMappingDefinition2_0();
/**
* Return the singleton.
*/
public static DefaultJavaAttributeMappingDefinition instance() {
return INSTANCE;
}
/**
* Enforce singleton usage
*/
private JavaEmbeddedMappingDefinition2_0() {
super();
}
@Override
public Iterable<String> getSupportingAnnotationNames() {
return COMBINED_SUPPORTING_ANNOTATION_NAMES;
}
protected static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0 = new String[] {
AssociationOverrideAnnotation.ANNOTATION_NAME,
AssociationOverridesAnnotation.ANNOTATION_NAME,
};
protected static final String[] COMBINED_SUPPORTING_ANNOTATION_NAMES_ARRAY = ArrayTools.concatenate(
SUPPORTING_ANNOTATION_NAMES_ARRAY,
SUPPORTING_ANNOTATION_NAMES_ARRAY_2_0
);
protected static final Iterable<String> COMBINED_SUPPORTING_ANNOTATION_NAMES = new ArrayIterable<String>(COMBINED_SUPPORTING_ANNOTATION_NAMES_ARRAY);
}