Dali Provisional API
Release 3.2

org.eclipse.jpt.jpa.core.context
Interface Query

All Superinterfaces:
IAdaptable, JpaContextNode, JpaNamedContextNode, JpaNode, JptResourceTypeReference, Model
All Known Subinterfaces:
JavaNamedNativeQuery, JavaNamedQuery, JavaNamedQuery2_0, JavaQuery, NamedNativeQuery, NamedQuery, NamedQuery2_0, OrmNamedNativeQuery, OrmNamedQuery, OrmNamedQuery2_0, OrmQuery

public interface Query
extends JpaNamedContextNode

Named and named native queries.

Queries can be defined on

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.0

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.context.JpaNamedContextNode
JpaNamedContextNode.NameTransformer<N extends JpaNamedContextNode>
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
JptResourceTypeReference.ResourceTypeTransformer
 
Field Summary
static String HINTS_LIST
           
static Iterable<Class<? extends Query>> TYPES
           
 
Fields inherited from interface org.eclipse.jpt.jpa.core.context.JpaNamedContextNode
NAME_PROPERTY
 
Fields inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
RESOURCE_TYPE_TRANSFORMER
 
Method Summary
 QueryHint addHint()
          Add a hint to the query and return the object representing it.
 QueryHint addHint(int index)
          Add a hint to the query and return the object representing it.
 QueryHint getHint(int i)
           
 org.eclipse.jpt.common.utility.iterable.ListIterable<? extends QueryHint> getHints()
          Return the query's hints.
 int getHintsSize()
          Return the number of hints.
 TextRange getNameTextRange()
          Returns the TextRange of the name property.
 Class<? extends Query> getType()
          Return the generator's type.
 void moveHint(int targetIndex, int sourceIndex)
          Move the hint from the source index to the target index.
 void removeHint(int index)
          Remove the hint from the query.
 void removeHint(QueryHint queryHint)
          Remove the hint at the index from the query.
 boolean supportsValidationMessages()
          Return whether this query should be validated and have validation messages displayed
 void validate(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter)
           
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.JpaNamedContextNode
getName, isEquivalentTo, setName
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.JpaContextNode
getCompletionProposals, getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getParent, getPersistenceUnit, getValidationTextRange, synchronizeWithResourceModel, update, validate
 
Methods inherited from interface org.eclipse.jpt.jpa.core.JpaNode
getJpaPlatform, getJpaProject, getJpaProjectManager, getResource, stateChanged
 
Methods inherited from interface org.eclipse.jpt.common.utility.model.Model
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
getResourceType
 

Field Detail

TYPES

static final Iterable<Class<? extends Query>> TYPES

HINTS_LIST

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

getType

Class<? extends Query> getType()
Return the generator's type.

Specified by:
getType in interface JpaNamedContextNode

getHints

org.eclipse.jpt.common.utility.iterable.ListIterable<? extends QueryHint> getHints()
Return the query's hints.


getHintsSize

int getHintsSize()
Return the number of hints.


addHint

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


addHint

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


removeHint

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


removeHint

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


moveHint

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


getHint

QueryHint getHint(int i)

validate

void validate(JpaJpqlQueryHelper queryHelper,
              List<IMessage> messages,
              IReporter reporter)

supportsValidationMessages

boolean supportsValidationMessages()
Return whether this query should be validated and have validation messages displayed


getNameTextRange

TextRange getNameTextRange()
Returns the TextRange of the name property.


Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.