Example usage for javax.persistence.criteria CriteriaUpdate toString

List of usage examples for javax.persistence.criteria CriteriaUpdate toString

Introduction

In this page you can find the example usage for javax.persistence.criteria CriteriaUpdate toString.

Prototype

public String toString() 

Source Link

Document

Returns a string representation of the object.

Usage

From source file:org.apache.openjpa.persistence.EntityManagerImpl.java

@Override
public Query createQuery(CriteriaUpdate updateQuery) {
    // TODO JPA 2.1 Method
    ((CriteriaUpdateImpl<?>) updateQuery).compile();

    org.apache.openjpa.kernel.Query kernelQuery = _broker.newQuery(CriteriaBuilderImpl.LANG_CRITERIA,
            updateQuery);/*  w w w.  j a v  a2  s.c om*/

    QueryImpl facadeQuery = newQueryImpl(kernelQuery, null, _log).setId(updateQuery.toString());
    Set<ParameterExpression<?>> params = ((CriteriaUpdateImpl<?>) updateQuery).getParameters();

    for (ParameterExpression<?> param : params) {
        facadeQuery.declareParameter(param, param);
    }
    return facadeQuery;
}