org.eclipse.jpt.core.resource.java
Interface BaseTableAnnotation

All Superinterfaces:
Annotation, JavaResourceNode, Model
All Known Subinterfaces:
CollectionTable2_0Annotation, JoinTableAnnotation, NestableJoinTableAnnotation, NestableSecondaryTableAnnotation, ReferenceTableAnnotation, SecondaryTableAnnotation, TableAnnotation

public interface BaseTableAnnotation
extends Annotation

Common protocol among: javax.persistence.Table javax.persistence.JoinTable javax.persistence.SecondaryTable Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

Since:
2.2
Version:
2.3

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.core.resource.java.JavaResourceNode
JavaResourceNode.Root
 
Field Summary
static java.lang.String CATALOG_PROPERTY
           
static java.lang.String NAME_PROPERTY
           
static java.lang.String SCHEMA_PROPERTY
           
static java.lang.String UNIQUE_CONSTRAINTS_LIST
           
 
Method Summary
 UniqueConstraintAnnotation addUniqueConstraint(int index)
          Corresponds to the 'uniqueConstraints' element of the *Table annotation.
 boolean catalogTouches(int pos, org.eclipse.jdt.core.dom.CompilationUnit astRoot)
          Return whether the specified position touches the 'catalog' element.
 java.lang.String getCatalog()
          Corresponds to the 'catalog' element of the *Table annotation.
 TextRange getCatalogTextRange(org.eclipse.jdt.core.dom.CompilationUnit astRoot)
          Return the TextRange for the 'catalog' element.
 java.lang.String getName()
          Corresponds to the 'name' element of the *Table annotation.
 TextRange getNameTextRange(org.eclipse.jdt.core.dom.CompilationUnit astRoot)
          Return the TextRange for the 'name' element.
 java.lang.String getSchema()
          Corresponds to the 'schema' element of the *Table annotation.
 TextRange getSchemaTextRange(org.eclipse.jdt.core.dom.CompilationUnit astRoot)
          Return the TextRange for the 'schema' element.
 int indexOfUniqueConstraint(UniqueConstraintAnnotation uniqueConstraint)
          Corresponds to the 'uniqueConstraints' element of the *Table annotation.
 boolean isSpecified()
          Return true if the table annotation exists in Java, false if it does not.
 void moveUniqueConstraint(int targetIndex, int sourceIndex)
          Corresponds to the 'uniqueConstraints' element of the *Table annotation.
 boolean nameTouches(int pos, org.eclipse.jdt.core.dom.CompilationUnit astRoot)
          Return whether the specified position touches the 'name' element.
 void removeUniqueConstraint(int index)
          Corresponds to the 'uniqueConstraints' element of the *Table annotation.
 boolean schemaTouches(int pos, org.eclipse.jdt.core.dom.CompilationUnit astRoot)
          Return whether the specified position touches the 'schema' element.
 void setCatalog(java.lang.String catalog)
          Corresponds to the 'catalog' element of the *Table annotation.
 void setName(java.lang.String name)
          Corresponds to the 'name' element of the *Table annotation.
 void setSchema(java.lang.String schema)
          Corresponds to the 'schema' element of the *Table annotation.
 UniqueConstraintAnnotation uniqueConstraintAt(int index)
          Corresponds to the 'uniqueConstraints' element of the *Table annotation.
 java.util.ListIterator<UniqueConstraintAnnotation> uniqueConstraints()
          Corresponds to the 'uniqueConstraints' element of the *Table annotation.
 int uniqueConstraintsSize()
          Corresponds to the 'uniqueConstraints' element of the *Table annotation.
 
Methods inherited from interface org.eclipse.jpt.core.resource.java.Annotation
getAnnotationName, getAstAnnotation, newAnnotation, removeAnnotation
 
Methods inherited from interface org.eclipse.jpt.core.resource.java.JavaResourceNode
getFile, getJavaResourceCompilationUnit, getRoot, getTextRange, initialize, synchronizeWith
 
Methods inherited from interface org.eclipse.jpt.utility.model.Model
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener
 

Field Detail

NAME_PROPERTY

static final java.lang.String NAME_PROPERTY
See Also:
Constant Field Values

SCHEMA_PROPERTY

static final java.lang.String SCHEMA_PROPERTY
See Also:
Constant Field Values

CATALOG_PROPERTY

static final java.lang.String CATALOG_PROPERTY
See Also:
Constant Field Values

UNIQUE_CONSTRAINTS_LIST

static final java.lang.String UNIQUE_CONSTRAINTS_LIST
See Also:
Constant Field Values
Method Detail

isSpecified

boolean isSpecified()
Return true if the table annotation exists in Java, false if it does not.


getName

java.lang.String getName()
Corresponds to the 'name' element of the *Table annotation. Return null if the element does not exist in Java.


setName

void setName(java.lang.String name)
Corresponds to the 'name' element of the *Table annotation. Set to null to remove the element.


getNameTextRange

TextRange getNameTextRange(org.eclipse.jdt.core.dom.CompilationUnit astRoot)
Return the TextRange for the 'name' element. If the element does not exist return the TextRange for the *Table annotation.


nameTouches

boolean nameTouches(int pos,
                    org.eclipse.jdt.core.dom.CompilationUnit astRoot)
Return whether the specified position touches the 'name' element. Return false if the element does not exist.


getSchema

java.lang.String getSchema()
Corresponds to the 'schema' element of the *Table annotation. Return null if the element does not exist in Java.


setSchema

void setSchema(java.lang.String schema)
Corresponds to the 'schema' element of the *Table annotation. Set to null to remove the element.


getSchemaTextRange

TextRange getSchemaTextRange(org.eclipse.jdt.core.dom.CompilationUnit astRoot)
Return the TextRange for the 'schema' element. If the element does not exist return the TextRange for the *Table annotation.


schemaTouches

boolean schemaTouches(int pos,
                      org.eclipse.jdt.core.dom.CompilationUnit astRoot)
Return whether the specified position touches the 'schema' element. Return false if the element does not exist.


getCatalog

java.lang.String getCatalog()
Corresponds to the 'catalog' element of the *Table annotation. Return null if the element does not exist in Java.


setCatalog

void setCatalog(java.lang.String catalog)
Corresponds to the 'catalog' element of the *Table annotation. Set to null to remove the element.


getCatalogTextRange

TextRange getCatalogTextRange(org.eclipse.jdt.core.dom.CompilationUnit astRoot)
Return the TextRange for the 'catalog' element. If the element does not exist return the TextRange for the *Table annotation.


catalogTouches

boolean catalogTouches(int pos,
                       org.eclipse.jdt.core.dom.CompilationUnit astRoot)
Return whether the specified position touches the 'catalog' element. Return false if the element does not exist.


uniqueConstraints

java.util.ListIterator<UniqueConstraintAnnotation> uniqueConstraints()
Corresponds to the 'uniqueConstraints' element of the *Table annotation. Return an empty iterator if the element does not exist in Java.


uniqueConstraintsSize

int uniqueConstraintsSize()
Corresponds to the 'uniqueConstraints' element of the *Table annotation.


uniqueConstraintAt

UniqueConstraintAnnotation uniqueConstraintAt(int index)
Corresponds to the 'uniqueConstraints' element of the *Table annotation.


indexOfUniqueConstraint

int indexOfUniqueConstraint(UniqueConstraintAnnotation uniqueConstraint)
Corresponds to the 'uniqueConstraints' element of the *Table annotation.


addUniqueConstraint

UniqueConstraintAnnotation addUniqueConstraint(int index)
Corresponds to the 'uniqueConstraints' element of the *Table annotation.


moveUniqueConstraint

void moveUniqueConstraint(int targetIndex,
                          int sourceIndex)
Corresponds to the 'uniqueConstraints' element of the *Table annotation.


removeUniqueConstraint

void removeUniqueConstraint(int index)
Corresponds to the 'uniqueConstraints' element of the *Table annotation.