blob: d07c9cfa3fc3e7c0b8ebc748d4a0e34aa26bbc7a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
/*******************************************************************************
* Copyright (c) 2007, 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.eclipselink.core.internal.v1_2;
import org.eclipse.jpt.core.JpaAnnotationProvider;
import org.eclipse.jpt.core.JpaPlatform;
import org.eclipse.jpt.core.JpaPlatformFactory;
import org.eclipse.jpt.core.JpaPlatformVariation;
import org.eclipse.jpt.core.JptCorePlugin;
import org.eclipse.jpt.core.internal.GenericJpaAnnotationDefinitionProvider;
import org.eclipse.jpt.core.internal.GenericJpaAnnotationProvider;
import org.eclipse.jpt.core.internal.GenericJpaPlatform;
import org.eclipse.jpt.eclipselink.core.internal.EclipseLinkJpaAnnotationDefinitionProvider;
import org.eclipse.jpt.eclipselink.core.internal.JptEclipseLinkCorePlugin;
import org.eclipse.jpt.eclipselink.core.internal.EclipseLinkJpaPlatformFactory.EclipseLinkVersion;
/**
* All the state in the JPA platform should be "static" (i.e. unchanging once
* it is initialized).
*/
public class EclipseLink1_2JpaPlatformFactory
implements JpaPlatformFactory
{
/**
* zero-argument constructor
*/
public EclipseLink1_2JpaPlatformFactory() {
super();
}
public JpaPlatform buildJpaPlatform(String id) {
return new GenericJpaPlatform(
id,
buildJpaVersion(),
new EclipseLink1_2JpaFactory(),
buildJpaAnnotationProvider(),
EclipseLink1_2JpaPlatformProvider.instance(),
buildJpaPlatformVariation());
}
protected JpaAnnotationProvider buildJpaAnnotationProvider() {
return new GenericJpaAnnotationProvider(
GenericJpaAnnotationDefinitionProvider.instance(),
EclipseLinkJpaAnnotationDefinitionProvider.instance(),
EclipseLink1_2JpaAnnotationDefinitionProvider.instance());
}
protected JpaPlatformVariation buildJpaPlatformVariation() {
return new JpaPlatformVariation() {
public Supported getTablePerConcreteClassInheritanceIsSupported() {
return Supported.YES;
}
public boolean isJoinTableOverridable() {
return false;
}
};
}
private JpaPlatform.Version buildJpaVersion() {
return new EclipseLinkVersion(
JptEclipseLinkCorePlugin.ECLIPSELINK_PLATFORM_VERSION_1_2,
JptCorePlugin.JPA_FACET_VERSION_1_0
);
}
}
|