Example usage for javax.persistence.criteria CriteriaDelete toString

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

Introduction

In this page you can find the example usage for javax.persistence.criteria CriteriaDelete 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(CriteriaDelete deleteQuery) {
    // TODO JPA 2.1 Method
    ((CriteriaDeleteImpl<?>) deleteQuery).compile();

    org.apache.openjpa.kernel.Query kernelQuery = _broker.newQuery(CriteriaBuilderImpl.LANG_CRITERIA,
            deleteQuery);//from  w w w  . j a  v  a 2  s .  c o m

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

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