Package javax.persistence.criteria

Examples of javax.persistence.criteria.CriteriaDelete.where()


   
    public void deleteMovie() {
        CriteriaBuilder builder = em.getCriteriaBuilder();
        CriteriaDelete deleteCriteria = builder.createCriteriaDelete(Movie.class);
        Root<Movie> updateRoot = deleteCriteria.from(Movie.class);
        deleteCriteria.where(builder.equal(updateRoot.get(Movie_.name), "The Matrix"));
        Query q = em.createQuery(deleteCriteria);
        q.executeUpdate();
        em.flush();
    }
   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.