Example usage for org.hibernate.query.internal QueryParameterBindingsImpl expandListValuedParameters

List of usage examples for org.hibernate.query.internal QueryParameterBindingsImpl expandListValuedParameters

Introduction

In this page you can find the example usage for org.hibernate.query.internal QueryParameterBindingsImpl expandListValuedParameters.

Prototype

@Deprecated
@SuppressWarnings("unchecked")
public String expandListValuedParameters(String queryString, SharedSessionContractImplementor session) 

Source Link

Usage

From source file:com.blazebit.persistence.integration.hibernate.Hibernate52Access.java

License:Apache License

@Override
public String expandParameterLists(SessionImplementor session, org.hibernate.Query hibernateQuery,
        Map<String, TypedValue> namedParamsCopy) {
    QueryParameterBindingsImpl queryParameterBindings = hibernateQuery.unwrap(QueryParameterBindingsImpl.class);
    SharedSessionContractImplementor producer = (SharedSessionContractImplementor) ((QueryImplementor<?>) hibernateQuery)
            .getProducer();//  w  w w . ja  v  a2s  .c  o m
    String query = hibernateQuery.getQueryString();

    query = queryParameterBindings.expandListValuedParameters(query, producer);
    return query;
}

From source file:com.blazebit.persistence.integration.hibernate.Hibernate53Access.java

License:Apache License

@Override
public String expandParameterLists(SessionImplementor session, org.hibernate.Query hibernateQuery,
        Map<String, TypedValue> namedParamsCopy) {
    QueryParameterBindingsImpl queryParameterBindings = hibernateQuery.unwrap(QueryParameterBindingsImpl.class);
    SharedSessionContractImplementor producer = (SharedSessionContractImplementor) ((QueryImplementor<?>) hibernateQuery)
            .getProducer();//  www  . j av  a 2s  .  c o m
    String query = hibernateQuery.getQueryString();

    // NOTE: In Hibernate 5.3.0.CR1 this is call causes a side effect which is why this is essentially unusable for us
    query = queryParameterBindings.expandListValuedParameters(query, producer);
    return query;
}