The actual Oracle 1Z0-898 questions and answers are up to date by our technical engineers live. Youre going to get the latest simulated check questions which are in line with the present Oracle test. Much more notably, the particular update day prolonged in order to A hundred and eighty days, exhibiting that you will have fifty percent any years time to examine 1Z0-898 dumps.

2017 Feb 1Z0-898 practice test

Q11. 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 = c.join(Customer__.orders); 

cq.select(c).distinct(true); 

Subquery<Double> sq = cq.subquery(Double.class); 

Root<Order> subo = cq.correlate(o); 

sq.select(cb.max(subo.get(Order_.totalPrice))); 

cq.where(cb.equal(o.get(Order_.totalPrice), cb.all(sq))); 

B. CriteriaBuilder cb = ... 

CriteriaQuery<Customer> cq = cb.createquery(customer.class) 

Root<Customer> c = cq.from(Customer.class); 

Join<Customer, Order> o = c.join(Customer__.orders); 

cq.select(c).distinct(true); 

Subquery<Double> sq = cq.subquery(Double.class); 

Root<Order> subo = cq.correlate(o); 

sq.select(cb.max(subo.get(Order_.totalPrice))); 

cq.where(cb.equal(o.get(Order_.totalPrice), cb.all(sq))); 

C. CriteriaBuilder cb = ... 

CriteriaQuery<Customer> cq = cb.cteateQuery(Customer.class); 

Root<Customer> c = cq.from(Customer.class); 

Join<Customer, Order> o = c.join(Customer__.orders); 

cq.select(c).distinct(true); 

Subquery<Double> sq = cq.subquery(Double.class); 

Root<Order> subo = cq.correlate(o); 

sq.select(cb.max(subo.get(Order_.totalPrice))); 

cq.where(cb.equal(o.get(Order_.totalPrice), cb.all(sq))); 

D. CriteriaBuilder cb = ... 

CriteriaQuery<Customer> cq = cb.createQuery(Customer.class); 

Root<Customer> c = cq.from(Customer.class); 

Join<Customer, Order> o = c.join(Customer_.orders); 

cq.select(c).distinct(true); 

Subquery<Double> sq = cq.subquery(Double.class); 

Root<Order> subo = sq.from(Order.class); 

sq. select (ci: . max ( subo . get (Order_ . Total Price) ) ) ; 

cq.where(sq.all(o.gei(Order_.totalPrice))); 

Answer:


Q12. Given: 

Which statement is correct? 

A. The method will return TRUE. 

B. The method will return FALSE. 

C. The method will throw an exception. 

D. The order instance will be removed from the database. 

Answer:


Q13. Persistence application locks entity x with a LockModeType. PESSIMISTIC_READ lock type, which statement is true? 

A. This operation will force serialization among transactions attempting to read the entity data. 

B. This operation will result in a TransactionRolledbackException if the lock cannot be obtained. 

C. If the application later updates the entity, and the changes are flushed to the database, the lock will be converted to an exclusive lock. 

D. LockModeType. PESSIMISTIC_READ is the synonym of the LockModeType.READ. 

Answer:


Q14. The developer has defined the following entity class office: 

Which of the following attributes will be in corresponding generated static metamodel class for the rooms’ field? 

A. Public static volatile CollectionAttribute<Room> rooms; 

B. Public static volatile ListAttribute<Room> rooms; 

C. Public static volatile ListAttribute<Office, Room> rooms; 

D. Public static volatile SingleAttribute<Room> rooms; 

Answer:


Q15. A developer who is designing entity classes to map a legacy database encounters a table called STUDENT_RECORD. 

This table has two columns, STUDENT_ID and STUDENT_INFO_ID. The primary key of this table consists of both columns, and there is a unique constraint on each info column. 

The STUDENT_ID column is foreign key to the STUDENT table and STUDENT_INFO_ID column is a foreign key to the STUDENT_DAT table. 

What entity classes and relationships can the developer use to model these tables and relationship?(Choose two) 

A. Model the student table as a student entity and STUDENT_DATA table StudentData entity. Model the STUDENT_RECORDS table as bidirectional many-to-many relationship between the student entity on the student data entity. 

B. Model the STUDENT table as a Student entity and the STUDENT-DATA table as a StudentData entity. Model the STUDENT_RECORD table as a bidirectional one-to-one relationship between the student entity and the StudentData entity. 

C. Model the STUDENT table as a Student entity and the STUDENT-DATA table as a StudentData entity. Model the Student-Records table as a student record entity. Create a many-to-one one relationship from the StudentRecord entity to the student entity and many-to-one relationship from the StudentRecord entity entity to the Student entity and many-to-one relationship from the student entity to the StudentData entity and one-to-many relationship from the StudentData entity to the StudentRecord entity. 

D. Model the STUDENT table as a Student entity and the STUDENT-DATA table as a StudentData entity. Model the STUDENT-RECORD table as a StudentRecord entity. Create a bidirectional one-to-one relationship between the StudentRecord entity and bidirectional one-to-one relationship between the Student Record entity and the Student Data entity. 

Answer: AC 


Up to the immediate present 1Z0-898 free download:

Q16. If a Persistence application locks entity x with a pessimistic lock, which statement is true? 

A. The Persistentprovider will lock the database row(s) that correspond to all persistent fields of properties of an instance, including element collections. 

B. Only single table per class hierarchy mapping is supported with this lock type. 

C. A Persistence provider will lock the entity relationships for which the locked entity contains the foreign key. 

D. A separate lock statement must be called for each subclass in entity hierarchy. 

Answer:


Q17. A named query that sets an exclusive pessimistic on the entities returned by the query by setting the NamedQuery lockMode element to LockModeType.PESSIMISTIC_FORCE_INCREMENT. The application starts transaction and executes the query. 

Which of the following statements is correct about the entities returned by the query? 

A. Only the current transition may modify or delete the entity instances. 

B. The current transaction may NOT modify or delete the entity instances. 

C. Other concurrent transactions may modify or delete the entity instances. 

D. Other concurrent transactions may modify but MAY NOT delete the entity instances. 

Answer:


Q18. A JavaEE application is packaged as follows. 

Which of the following is true for a portable JavaEE application? 

A. This is an invalid application. A JavaEE application cannot have more than one persistent with same name. 

B. “MyPu” defined under each module is visible to only the defining module. There is no way other modules can access it. 

C. Code in the ejb1.jar can access “MyPU” defined under war1.war using “war1#myPU” 

Answer:


Q19. The developer wants to write a criteria query that will return the number of orders made by customer of each county. 

Assume that customer is an entity with a unidirectional one-to-many relationship to the Order entity and that Address is an embeddable class, with an attribute country of type String. 

Which one of the queries below correctly achieves this? 

A. CriteriaBuilder cb> = ... 

CriteriaQuery cq = cb.createQuery(); 

Root<Customer> c = cq.from(Customer.class); 

Join<Customer, Order> o = c.join(Customer_.orders); 

cq.multiselect(cb.count(0), c,get(customer_.address.get(address_.country) 

cq.groupBy (c.get(customer_.address) .get(address_.country)) 

B. CriteriaBuilder cb> = ... 

CriteriaQuery cq = cb.createQuery(); 

Root<Customer> c = cq.from(Customer.class); cq.select (cb.count(c.join 

(customer_. Orders)) , c.get(customers(0), c.get(customer_.address) . get (Address_’country)); 

(c.get(Customer_.address). get(address_.country)); 

C. CriteriaBuilder cb> = ... 

CriteriaQuery cq = cb.createQuery(); 

Root<Custower> c = cq.from(Customer.class); 

Join<Customer, Order> o = c.join(Customer_.orders); 

cq.select(cb.count(o)); 

cq.groupBy(c.qet(Customer__.address) - get(Address_.country)) ; 

D. CriteriaBuilder cb = ... 

CriteriaQuery cq = cb.createQueryO; 

Root<Customer> c = cq.from(Customer.class); 

Root<Customer> c = cq . from (Customer . class ) ,-Join<Customer, Order> o = c.join(Customer_.orders); 

Join<Address, String> country= c.join(Customer,.address) .join(Address 

cq.multiselect(cq.count(o), country ); 

cq.groupBy(c.get(Customer.address)- get (Address_ . country) ) ; 

Answer:


Q20. If an application uses an extended persistence context, which of the following is true? 

A. The persistencecontext exists until all transactions invoked by the EntityManager complete. 

B. The persistence context exists until all transactions invoked by the EntityManagar complete and the EntityManager.clear () method is invoked. 

C. The persistence context exists until the EntityManagerinstance is closed. 

D. The persistence context exists until the EntityManagerFactory instance is closed. 

Answer: