Class CustomQuerySpecification<T>
java.lang.Object
com.blazebit.persistence.impl.query.CustomQuerySpecification<T>
- All Implemented Interfaces:
QuerySpecification<T>
- Direct Known Subclasses:
CTEQuerySpecification,ModificationQuerySpecification,SetOperationQuerySpecification
- Since:
- 1.2.0
- Author:
- Christian Beikov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final javax.persistence.Queryprotected final Stringprotected final javax.persistence.Queryprotected final DbmsDialectprotected booleanprotected final javax.persistence.EntityManagerprotected final List<EntityFunctionNode>protected final ExtendedQuerySupportprotected final Stringprotected final Map<String,Collection<?>> protected final Stringprotected final Collection<? extends javax.persistence.Parameter<?>>protected List<javax.persistence.Query>protected final booleanprotected final booleanprotected final ServiceProviderprotected final booleanprotected Stringprotected final DbmsStatementType -
Constructor Summary
ConstructorsConstructorDescriptionCustomQuerySpecification(AbstractCommonQueryBuilder<?, ?, ?, ?, ?> commonQueryBuilder, javax.persistence.Query baseQuery, Collection<? extends javax.persistence.Parameter<?>> parameters, Set<String> listParameters, String limit, String offset, List<String> keyRestrictedLeftJoinAliases, List<EntityFunctionNode> entityFunctionNodes, boolean recursive, List<CTENode> ctes, boolean shouldRenderCtes, boolean queryPlanCacheEnabled, javax.persistence.Query countWrapperExampleQuery) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringBuilderapplyCtes(StringBuilder sqlSb, javax.persistence.Query baseQuery, List<javax.persistence.Query> participatingQueries) applyExtendedSql(StringBuilder sqlSb, boolean isSubquery, boolean isEmbedded, StringBuilder withClause, String dmlAffectedTable, String[] returningColumns, Map<DbmsModificationState, String> includedModificationStates) protected StringBuilderapplySqlTransformations(String sqlQuery) createModificationPlan(int firstResult, int maxResults) createSelectPlan(int firstResult, int maxResults) javax.persistence.QueryCollection<? extends javax.persistence.Parameter<?>>List<javax.persistence.Query>getSql()protected voidvoidonCollectionParameterChange(String parameterName, Collection<?> value)
-
Field Details
-
em
protected final javax.persistence.EntityManager em -
dbmsDialect
-
serviceProvider
-
extendedQuerySupport
-
statementType
-
baseQuery
protected final javax.persistence.Query baseQuery -
parameters
-
listParameters
-
limit
-
offset
-
keyRestrictedLeftJoinAliases
-
entityFunctionNodes
-
recursive
protected final boolean recursive -
ctes
-
shouldRenderCtes
protected final boolean shouldRenderCtes -
queryPlanCacheEnabled
protected final boolean queryPlanCacheEnabled -
countWrapperExampleQuery
protected final javax.persistence.Query countWrapperExampleQuery -
countPrefix
-
dirty
protected boolean dirty -
sql
-
participatingQueries
-
addedCtes
-
-
Constructor Details
-
CustomQuerySpecification
public CustomQuerySpecification(AbstractCommonQueryBuilder<?, ?, ?, ?, ?> commonQueryBuilder, javax.persistence.Query baseQuery, Collection<? extends javax.persistence.Parameter<?>> parameters, Set<String> listParameters, String limit, String offset, List<String> keyRestrictedLeftJoinAliases, List<EntityFunctionNode> entityFunctionNodes, boolean recursive, List<CTENode> ctes, boolean shouldRenderCtes, boolean queryPlanCacheEnabled, javax.persistence.Query countWrapperExampleQuery)
-
-
Method Details
-
createModificationPlan
- Specified by:
createModificationPlanin interfaceQuerySpecification<T>
-
createSelectPlan
- Specified by:
createSelectPlanin interfaceQuerySpecification<T>
-
getSql
- Specified by:
getSqlin interfaceQuerySpecification<T>
-
getParticipatingQueries
- Specified by:
getParticipatingQueriesin interfaceQuerySpecification<T>
-
getParameters
- Specified by:
getParametersin interfaceQuerySpecification<T>
-
getAddedCtes
- Specified by:
getAddedCtesin interfaceQuerySpecification<T>
-
getBaseQuery
public javax.persistence.Query getBaseQuery()- Specified by:
getBaseQueryin interfaceQuerySpecification<T>
-
onCollectionParameterChange
- Specified by:
onCollectionParameterChangein interfaceQuerySpecification<T>
-
initialize
protected void initialize() -
applyExtendedSql
protected Map<String,String> applyExtendedSql(StringBuilder sqlSb, boolean isSubquery, boolean isEmbedded, StringBuilder withClause, String dmlAffectedTable, String[] returningColumns, Map<DbmsModificationState, String> includedModificationStates) -
applyCtes
protected StringBuilder applyCtes(StringBuilder sqlSb, javax.persistence.Query baseQuery, List<javax.persistence.Query> participatingQueries) -
applySqlTransformations
-