diff options
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinarySecondaryTableAnnotation.java')
-rw-r--r-- | jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinarySecondaryTableAnnotation.java | 115 |
1 files changed, 0 insertions, 115 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinarySecondaryTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinarySecondaryTableAnnotation.java deleted file mode 100644 index 7e018e6cb9..0000000000 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinarySecondaryTableAnnotation.java +++ /dev/null @@ -1,115 +0,0 @@ -/******************************************************************************* - * 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.resource.java.binary; - -import java.util.ListIterator; -import java.util.Vector; - -import org.eclipse.jdt.core.IAnnotation; -import org.eclipse.jpt.core.resource.java.JPA; -import org.eclipse.jpt.core.resource.java.JavaResourceNode; -import org.eclipse.jpt.core.resource.java.NestableSecondaryTableAnnotation; -import org.eclipse.jpt.core.resource.java.PrimaryKeyJoinColumnAnnotation; -import org.eclipse.jpt.utility.internal.iterators.CloneListIterator; - -/** - * javax.persistence.SecondaryTable - */ -public final class BinarySecondaryTableAnnotation - extends BinaryBaseTableAnnotation - implements NestableSecondaryTableAnnotation -{ - private final Vector<PrimaryKeyJoinColumnAnnotation> pkJoinColumns; - - public BinarySecondaryTableAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) { - super(parent, jdtAnnotation); - this.pkJoinColumns = this.buildPkJoinColumns(); - } - - public String getAnnotationName() { - return ANNOTATION_NAME; - } - - @Override - public void update() { - super.update(); - this.updatePkJoinColumns(); - } - - - // ********** BinaryBaseTableAnnotation implementation ********** - - @Override - protected String getNameElementName() { - return JPA.SECONDARY_TABLE__NAME; - } - - @Override - protected String getSchemaElementName() { - return JPA.SECONDARY_TABLE__SCHEMA; - } - - @Override - protected String getCatalogElementName() { - return JPA.SECONDARY_TABLE__CATALOG; - } - - @Override - protected String getUniqueConstraintElementName() { - return JPA.SECONDARY_TABLE__UNIQUE_CONSTRAINTS; - } - - - // ************* SecondaryTableAnnotation implementation ******************* - - // ***** pk join columns - public ListIterator<PrimaryKeyJoinColumnAnnotation> pkJoinColumns() { - return new CloneListIterator<PrimaryKeyJoinColumnAnnotation>(this.pkJoinColumns); - } - - public int pkJoinColumnsSize() { - return this.pkJoinColumns.size(); - } - - public PrimaryKeyJoinColumnAnnotation pkJoinColumnAt(int index) { - return this.pkJoinColumns.get(index); - } - - public int indexOfPkJoinColumn(PrimaryKeyJoinColumnAnnotation pkJoinColumn) { - return this.pkJoinColumns.indexOf(pkJoinColumn); - } - - public PrimaryKeyJoinColumnAnnotation addPkJoinColumn(int index) { - throw new UnsupportedOperationException(); - } - - public void movePkJoinColumn(int targetIndex, int sourceIndex) { - throw new UnsupportedOperationException(); - } - - public void removePkJoinColumn(int index) { - throw new UnsupportedOperationException(); - } - - private Vector<PrimaryKeyJoinColumnAnnotation> buildPkJoinColumns() { - Object[] jdtJoinColumns = this.getJdtMemberValues(JPA.SECONDARY_TABLE__PK_JOIN_COLUMNS); - Vector<PrimaryKeyJoinColumnAnnotation> result = new Vector<PrimaryKeyJoinColumnAnnotation>(jdtJoinColumns.length); - for (Object jdtJoinColumn : jdtJoinColumns) { - result.add(new BinaryPrimaryKeyJoinColumnAnnotation(this, (IAnnotation) jdtJoinColumn)); - } - return result; - } - - // TODO - private void updatePkJoinColumns() { - throw new UnsupportedOperationException(); - } - -} |