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

All Superinterfaces:
JavaResourceNode, Model
All Known Subinterfaces:
NamedNativeQueryAnnotation, NamedQueryAnnotation, NestableNamedNativeQuery, NestableNamedQuery

public interface QueryAnnotation
extends JavaResourceNode

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.


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)
           
 java.lang.String getName()
           
 TextRange getNameTextRange(org.eclipse.jdt.core.dom.CompilationUnit astRoot)
          Return the TextRange for the name element.
 java.lang.String getQuery()
           
 TextRange getQueryTextRange(org.eclipse.jdt.core.dom.CompilationUnit astRoot)
          Return the TextRange for the query element.
 QueryHintAnnotation hintAt(int index)
           
 java.util.ListIterator<QueryHintAnnotation> hints()
           
 int hintsSize()
           
 int indexOfHint(QueryHintAnnotation hint)
           
 void moveHint(int targetIndex, int sourceIndex)
           
 void removeHint(int index)
           
 void setName(java.lang.String name)
           
 void setQuery(java.lang.String query)
           
 
Methods inherited from interface org.eclipse.jpt.core.resource.java.JavaResourceNode
getJpaCompilationUnit, getResourceModel, getTextRange, initialize, updateFromJava
 
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()

setName

void setName(java.lang.String name)

getQuery

java.lang.String getQuery()

setQuery

void setQuery(java.lang.String query)

hints

java.util.ListIterator<QueryHintAnnotation> hints()

hintAt

QueryHintAnnotation hintAt(int index)

indexOfHint

int indexOfHint(QueryHintAnnotation hint)

hintsSize

int hintsSize()

addHint

QueryHintAnnotation addHint(int index)

removeHint

void removeHint(int index)

moveHint

void moveHint(int targetIndex,
              int sourceIndex)

getNameTextRange

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


getQueryTextRange

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