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

All Superinterfaces:
Annotation, JavaResourceNode, Model
All Known Subinterfaces:
NamedNativeQueryAnnotation, NamedQueryAnnotation, NestableNamedNativeQueryAnnotation, NestableNamedQueryAnnotation

public interface BaseNamedQueryAnnotation
extends Annotation

Common protocol among: javax.persistence.NamedQuery javax.persistence.NamedNativeQuery 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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.core.resource.java.JavaResourceNode
JavaResourceNode.Root
 
Field Summary
static java.lang.String HINTS_LIST
           
static java.lang.String NAME_PROPERTY
           
static java.lang.String QUERY_PROPERTY
           
 
Method Summary
 QueryHintAnnotation addHint(int index)
          Corresponds to the 'hints' element of the *Query annotation.
 java.lang.String getName()
          Corresponds to the 'name' element of the *Query annotation.
 TextRange getNameTextRange(org.eclipse.jdt.core.dom.CompilationUnit astRoot)
          Return the TextRange for the 'name' element.
 java.lang.String getQuery()
          Corresponds to the 'query' element of the *Query annotation.
 TextRange getQueryTextRange(org.eclipse.jdt.core.dom.CompilationUnit astRoot)
          Return the TextRange for the 'query' element.
 QueryHintAnnotation hintAt(int index)
          Corresponds to the 'hints' element of the *Query annotation.
 java.util.ListIterator<QueryHintAnnotation> hints()
          Corresponds to the 'hints' element of the *Query annotation.
 int hintsSize()
          Corresponds to the 'hints' element of the *Query annotation.
 int indexOfHint(QueryHintAnnotation hint)
          Corresponds to the 'hints' element of the *Query annotation.
 void moveHint(int targetIndex, int sourceIndex)
          Corresponds to the 'hints' element of the *Query annotation.
 void removeHint(int index)
          Corresponds to the 'hints' element of the *Query annotation.
 void setName(java.lang.String name)
          Corresponds to the 'name' element of the *Query annotation.
 void setQuery(java.lang.String query)
          Corresponds to the 'query' element of the *Query annotation.
 
Methods inherited from interface org.eclipse.jpt.core.resource.java.Annotation
getAnnotationName, getJdtAnnotation, newAnnotation, removeAnnotation
 
Methods inherited from interface org.eclipse.jpt.core.resource.java.JavaResourceNode
getFile, getJavaResourceCompilationUnit, getRoot, getTextRange, initialize, update
 
Methods inherited from interface org.eclipse.jpt.utility.model.Model
addCollectionChangeListener, addCollectionChangeListener, addListChangeListener, addListChangeListener, addPropertyChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, addTreeChangeListener, removeCollectionChangeListener, removeCollectionChangeListener, removeListChangeListener, removeListChangeListener, removePropertyChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener, removeTreeChangeListener
 

Field Detail

NAME_PROPERTY

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

QUERY_PROPERTY

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

HINTS_LIST

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

getName

java.lang.String getName()
Corresponds to the 'name' element of the *Query 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 *Query 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 element does not exist return the TextRange for the *Query annotation.


getQuery

java.lang.String getQuery()
Corresponds to the 'query' element of the *Query annotation. Return null if the element does not exist in Java.


setQuery

void setQuery(java.lang.String query)
Corresponds to the 'query' element of the *Query annotation. Set to null to remove the element.


getQueryTextRange

TextRange getQueryTextRange(org.eclipse.jdt.core.dom.CompilationUnit astRoot)
Return the TextRange for the 'query' element. If element does not exist return the TextRange for the *Query annotation.


hints

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


hintsSize

int hintsSize()
Corresponds to the 'hints' element of the *Query annotation.


hintAt

QueryHintAnnotation hintAt(int index)
Corresponds to the 'hints' element of the *Query annotation.


indexOfHint

int indexOfHint(QueryHintAnnotation hint)
Corresponds to the 'hints' element of the *Query annotation.


addHint

QueryHintAnnotation addHint(int index)
Corresponds to the 'hints' element of the *Query annotation.


moveHint

void moveHint(int targetIndex,
              int sourceIndex)
Corresponds to the 'hints' element of the *Query annotation.


removeHint

void removeHint(int index)
Corresponds to the 'hints' element of the *Query annotation.