Tips to Pass 1Z0-898 Exam (21 to 30)

Real of 1Z0-898 test engine materials and lab for Oracle certification for examinee, Real Success Guaranteed with Updated 1Z0-898 pdf dumps vce Materials. 100% PASS Java Platform, Enterprise Edition 6 Java Persistence API Developer Certified Expert Exam exam Today!

2016 Jun 1Z0-898 Study Guide Questions:

Q21. Which two of the following statements are true of embeddable classes? (Choose two) 

A. An embeddable class must not be used to represent the state of another embeddable class. 

B. Null comparison operations over embeddable classes are not supported in the Java Persistence query language. 

C. An embeddable class must not contain a relationship to an entity. 

D. An embeddable class can be the key of a Map relationship. 

Answer: BD 

Q22. 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 

Answer: BDE 

Q23. Refer to the Exhibit. 

A developer wants to have bookingdata stored in the table BOOKING, flightnumber in table FLIGHTBOOKING, and hotel name in HOTELBOOKING. 

Which code, inserted at line 11 of class Booking, is appropriate for his strategy? 

A. @Joined 

B. @SingleTable 

C. @TablePerClass 

D. @Inheritance (strategy = JOINED) 

E. @Inheritance (strategy = SINGLE_TABLE) 

F. @Inheritance (strategy = TABLE_PER_CLASS) 

Answer: D 

1Z0-898  braindumps

Renovate 1Z0-898 practice question:

Q24. 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 version value in each table is updated. 

B. The persistence provider will create a new transaction for the bulk update. 

C. An OptimisticLockException will be thrown by the persistence provider. 

D. The value of the Version attributes of the updated entitles should be also be explicitly updated by the query. 

Answer: A 

Q25. A developer wants to create a Java Persistence query that will include a subquery. 

Which three are true? (Choose three.) 

A. Subqueries can be used in a FROM clause. 

B. Subqueries can be used in a WHERE clause. 

C. The ANY expression can be used only with a subquery. 

D. The EXISTS expression can be used only with a subquery. 

E. The MEMBER expression can be used only with a subquery. 

Answer: BCD 

Q26. Which EntityManager API will lock entity x with a pessimistic lock? 

A. em.lock(x, LockModeType.WRITE) 

B. em.lock(x, LockModeType.PESSIMISTIC) 

C. em.lock(x, LockModeType.PESSIMISTIC_READ) 

D. em.lock(x, LockModeType.OPTIMISTIC_FORCE_INCREMENT) 

Answer: C 

certleader.com

Refined 1Z0-898 vce:

Q27. An application wants to utilize side effects of cascading entity manager operations to related entities. 

Which statement is correct? 

A. The persist operation is always cascaded to related entitles for one-to one and one-to-many relationships. 

B. To minimize the effect of the remove operation applied to an entity participating in a many-to-many relationship the remove operation should hecascadeto entities on both sides of the relationship. 

C. The persist operation applied to a new entity x is cascaded to entities referenced by x if the relationship from x to these other entities is annotated with the cascade=PERSIST or cascade=ALL annotation element value. 

D. The remove operation applied to a removed entity x is cascaded to entities referenced by x of the relationship from x to these other entities is annotated with the cascade = REMOVE of cascade = ALL annotation element value. 

Answer: C 

Q28. An application uses an application-managed entity manager. Which of the following is NOT true? 

A. The application may specify whether the scope of the persistence context is extended. 

B. The application must use EntityManagerFactory instances to create entity managers. 

C. Entity manager instances must be explicitly closed. 

D. The application may need to call EntityManager. joinTransaction If a JTA aware entity manager is used. 

Answer: A 

Q29. An entity person is mapped to a table PERSON and has a collection-valued persistence field otherUsedNames that stores names used by a person. The other used Names field is mapped to a separate table called NAMES. Which code fragment correctly defines such field? 

A. @ElementCollection (name = “NAMES”) 

Protected set<String> otherUsedNames = new HashSet () ; 

B. @Element collection 

@ElementTable (name = “NAMES”) 

Protected set<String> otherUsedNames = new HashSet () ; 

C. @ElementCollection 

@SecondaryTable (names = “NAMES”) 

Protected set<String> otherUsedNames = new HashSet () ; 

D. @ElementCollection 

@CollectionTable(names = “Names”) 

Protected set<String> otherUsedNames = new HashSet () ; 

Answer: D 

Q30. 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 

About 1Z0-898 Information: 1Z0-898 Dumps

Certleader Dumps
Certleader is a company specialized on providing high quality IT exam materials and fully committed to assist our respected clients crack any IT certification tests on their 1st efforts.