nerdexam
Oracle

1Z0-898 · Question #40

Given: Which statement is correct?

The correct answer is A. The method will return TRUE. An object that defines an ordering over the query results. merge(T entity) Merge the state of the given entity into the current persistence context remove(java.lang.Object entity) Remove the entity instance. *contains(java.lang.Object entity) Check if the instance is a managed…

EntityManager Operations

Question

Given:

Which statement is correct?

Exhibit

1Z0-898 question #40 exhibit

Options

  • AThe method will return TRUE.
  • BThe method will return FALSE.
  • CThe method will throw an exception.
  • DThe order instance will be removed from the database.

How the community answered

(32 responses)
  • A
    84% (27)
  • B
    3% (1)
  • C
    9% (3)
  • D
    3% (1)

Explanation

An object that defines an ordering over the query results. *merge(T entity) Merge the state of the given entity into the current persistence context *remove(java.lang.Object entity) Remove the entity instance. *contains(java.lang.Object entity) Check if the instance is a managed entity instance belonging to the current persistence context. Note: An EntityManager instance is associated with a persistence context. A persistence context is a set of entity instances in which for any persistent entity identity there is a unique entity instance. Within the persistence context, the entity instances and their lifecycle are managed. The EntityManager API is used to create and remove persistent entity instances, to find entities by their primary key, and to query over entities. The set of entities that can be managed by a given EntityManager instance is defined by a persistence unit. A persistence unit defines the set of all classes that are related or grouped by the application, and which must be colocated in their mapping to a single database

Topics

#entity state#persistence context#EntityManager operations

Community Discussion

No community discussion yet for this question.

Full 1Z0-898 Practice