Example usage for javax.persistence TypedQuery executeUpdate

List of usage examples for javax.persistence TypedQuery executeUpdate

Introduction

In this page you can find the example usage for javax.persistence TypedQuery executeUpdate.

Prototype

int executeUpdate();

Source Link

Document

Execute an update or delete statement.

Usage

From source file:org.apache.rave.portal.repository.impl.JpaWidgetRepository.java

@Override
public int deleteAllWidgetRatings(String userId) {
    TypedQuery<JpaWidgetRating> query = manager.createNamedQuery(JpaWidgetRating.DELETE_ALL_BY_USER,
            JpaWidgetRating.class);
    query.setParameter("userId", userId == null ? null : Long.parseLong(userId));
    return query.executeUpdate();
}