EclipseLink1.0 - 20080707 API Reference

org.eclipse.persistence.queries
Class JPAQuery

java.lang.Object
  extended by org.eclipse.persistence.queries.DatabaseQuery
      extended by org.eclipse.persistence.queries.JPAQuery
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class JPAQuery
extends DatabaseQuery

Purpose: A EJB3 placeholder Query object to store JPQL strings so that processing the string is delayed until Login

See Also:
Serialized Form
Author:
Chris Delahunt
Since:
TopLink Java Essentials

Field Summary
 
Fields inherited from class org.eclipse.persistence.queries.DatabaseQuery
accessor, arguments, argumentTypeNames, argumentTypes, argumentValues, CascadeAggregateDelete, CascadeAllParts, CascadeByMapping, CascadeDependentParts, cascadePolicy, CascadePrivateParts, descriptor, doNotRedirect, executionSession, hintString, isCustomQueryUsed, isExecutionClone, isFromParseCache, isNativeConnectionRequired, isPrepared, isUserDefined, name, NoCascading, properties, queryMechanism, queryTimeout, redirector, session, sessionName, shouldBindAllParameters, shouldCacheStatement, shouldCloneCall, shouldMaintainCache, shouldPrepare, shouldUseWrapperPolicy, translationRow
 
Constructor Summary
JPAQuery()
           
JPAQuery(java.lang.String jpqlString)
           
JPAQuery(java.lang.String name, java.lang.String jpqlString, java.lang.Boolean flushOnExecute, java.util.HashMap hints)
           
JPAQuery(java.lang.String name, java.lang.String jpqlString, java.util.HashMap hints)
           
 
Method Summary
 java.lang.Object executeDatabaseQuery()
          INTERNAL: This should never be called and is only here because it is needed as an extension to DatabaseQuery.
 java.util.HashMap getHints()
          INTERNAL: Accessor methods for hints that would be added to the EJBQuery class and applied to the TopLink query.
 java.lang.String getJPQLString()
          INTERNAL: Add the expression value to be included in the result.
 DatabaseQuery processJPQLQuery(Session session)
           
 void setHints(java.util.HashMap hints)
           
 void setJPQLString(java.lang.String jpqlString)
          PUBLIC: Set the JPQL string of the query.
 
Methods inherited from class org.eclipse.persistence.queries.DatabaseQuery
addArgument, addArgument, addArgument, addArgumentByTypeName, addArgumentValue, addArgumentValues, addCall, addStatement, bindAllParameters, buildSelectionCriteria, cacheStatement, cascadeAllParts, cascadeByMapping, cascadeOnlyDependentParts, cascadePrivateParts, checkDescriptor, checkEarlyReturn, checkForCustomQuery, checkPrepare, checkPrepare, clone, clonedQueryExecutionComplete, convertClassNamesToClasses, copyFromQuery, dontBindAllParameters, dontCacheStatement, dontCascadeParts, dontMaintainCache, execute, executeInUnitOfWork, extractRemoteResult, getAccessor, getArguments, getArgumentTypeNames, getArgumentTypes, getArgumentValues, getCall, getCascadePolicy, getDatasourceCall, getDatasourceCalls, getDefaultRedirector, getDescriptor, getDomainClassNounName, getDoNotRedirect, getEJBQLString, getExecutionSession, getFlushOnExecute, getHintString, getName, getProperties, getProperty, getQueryMechanism, getQueryNounName, getQueryTimeout, getRedirector, getReferenceClass, getReferenceClassName, getSelectionCriteria, getSensorName, getSession, getSessionName, getShouldBindAllParameters, getSQLStatement, getSQLString, getSQLStrings, getTranslatedSQLString, getTranslatedSQLStrings, getTranslationRow, hasAccessor, hasArguments, hasProperties, hasQueryMechanism, hasSessionName, ignoreBindAllParameters, ignoreCacheStatement, isCallQuery, isCascadeOfAggregateDelete, isCustomQueryUsed, isCustomSelectionQuery, isDataModifyQuery, isDataReadQuery, isDefaultPropertiesQuery, isDeleteAllQuery, isDeleteObjectQuery, isDirectReadQuery, isExecutionClone, isExpressionQuery, isFromParseCache, isInsertObjectQuery, isModifyAllQuery, isModifyQuery, isNativeConnectionRequired, isObjectBuildingQuery, isObjectLevelModifyQuery, isObjectLevelReadQuery, isPrepared, isReadAllQuery, isReadObjectQuery, isReadQuery, isReportQuery, isSQLCallQuery, isUpdateAllQuery, isUpdateObjectQuery, isUserDefined, isValueReadQuery, isWriteObjectQuery, maintainCache, prepare, prepareCall, prepareCustomQuery, prepareForExecution, prepareForRemoteExecution, prepareFromQuery, redirectQuery, remoteExecute, remoteExecute, removeProperty, replaceValueHoldersIn, rowFromArguments, setAccessor, setArguments, setArgumentTypeNames, setArgumentTypes, setArgumentValues, setCall, setCascadePolicy, setDatasourceCall, setDescriptor, setDoNotRedirect, setEJBQLString, setExecutionSession, setFlushOnExecute, setHintString, setIsCustomQueryUsed, setIsExecutionClone, setIsFromParseCache, setIsNativeConnectionRequired, setIsPrepared, setIsUserDefined, setName, setProperties, setProperty, setQueryMechanism, setQueryTimeout, setRedirector, setSelectionCriteria, setSession, setSessionName, setShouldBindAllParameters, setShouldBindAllParameters, setShouldCacheStatement, setShouldMaintainCache, setShouldPrepare, setShouldUseWrapperPolicy, setSQLStatement, setSQLString, setTranslationRow, shouldBindAllParameters, shouldCacheStatement, shouldCascadeAllParts, shouldCascadeByMapping, shouldCascadeOnlyDependentParts, shouldCascadeParts, shouldCascadePrivateParts, shouldCloneCall, shouldIgnoreBindAllParameters, shouldIgnoreCacheStatement, shouldMaintainCache, shouldPrepare, shouldUseWrapperPolicy, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JPAQuery

public JPAQuery()

JPAQuery

public JPAQuery(java.lang.String jpqlString)

JPAQuery

public JPAQuery(java.lang.String name,
                java.lang.String jpqlString,
                java.util.HashMap hints)

JPAQuery

public JPAQuery(java.lang.String name,
                java.lang.String jpqlString,
                java.lang.Boolean flushOnExecute,
                java.util.HashMap hints)
Method Detail

getJPQLString

public java.lang.String getJPQLString()
INTERNAL: Add the expression value to be included in the result. EXAMPLE: reportQuery.addItem("name", expBuilder.get("firstName").toUpperCase()); The resultType can be specified to support EJBQL that adheres to the EJB 3.0 spec.

Overrides:
getJPQLString in class DatabaseQuery

setJPQLString

public void setJPQLString(java.lang.String jpqlString)
Description copied from class: DatabaseQuery
PUBLIC: Set the JPQL string of the query. If arguments are required in the string they will be preceeded by ":" then the argument name. The JPQL arguments must also be added as argument to the query.

Overrides:
setJPQLString in class DatabaseQuery

getHints

public java.util.HashMap getHints()
INTERNAL: Accessor methods for hints that would be added to the EJBQuery class and applied to the TopLink query.


setHints

public void setHints(java.util.HashMap hints)

processJPQLQuery

public DatabaseQuery processJPQLQuery(Session session)

executeDatabaseQuery

public java.lang.Object executeDatabaseQuery()
                                      throws DatabaseException,
                                             OptimisticLockException
INTERNAL: This should never be called and is only here because it is needed as an extension to DatabaseQuery. An exception should be thrown to warn users, but for now it will process the JPQL and execute the resulting query instead.

Specified by:
executeDatabaseQuery in class DatabaseQuery
Returns:
- the result of executing the query.
Throws:
DatabaseException - - an error has occurred on the database.
OptimisticLockException - - an error has occurred using the optimistic lock feature.

EclipseLink1.0 - 20080707 API Reference