The Java Persistence API defines the Query interface. Which two statements about the
Query.executeUpdate method are true? (Choose two.)
A.
Itmust always be executed within a transaction.
B.
It throws a PersistenceException if no entities were updated.
C.
It throws an HlegalStateException if called on a Query instance created with a Java Persistence
SELECT query.
D.
All managed entity objects corresponding to database rows affected by the update will have
their state changed to correspond with the update.