Jakarta Persistence (JPA) Method

boolean contains(
  Class<?> cls,
  Object primaryKey
)


Whether the cache contains data for the given entity.
Parameters:
cls - entity class
primaryKey - primary key
Returns:
boolean indicating whether the entity is in the cache.
Since:
Jakarta Persistence (JPA) 1.0