diff options
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryUniqueConstraintAnnotation.java')
-rw-r--r-- | jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryUniqueConstraintAnnotation.java | 97 |
1 files changed, 0 insertions, 97 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryUniqueConstraintAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryUniqueConstraintAnnotation.java deleted file mode 100644 index 2d8af3aec7..0000000000 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryUniqueConstraintAnnotation.java +++ /dev/null @@ -1,97 +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.jdt.core.dom.CompilationUnit; -import org.eclipse.jpt.core.resource.java.JPA; -import org.eclipse.jpt.core.resource.java.JavaResourceNode; -import org.eclipse.jpt.core.resource.java.UniqueConstraintAnnotation; -import org.eclipse.jpt.utility.internal.iterators.CloneListIterator; - -/** - * javax.persistence.UniqueConstraint - */ -final class BinaryUniqueConstraintAnnotation - extends BinaryAnnotation - implements UniqueConstraintAnnotation -{ - private final Vector<String> columnNames; - - - BinaryUniqueConstraintAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) { - super(parent, jdtAnnotation); - this.columnNames = this.buildColumnNames(); - } - - public String getAnnotationName() { - return ANNOTATION_NAME; - } - - @Override - public void update() { - super.update(); - this.updateColumnNames(); - } - - // TODO - private void updateColumnNames() { - throw new UnsupportedOperationException(); - } - - - // ********** UniqueConstraintAnnotation implementation ********** - - // ***** column names - public ListIterator<String> columnNames() { - return new CloneListIterator<String>(this.columnNames); - } - - public int columnNamesSize() { - return this.columnNames.size(); - } - - private Vector<String> buildColumnNames() { - Object[] jdtColumnNames = this.getJdtMemberValues(JPA.UNIQUE_CONSTRAINT__COLUMN_NAMES); - Vector<String> result = new Vector<String>(jdtColumnNames.length); - for (Object jdtColumnName : jdtColumnNames) { - result.add((String) jdtColumnName); - } - return result; - } - - public void addColumnName(String columnName) { - throw new UnsupportedOperationException(); - } - - public void addColumnName(int index, String columnName) { - throw new UnsupportedOperationException(); - } - - public void moveColumnName(int targetIndex, int sourceIndex) { - throw new UnsupportedOperationException(); - } - - public boolean columnNamesTouches(int pos, CompilationUnit astRoot) { - throw new UnsupportedOperationException(); - } - - public void removeColumnName(String columnName) { - throw new UnsupportedOperationException(); - } - - public void removeColumnName(int index) { - throw new UnsupportedOperationException(); - } - -} |