Which two statements are correct?

An application has three entities: the mapped superclass person class entity, and the parent and child entities, which are subclasses of person.
The application has created four entity Instances:
Person1 is a Person entity with a primary key of 50
Parent1is a Parent entity with a primary key of 100
Child1 is a chi id entity with a primary key of 400
Child2 is a child entity with a primary key of 600
Caching has been enabled in the persistence unit, the persistence provider supports caching, and none of entities have the Cacheable annotation applied, or a cacheable XML element in persistence.xml.
The application executes the following code:

Cache cache = . . . ;
Cache.evict(person.class)
Boolean result = cache.contains (Child.class, 400);

Assume there is no concurrent activity involving the cache.
Which two statements are correct?
(Choose two)

An application has three entities: the mapped superclass person class entity, and the parent and child entities, which are subclasses of person.
The application has created four entity Instances:
Person1 is a Person entity with a primary key of 50
Parent1is a Parent entity with a primary key of 100
Child1 is a chi id entity with a primary key of 400
Child2 is a child entity with a primary key of 600
Caching has been enabled in the persistence unit, the persistence provider supports caching, and none of entities have the Cacheable annotation applied, or a cacheable XML element in persistence.xml.
The application executes the following code:

Cache cache = . . . ;
Cache.evict(person.class)
Boolean result = cache.contains (Child.class, 400);

Assume there is no concurrent activity involving the cache.
Which two statements are correct?
(Choose two)

A.
Only person1 will be removed from cache.

B.
Person1, parent1, child1, and child2 will be removed from cache.

C.
Result is true

D.
Result is false



Leave a Reply 3

Your email address will not be published. Required fields are marked *