public interface ExtendedQuerySupport
Modifier and Type | Method and Description |
---|---|
ReturningResult<Object[]> |
executeReturning(ServiceProvider serviceProvider,
List<javax.persistence.Query> participatingQueries,
javax.persistence.Query exampleQuery,
String sqlOverride)
Executes and returns the returning result of the Query by replacing the SQL with the given overriding SQL query.
|
int |
executeUpdate(ServiceProvider serviceProvider,
List<javax.persistence.Query> participatingQueries,
javax.persistence.Query query,
String sqlOverride)
Executes and returns the update count of the Query by replacing the SQL with the given overriding SQL query.
|
List<String> |
getCascadingDeleteSql(javax.persistence.EntityManager em,
javax.persistence.Query query)
Returns the cascading SQL delete queries for the given query object.
|
List |
getResultList(ServiceProvider serviceProvider,
List<javax.persistence.Query> participatingQueries,
javax.persistence.Query query,
String sqlOverride)
Returns the result list of the Query by replacing the SQL with the given overriding SQL query.
|
Object |
getSingleResult(ServiceProvider serviceProvider,
List<javax.persistence.Query> participatingQueries,
javax.persistence.Query query,
String sqlOverride)
Returns the single result of the Query by replacing the SQL with the given overriding SQL query.
|
String |
getSql(javax.persistence.EntityManager em,
javax.persistence.Query query)
Returns the SQL query for the given query object.
|
String |
getSqlAlias(javax.persistence.EntityManager em,
javax.persistence.Query query,
String alias)
Returns the SQL table alias of the JPQL from node alias in the given query.
|
int |
getSqlSelectAliasPosition(javax.persistence.EntityManager em,
javax.persistence.Query query,
String alias)
Returns the corresponding position of the given JPQL select alias in the SQL query's select clause of the given query object.
|
int |
getSqlSelectAttributePosition(javax.persistence.EntityManager em,
javax.persistence.Query query,
String attribute)
Returns the corresponding position of the given JPQL attribute expression in the SQL query's select clause of the given query object.
|
boolean |
supportsAdvancedSql()
Returns whether the JPA provider supports advanced sql queries that need every method of this interface to work properly.
|
boolean supportsAdvancedSql()
String getSql(javax.persistence.EntityManager em, javax.persistence.Query query)
em
- The entity manager the query is associated toquery
- The JPA queryList<String> getCascadingDeleteSql(javax.persistence.EntityManager em, javax.persistence.Query query)
em
- The entity manager the query is associated toquery
- The JPA queryString getSqlAlias(javax.persistence.EntityManager em, javax.persistence.Query query, String alias)
em
- The entity manager the query is associated toquery
- The JPA queryalias
- The from node aliasint getSqlSelectAliasPosition(javax.persistence.EntityManager em, javax.persistence.Query query, String alias)
em
- The entity manager the query is associated toquery
- The JPA queryalias
- The JPQL select aliasint getSqlSelectAttributePosition(javax.persistence.EntityManager em, javax.persistence.Query query, String attribute)
em
- The entity manager the query is associated toquery
- The JPA queryattribute
- The JPQL attribute expressionList getResultList(ServiceProvider serviceProvider, List<javax.persistence.Query> participatingQueries, javax.persistence.Query query, String sqlOverride)
serviceProvider
- The service provider to access EntityManager and othersparticipatingQueries
- The list of participating queries from which to combine parametersquery
- The main query to executesqlOverride
- The actual SQL query to execute instead of the query's original SQLObject getSingleResult(ServiceProvider serviceProvider, List<javax.persistence.Query> participatingQueries, javax.persistence.Query query, String sqlOverride)
serviceProvider
- The service provider to access EntityManager and othersparticipatingQueries
- The list of participating queries from which to combine parametersquery
- The main query to executesqlOverride
- The actual SQL query to execute instead of the query's original SQLint executeUpdate(ServiceProvider serviceProvider, List<javax.persistence.Query> participatingQueries, javax.persistence.Query query, String sqlOverride)
serviceProvider
- The service provider to access EntityManager and othersparticipatingQueries
- The list of participating queries from which to combine parametersquery
- The main query to executesqlOverride
- The actual SQL query to execute instead of the query's original SQLReturningResult<Object[]> executeReturning(ServiceProvider serviceProvider, List<javax.persistence.Query> participatingQueries, javax.persistence.Query exampleQuery, String sqlOverride)
serviceProvider
- The service provider to access EntityManager and othersparticipatingQueries
- The list of participating queries from which to combine parametersexampleQuery
- The example query providing the result type structuresqlOverride
- The actual SQL query to execute instead of the query's original SQLCopyright © 2014–2018 Blazebit. All rights reserved.