Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmoore2007-05-07 16:21:21 -0400
committerkmoore2007-05-07 16:21:21 -0400
commit94e1efcc6ffe4b8d9c77cdfb8b51a061be0fe64f (patch)
treef936a11d71e783efe8d334fabbbf98cbe84ae61f
parentd832acb26a24fa89f5ccca43b5137193135e2e8f (diff)
downloadwebtools.dali-94e1efcc6ffe4b8d9c77cdfb8b51a061be0fe64f.tar.gz
webtools.dali-94e1efcc6ffe4b8d9c77cdfb8b51a061be0fe64f.tar.xz
webtools.dali-94e1efcc6ffe4b8d9c77cdfb8b51a061be0fe64f.zip
cleaning up JavaDiscriminatorColumn
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaDiscriminatorColumn.java22
1 files changed, 2 insertions, 20 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaDiscriminatorColumn.java
index 29141098ee..fb2b061cc2 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaDiscriminatorColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/java/mappings/JavaDiscriminatorColumn.java
@@ -42,8 +42,6 @@ import org.eclipse.jpt.db.internal.Table;
public class JavaDiscriminatorColumn extends JavaNamedColumn
implements IDiscriminatorColumn
{
- private Type type;
-
private AnnotationElementAdapter discriminatorTypeAdapter;
private IntAnnotationElementAdapter lengthAdapter;
@@ -52,8 +50,6 @@ public class JavaDiscriminatorColumn extends JavaNamedColumn
private static final DeclarationAnnotationElementAdapter DISCRIMINATOR_TYPE_ADAPTER = buildDiscriminatorTypeAdapter();
- private static final DeclarationAnnotationElementAdapter LENGTH_ADAPTER = buildAnnotationElementAdapter(JPA.DISCRIMINATOR_COLUMN__LENGTH);
-
/**
* The default value of the '{@link #getDiscriminatorType() <em>Discriminator Type</em>}' attribute.
@@ -125,20 +121,14 @@ public class JavaDiscriminatorColumn extends JavaNamedColumn
*/
protected static final int LENGTH_EDEFAULT = 0;
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
protected JavaDiscriminatorColumn() {
throw new UnsupportedOperationException();
}
protected JavaDiscriminatorColumn(Owner owner, Type type, DeclarationAnnotationAdapter daa) {
super(owner, type, daa);
- this.type = type;
- this.discriminatorTypeAdapter = new ShortCircuitAnnotationElementAdapter(this.type, DISCRIMINATOR_TYPE_ADAPTER);
- this.lengthAdapter = new IntAnnotationElementAdapter(new ShortCircuitAnnotationElementAdapter(this.type, LENGTH_ADAPTER));
+ this.discriminatorTypeAdapter = buildShortCircuitElementAdapter(DISCRIMINATOR_TYPE_ADAPTER);
+ this.lengthAdapter = this.buildShortCircuitIntElementAdapter(JPA.DISCRIMINATOR_COLUMN__LENGTH);
}
@Override
@@ -447,10 +437,6 @@ public class JavaDiscriminatorColumn extends JavaNamedColumn
return result.toString();
}
- public ITextRange getTextRange() {
- return this.type.textRange();
- }
-
// ********** java annotations -> persistence model **********
public void updateFromJava(CompilationUnit astRoot) {
super.updateFromJava(astRoot);
@@ -462,8 +448,4 @@ public class JavaDiscriminatorColumn extends JavaNamedColumn
private static DeclarationAnnotationElementAdapter buildDiscriminatorTypeAdapter() {
return new EnumDeclarationAnnotationElementAdapter(ANNOTATION_ADAPTER, JPA.DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE);
}
-
- private static DeclarationAnnotationElementAdapter buildAnnotationElementAdapter(String elementName) {
- return new ConversionDeclarationAnnotationElementAdapter(ANNOTATION_ADAPTER, elementName);
- }
} // JavaDiscriminatorColumn

Back to the top