public class JPAQuery extends DatabaseQuery
DatabaseQuery.ParameterTypeaccessors, allowNativeSQLQuery, argumentFields, argumentParameterTypes, arguments, argumentTypeNames, argumentTypes, argumentValues, BATCH_FETCH_PROPERTY, CascadeAggregateDelete, CascadeAllParts, CascadeByMapping, CascadeDependentParts, cascadePolicy, CascadePrivateParts, descriptor, descriptors, doNotRedirect, executionSession, flushOnExecute, hintString, isCustomQueryUsed, isExecutionClone, isNativeConnectionRequired, isPrepared, isUserDefined, isUserDefinedSQLCall, monitorName, name, NoCascading, nullableArguments, parameterDelimiter, partitioningPolicy, properties, queryMechanism, queryTimeout, queryTimeoutUnit, redirector, session, sessionName, shouldBindAllParameters, shouldCacheStatement, shouldCloneCall, shouldMaintainCache, shouldPrepare, shouldRetrieveBypassCache, shouldStoreBypassCache, shouldUseWrapperPolicy, shouldValidateUpdateCallCacheUse, sourceMapping, translationRow| Constructor and Description |
|---|
JPAQuery() |
JPAQuery(String jpqlString) |
JPAQuery(String queryName,
StoredProcedureCall call,
Map<String,Object> hints) |
JPAQuery(String queryName,
String sqlString,
Map<String,Object> hints) |
JPAQuery(String name,
String jpqlString,
String lockMode,
Map<String,Object> hints)
JPQL
|
| Modifier and Type | Method and Description |
|---|---|
void |
addResultClassNames(String className) |
void |
addResultSetMapping(String resultSetMapping) |
Object |
executeDatabaseQuery()
INTERNAL:
This should never be called and is only here because it is needed as an extension
to DatabaseQuery.
|
DatabaseQuery |
getDatabaseQuery() |
List<ClassDescriptor> |
getDescriptors()
INTERNAL:
For table per tenant queries the descriptor list will extracted from
parsing the jpql query and cached here.
|
Map<String,Object> |
getHints()
Return the JPA query hints.
|
String |
getJPQLString()
Return the JPQL string.
|
boolean |
isJPQLQuery()
Return true if this query is a jpql query.
|
boolean |
isSQLQuery()
Return true if this query is an sql query.
|
void |
prepare()
INTERNAL:
Generate the DatabaseQuery query from the JPA named query.
|
DatabaseQuery |
processJPQLQuery(Session session)
INTERNAL:
Convert the JPA query into a DatabaseQuery.
|
DatabaseQuery |
processSQLQuery(Session session)
INTERNAL:
Convert the SQL string into a DatabaseQuery.
|
DatabaseQuery |
processStoredProcedureQuery(Session session)
INTERNAL:
Convert the StoredProc call into a DatabaseQuery.
|
void |
setDatabaseQuery(DatabaseQuery databaseQuery) |
void |
setDescriptors(List<ClassDescriptor> descriptors)
INTERNAL:
For table per tenant queries the descriptor list will extracted from
parsing the jpql query and cached here.
|
void |
setHints(Map<String,Object> hints) |
void |
setJPQLString(String jpqlString) |
void |
setResultClassName(String className) |
void |
setResultSetMappings(List<String> resultSetMappings) |
addArgument, addArgument, addArgument, addArgument, addArgument, addArgument, addArgumentByTypeName, addArgumentValue, addArgumentValues, addCall, addStatement, bindAllParameters, buildArgumentFields, buildSelectionCriteria, cacheStatement, cascadeAllParts, cascadeByMapping, cascadeOnlyDependentParts, cascadePrivateParts, checkDescriptor, checkEarlyReturn, checkForCustomQuery, checkPrepare, checkPrepare, clone, clonedQueryExecutionComplete, convertClassNamesToClasses, copyFromQuery, dontBindAllParameters, dontCacheStatement, dontCascadeParts, dontMaintainCache, execute, executeInUnitOfWork, extractRemoteResult, getAccessor, getAccessors, getArgumentParameterTypes, getArguments, getArgumentTypeNames, getArgumentTypes, getArgumentValues, getBatchObjects, getCall, getCascadePolicy, getDatasourceCall, getDatasourceCalls, getDefaultRedirector, getDescriptor, getDomainClassNounName, getDoNotRedirect, getEJBQLString, getExecutionSession, getFlushOnExecute, getHintString, getMonitorName, getName, getNullableArguments, getParameterDelimiter, getParameterDelimiterChar, getPartitioningPolicy, getProperties, getProperty, getQueryMechanism, getQueryNounName, getQueryTimeout, getQueryTimeoutUnit, getRedirector, getRedirectorForQuery, getReferenceClass, getReferenceClassName, getSelectionCriteria, getSensorName, getSession, getSessionName, getShouldBindAllParameters, getSourceMapping, getSQLStatement, getSQLString, getSQLStrings, getTranslatedSQLString, getTranslatedSQLStrings, getTranslationRow, hasAccessor, hasArguments, hasNullableArguments, hasProperties, hasQueryMechanism, hasSessionName, ignoreBindAllParameters, ignoreCacheStatement, isCallQuery, isCascadeOfAggregateDelete, isCustomQueryUsed, isCustomSelectionQuery, isDataModifyQuery, isDataReadQuery, isDefaultPropertiesQuery, isDeleteAllQuery, isDeleteObjectQuery, isDirectReadQuery, isExecutionClone, isExpressionQuery, isInsertObjectQuery, isJPQLCallQuery, isModifyAllQuery, isModifyQuery, isNativeConnectionRequired, isObjectBuildingQuery, isObjectLevelModifyQuery, isObjectLevelReadQuery, isPrepared, isReadAllQuery, isReadObjectQuery, isReadQuery, isReportQuery, isResultSetMappingQuery, isSQLCallQuery, isUpdateAllQuery, isUpdateObjectQuery, isUserDefined, isUserDefinedSQLCall, isValueReadQuery, isWriteObjectQuery, maintainCache, prepareCall, prepareCustomQuery, prepareForExecution, prepareForRemoteExecution, prepareFromQuery, prepareInternal, redirectQuery, remoteExecute, remoteExecute, removeProperty, replaceValueHoldersIn, resetMonitorName, retrieveBypassCache, rowFromArguments, setAccessor, setAccessors, setAllowNativeSQLQuery, setArguments, setArgumentTypeNames, setArgumentTypes, setArgumentValues, setBatchObjects, setCall, setCascadePolicy, setDatasourceCall, setDescriptor, setDoNotRedirect, setEJBQLString, setExecutionSession, setFlushOnExecute, setHintString, setIsCustomQueryUsed, setIsExecutionClone, setIsNativeConnectionRequired, setIsPrepared, setIsUserDefined, setIsUserDefinedSQLCall, setName, setNullableArguments, setParameterDelimiter, setPartitioningPolicy, setProperties, setProperty, setQueryMechanism, setQueryTimeout, setQueryTimeoutUnit, setRedirector, setSelectionCriteria, setSession, setSessionName, setShouldBindAllParameters, setShouldBindAllParameters, setShouldCacheStatement, setShouldMaintainCache, setShouldPrepare, setShouldRetrieveBypassCache, setShouldStoreBypassCache, setShouldUseWrapperPolicy, setShouldValidateUpdateCallCacheUse, setSourceMapping, setSQLStatement, setSQLString, setTranslationRow, shouldAllowNativeSQLQuery, shouldBindAllParameters, shouldCacheStatement, shouldCascadeAllParts, shouldCascadeByMapping, shouldCascadeOnlyDependentParts, shouldCascadeParts, shouldCascadePrivateParts, shouldCloneCall, shouldIgnoreBindAllParameters, shouldIgnoreCacheStatement, shouldMaintainCache, shouldPrepare, shouldPrepare, shouldRetrieveBypassCache, shouldStoreBypassCache, shouldUseWrapperPolicy, shouldValidateUpdateCallCacheUse, storeBypassCache, toStringpublic JPAQuery()
public JPAQuery(String jpqlString)
public JPAQuery(String name, String jpqlString, String lockMode, Map<String,Object> hints)
name - jpqlString - lockMode - hints - public JPAQuery(String queryName, StoredProcedureCall call, Map<String,Object> hints)
public void addResultClassNames(String className)
public void addResultSetMapping(String resultSetMapping)
public Object executeDatabaseQuery() throws DatabaseException, OptimisticLockException
executeDatabaseQuery in class DatabaseQueryDatabaseExceptionOptimisticLockExceptionpublic DatabaseQuery getDatabaseQuery()
public List<ClassDescriptor> getDescriptors()
getDescriptors in class DatabaseQuerypublic String getJPQLString()
getJPQLString in class DatabaseQuerypublic boolean isJPQLQuery()
public boolean isSQLQuery()
public void prepare()
prepare in class DatabaseQuerypublic DatabaseQuery processJPQLQuery(Session session)
public DatabaseQuery processSQLQuery(Session session)
public DatabaseQuery processStoredProcedureQuery(Session session)
public void setDatabaseQuery(DatabaseQuery databaseQuery)
public void setDescriptors(List<ClassDescriptor> descriptors)
public void setJPQLString(String jpqlString)
setJPQLString in class DatabaseQuerypublic void setResultClassName(String className)
Copyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.