|
Oracle Fusion Middleware Java API Reference for Oracle TopLink 11g Release 1 (11.1.1) E28847-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
org.eclipse.persistence.jpa.internal.jpql.AbstractJPQLQueryHelper
org.eclipse.persistence.jpa.jpql.JPQLQueryHelper
public class JPQLQueryHelper
This helper can perform the following operations over a JPQL query:
getResultType()
;getParameterType(String)
.#buildContentAssistItems(int)
.Constructor Summary | |
---|---|
JPQLQueryHelper() Creates a new JPQLQueryHelper . |
|
JPQLQueryHelper(JPQLQueryContext queryContext) Creates a new JPQLQueryHelper . |
Method Summary | |
---|---|
ContentAssistProposals |
buildContentAssistProposals(int position) Retrieves the possibles choices that can complete the query from the given position within the query. |
void |
dispose() Disposes of the internal data. |
IType |
getParameterType(java.lang.String parameterName) Retrieves, if it can be determined, the type of the given input parameter with the given name. |
java.lang.String |
getParsedJPQLQuery() Returns the string representation of the parsed tree. |
IManagedTypeProvider |
getProvider() Returns the provider for managed types (entities, embeddables, mapped superclasses). |
IQuery |
getQuery() Returns the external form representing a named query. |
IType |
getResultType() Calculates the type of the query result of the JPQL query. |
IType |
getType(java.lang.Class<?> type) Returns the IType representing the given Java type. |
TypeHelper |
getTypeHelper() Returns a helper that gives access to the most common types . |
ITypeRepository |
getTypeRepository() Returns the repository that gives access to the application's types. |
void |
setQuery(IQuery query) Sets the external form of the JPQL query, which will be parsed and information will be extracted for later access. |
java.util.List<JPQLQueryProblem> |
validate() Validates the query by introspecting it grammatically and semantically. |
java.util.List<JPQLQueryProblem> |
validateGrammar() Validates the query by only introspecting it grammatically. |
java.util.List<JPQLQueryProblem> |
validateSemantic() Validates the query by only introspecting it semantically. |
Methods inherited from class org.eclipse.persistence.jpa.internal.jpql.AbstractJPQLQueryHelper |
---|
getQueryContext, setJPQLExpression, validate, validateGrammar, validateSemantic |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JPQLQueryHelper()
JPQLQueryHelper
.public JPQLQueryHelper(JPQLQueryContext queryContext)
JPQLQueryHelper
.
queryContext
- The context used to query information about the JPQL queryMethod Detail |
---|
public ContentAssistProposals buildContentAssistProposals(int position)
Note: Disposing of the internal data is not done automatically.
buildContentAssistProposals
in class AbstractJPQLQueryHelper
position
- The position within the query for which a list of possible choices are created for completing the querypublic void dispose()
dispose
in class AbstractJPQLQueryHelper
public IType getParameterType(java.lang.String parameterName)
Note: Both named and positional input parameter can be used.
getParameterType
in class AbstractJPQLQueryHelper
parameterName
- The name of the input parameter to retrieve its type, which needs to be prepended by ':' or '?'null
if the type couldn't be determinedpublic java.lang.String getParsedJPQLQuery()
getParsedJPQLQuery
in class AbstractJPQLQueryHelper
public IManagedTypeProvider getProvider()
getProvider
in class AbstractJPQLQueryHelper
public IQuery getQuery()
getQuery
in class AbstractJPQLQueryHelper
public IType getResultType()
See TypeVisitor
to understand how the type is calculated.
getResultType
in class AbstractJPQLQueryHelper
IClass
for Object
if it could not be calculatedpublic IType getType(java.lang.Class<?> type)
IType
representing the given Java type.getType
in class AbstractJPQLQueryHelper
type
- The Java type for which its external form is requestedpublic TypeHelper getTypeHelper()
types
.getTypeHelper
in class AbstractJPQLQueryHelper
IType
public ITypeRepository getTypeRepository()
getTypeRepository
in class AbstractJPQLQueryHelper
public void setQuery(IQuery query)
setQuery
in class AbstractJPQLQueryHelper
query
- The external form of the JPQL querypublic java.util.List<JPQLQueryProblem> validate()
validate
in class AbstractJPQLQueryHelper
null
list that will be used to store the problems
if any was foundpublic java.util.List<JPQLQueryProblem> validateGrammar()
validateGrammar
in class AbstractJPQLQueryHelper
null
list that will be used to store the problems
if any was foundpublic java.util.List<JPQLQueryProblem> validateSemantic()
validateSemantic
in class AbstractJPQLQueryHelper
null
list that will be used to store the problems
if any was found
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |