java.lang.Object
org.eclipse.persistence.queries.DatabaseQuery
org.eclipse.persistence.internal.jpa.JPAQuery
- All Implemented Interfaces:
Serializable
,Cloneable
Purpose:
A JPA placeholder Query object to store JPQL strings so that processing the string is delayed
until Login.
- Since:
- TopLink Essentials
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.persistence.queries.DatabaseQuery
DatabaseQuery.ParameterType
-
Field Summary
Fields inherited from class org.eclipse.persistence.queries.DatabaseQuery
accessors, 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, shouldReturnGeneratedKeys, shouldStoreBypassCache, shouldUseWrapperPolicy, shouldValidateUpdateCallCacheUse, sourceMapping, translationRow
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addResultClassNames
(String className) void
addResultSetMapping
(String resultSetMapping) INTERNAL: This should never be called and is only here because it is needed as an extension to DatabaseQuery.INTERNAL: For table per tenant queries the descriptor list will extracted from parsing the jpql query and cached here.getHints()
Return the JPA query hints.Return the JPQL string.boolean
Return true if this query is a jpql query.boolean
Return true if this query is an sql query.void
prepare()
INTERNAL: Generate the DatabaseQuery query from the JPA named query.processJPQLQuery
(Session session) INTERNAL: Convert the JPA query into a DatabaseQuery.processSQLQuery
(Session session) INTERNAL: Convert the SQL string into a 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
void
setJPQLString
(String jpqlString) PUBLIC: Set the JPQL string of the query.void
setResultClassName
(String className) void
setResultSetMappings
(List<String> resultSetMappings) Methods inherited from class org.eclipse.persistence.queries.DatabaseQuery
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, setShouldReturnGeneratedKeys, setShouldStoreBypassCache, setShouldUseWrapperPolicy, setShouldValidateUpdateCallCacheUse, setSourceMapping, setSQLStatement, setSQLString, setTranslationRow, shouldAllowNativeSQLQuery, shouldBindAllParameters, shouldCacheStatement, shouldCascadeAllParts, shouldCascadeByMapping, shouldCascadeOnlyDependentParts, shouldCascadeParts, shouldCascadePrivateParts, shouldCloneCall, shouldIgnoreBindAllParameters, shouldIgnoreCacheStatement, shouldMaintainCache, shouldPrepare, shouldPrepare, shouldRetrieveBypassCache, shouldReturnGeneratedKeys, shouldStoreBypassCache, shouldUseWrapperPolicy, shouldValidateUpdateCallCacheUse, storeBypassCache, toString
-
Constructor Details
-
JPAQuery
public JPAQuery() -
JPAQuery
-
JPAQuery
JPQL -
JPAQuery
-
JPAQuery
-
-
Method Details
-
addResultClassNames
-
addResultSetMapping
-
executeDatabaseQuery
INTERNAL: This should never be called and is only here because it is needed as an extension to DatabaseQuery. Perhaps exception should be thrown to warn users, but for now it will execute the resulting query instead, this allows JPA style queries to be executed on a normal EclipseLink Session.- Specified by:
executeDatabaseQuery
in classDatabaseQuery
- 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.
-
getDatabaseQuery
-
getDescriptors
INTERNAL: For table per tenant queries the descriptor list will extracted from parsing the jpql query and cached here.- Overrides:
getDescriptors
in classDatabaseQuery
-
getHints
Return the JPA query hints. -
getJPQLString
Return the JPQL string.- Overrides:
getJPQLString
in classDatabaseQuery
-
isJPQLQuery
public boolean isJPQLQuery()Return true if this query is a jpql query. -
isSQLQuery
public boolean isSQLQuery()Return true if this query is an sql query. -
prepare
public void prepare()INTERNAL: Generate the DatabaseQuery query from the JPA named query.- Overrides:
prepare
in classDatabaseQuery
-
processJPQLQuery
INTERNAL: Convert the JPA query into a DatabaseQuery. -
processSQLQuery
INTERNAL: Convert the SQL string into a DatabaseQuery. -
processStoredProcedureQuery
INTERNAL: Convert the StoredProc call into a DatabaseQuery. -
setDatabaseQuery
-
setDescriptors
INTERNAL: For table per tenant queries the descriptor list will extracted from parsing the jpql query and cached here. -
setHints
-
setJPQLString
Description copied from class:DatabaseQuery
PUBLIC: Set the JPQL string of the query. If arguments are required in the string they will be preceded by ":" then the argument name. The JPQL arguments must also be added as argument to the query.- Overrides:
setJPQLString
in classDatabaseQuery
-
setResultClassName
-
setResultSetMappings
-