org.eclipse.jpt.core.context
Interface Query

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, JpaContextNode, JpaNode, Model
All Known Subinterfaces:
JavaNamedNativeQuery, JavaNamedQuery, JavaQuery, NamedNativeQuery, NamedQuery, OrmNamedNativeQuery, OrmNamedQuery, OrmQuery

public interface Query
extends JpaContextNode

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
 QueryHint addHint(int index)
          Add a hint to the query and return the object representing it.
 java.lang.String getName()
           
 java.lang.String getQuery()
           
<T extends QueryHint>
java.util.ListIterator<T>
hints()
          Return a list iterator of the hints.
 int hintsSize()
          Return the number of hints.
 void moveHint(int targetIndex, int sourceIndex)
          Move the hint from the source index to the target index.
 boolean overrides(Query query)
          Return true if this query overrides the definition of the specified query (for example, a query defined in orm.xml overrides one defined in java)
 void removeHint(int index)
          Remove the hint from the query.
 void removeHint(QueryHint queryHint)
          Remove the hint at the index from the query.
 void setName(java.lang.String value)
           
 void setQuery(java.lang.String value)
           
 
Methods inherited from interface org.eclipse.jpt.core.context.JpaContextNode
getEntityMappings, getOrmPersistentType, getPersistenceUnit
 
Methods inherited from interface org.eclipse.jpt.core.JpaNode
getJpaProject, getParent, getResource
 
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
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

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 value)

getQuery

java.lang.String getQuery()

setQuery

void setQuery(java.lang.String value)

hints

<T extends QueryHint> java.util.ListIterator<T> hints()
Return a list iterator of the hints. This will not be null.


hintsSize

int hintsSize()
Return the number of hints.


addHint

QueryHint addHint(int index)
Add a hint to the query and return the object representing it.


removeHint

void removeHint(int index)
Remove the hint from the query.


removeHint

void removeHint(QueryHint queryHint)
Remove the hint at the index from the query.


moveHint

void moveHint(int targetIndex,
              int sourceIndex)
Move the hint from the source index to the target index.


overrides

boolean overrides(Query query)
Return true if this query overrides the definition of the specified query (for example, a query defined in orm.xml overrides one defined in java)