Dali Provisional API
Release 3.2

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

All Superinterfaces:
IAdaptable, JpaContextModel, JpaModel, JpaNamedContextModel, JptResourceTypeReference, Model
All Known Subinterfaces:
JavaNamedNativeQuery, JavaNamedQuery, JavaNamedQuery2_0, JavaQuery, NamedNativeQuery, NamedQuery, NamedQuery2_0, OrmNamedNativeQuery, OrmNamedQuery, OrmNamedQuery2_0, OrmQuery

public interface Query
extends JpaNamedContextModel

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.JpaNamedContextModel
JpaNamedContextModel.NameTransformer
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.JpaModel
JpaModel.JpaVersionIsCompatibleWith
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
JptResourceTypeReference.ResourceTypeIsKindOf, JptResourceTypeReference.ResourceTypeTransformer
 
Field Summary
static String HINTS_LIST
           
 
Fields inherited from interface org.eclipse.jpt.jpa.core.context.JpaNamedContextModel
NAME_PROPERTY, NAME_TRANSFORMER
 
Fields inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
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> getQueryType()
          Return the query's type.
 boolean isEquivalentTo(Query query)
          Return whether the specified query has the same state as this query but is not this query.
 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.JpaNamedContextModel
getName, setName
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.JpaContextModel
getCompletionProposals, getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getParent, getPersistenceUnit, getValidationTextRange, synchronizeWithResourceModel, update, validate
 
Methods inherited from interface org.eclipse.jpt.jpa.core.JpaModel
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

HINTS_LIST

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

getQueryType

Class<? extends Query> getQueryType()
Return the query's type.


isEquivalentTo

boolean isEquivalentTo(Query query)
Return whether the specified query has the same state as this query but is not this query.

See Also:
getQueryType()

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.