Search in sources :

Example 6 with CustomReturningSQLTypedQuery

use of com.blazebit.persistence.impl.query.CustomReturningSQLTypedQuery in project blaze-persistence by Blazebit.

the class AbstractInsertCollectionCriteriaBuilder method getExecuteWithReturningQuery.

@Override
protected <R> TypedQuery<ReturningResult<R>> getExecuteWithReturningQuery(TypedQuery<Object[]> exampleQuery, Query baseQuery, String[] returningColumns, ReturningObjectBuilder<R> objectBuilder) {
    QuerySpecification querySpecification = getQuerySpecification(baseQuery, exampleQuery, returningColumns, objectBuilder, null);
    CustomReturningSQLTypedQuery query = new CustomReturningSQLTypedQuery<R>(querySpecification, exampleQuery, parameterManager.getCriteriaNameMapping(), parameterManager.getTransformers(), parameterManager.getValuesParameters(), parameterManager.getValuesBinders());
    parameterManager.parameterizeQuery(query);
    baseQuery.setFirstResult(firstResult);
    baseQuery.setMaxResults(maxResults);
    return query;
}
Also used : QuerySpecification(com.blazebit.persistence.impl.query.QuerySpecification) CollectionInsertModificationQuerySpecification(com.blazebit.persistence.impl.query.CollectionInsertModificationQuerySpecification) CustomReturningSQLTypedQuery(com.blazebit.persistence.impl.query.CustomReturningSQLTypedQuery)

Aggregations

CustomReturningSQLTypedQuery (com.blazebit.persistence.impl.query.CustomReturningSQLTypedQuery)6 QuerySpecification (com.blazebit.persistence.impl.query.QuerySpecification)6 CTENode (com.blazebit.persistence.impl.query.CTENode)1 CollectionDeleteModificationQuerySpecification (com.blazebit.persistence.impl.query.CollectionDeleteModificationQuerySpecification)1 CollectionInsertModificationQuerySpecification (com.blazebit.persistence.impl.query.CollectionInsertModificationQuerySpecification)1 CollectionUpdateModificationQuerySpecification (com.blazebit.persistence.impl.query.CollectionUpdateModificationQuerySpecification)1 DeleteModificationQuerySpecification (com.blazebit.persistence.impl.query.DeleteModificationQuerySpecification)1 ModificationQuerySpecification (com.blazebit.persistence.impl.query.ModificationQuerySpecification)1 UpdateModificationQuerySpecification (com.blazebit.persistence.impl.query.UpdateModificationQuerySpecification)1