An application uses optimistic locking by defining version attributes in its entity classes. The application performs a bulk update of the entities using a JPQL query. Which of the following is correct? A. The persistence provider will ensure that the…

An application has two entities, parson and Address. The application calls the DeletePersonsByStatus named query. Which of the following is true? A. The person entities are removed, but NOT their related address entities. B. The person entities, and all their…

Which one of the following queries selects the customer whose order has the highest total price? A. CriteriaBuilder cb = …Criteria Query <Customer> cq = cb.create Query (Customer.class);Root<Customer> c = cq.from (Customer.class);Join<Customer, Order> o = B. join(Customer__.orders);cq.select(c).distinct(true);Subquery<Double> sq = cq.subquery(Double.class);Root<Order>…

If a Persistence application locks entity x with a pessimistic lock, which statement is true? A. The Persistent provider will lock the database row(s) that correspond to all persistent fields of properties of an instance, including element collections. B. Only…

An application that uses pessimistic locking calls an updateData method that results in a LockTimeoutException being thrown. What three statements are correct? (Choose three) A. The current transaction continues. B. The current statement continues. C. The current transaction is rolled…

Entity lifecycle callback methods may be defined in which three classes? (Choose three) A. Embedded classes B. Entity classes C. Abstract classes D. Entity listener classes E. Mapped superclasses F. Concrete non-entity superclasses