blob: 8d2760760afb495a3b5398ce3144ec3e66b8348a (
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) 2005, 2007 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.context.base;
public enum InheritanceType {
SINGLE_TABLE,
JOINED,
TABLE_PER_CLASS;
public static InheritanceType fromJavaResourceModel(org.eclipse.jpt.core.internal.resource.java.InheritanceType javaInheritanceType) {
if (javaInheritanceType == org.eclipse.jpt.core.internal.resource.java.InheritanceType.SINGLE_TABLE) {
return SINGLE_TABLE;
}
else if (javaInheritanceType == org.eclipse.jpt.core.internal.resource.java.InheritanceType.JOINED) {
return JOINED;
}
else if (javaInheritanceType == org.eclipse.jpt.core.internal.resource.java.InheritanceType.TABLE_PER_CLASS) {
return TABLE_PER_CLASS;
}
return null;
}
public static org.eclipse.jpt.core.internal.resource.java.InheritanceType toJavaResourceModel(InheritanceType inheritanceType) {
if (inheritanceType == SINGLE_TABLE) {
return org.eclipse.jpt.core.internal.resource.java.InheritanceType.SINGLE_TABLE;
}
else if (inheritanceType == JOINED) {
return org.eclipse.jpt.core.internal.resource.java.InheritanceType.JOINED;
}
else if (inheritanceType == TABLE_PER_CLASS) {
return org.eclipse.jpt.core.internal.resource.java.InheritanceType.TABLE_PER_CLASS;
}
return null;
}
public static InheritanceType fromOrmResourceModel(org.eclipse.jpt.core.internal.resource.orm.InheritanceType ormInheritanceType) {
if (ormInheritanceType == org.eclipse.jpt.core.internal.resource.orm.InheritanceType.SINGLE_TABLE) {
return SINGLE_TABLE;
}
else if (ormInheritanceType == org.eclipse.jpt.core.internal.resource.orm.InheritanceType.JOINED) {
return JOINED;
}
else if (ormInheritanceType == org.eclipse.jpt.core.internal.resource.orm.InheritanceType.TABLE_PER_CLASS) {
return TABLE_PER_CLASS;
}
return null;
}
public static org.eclipse.jpt.core.internal.resource.orm.InheritanceType toOrmResourceModel(InheritanceType inheritanceType) {
if (inheritanceType == SINGLE_TABLE) {
return org.eclipse.jpt.core.internal.resource.orm.InheritanceType.SINGLE_TABLE;
}
else if (inheritanceType == JOINED) {
return org.eclipse.jpt.core.internal.resource.orm.InheritanceType.JOINED;
}
else if (inheritanceType == TABLE_PER_CLASS) {
return org.eclipse.jpt.core.internal.resource.orm.InheritanceType.TABLE_PER_CLASS;
}
return null;
}
}
|