Jakarta Persistence (JPA) Method
Object getIdentifier(
Object entity
)
Return the id of the entity. A generated id is not guaranteed to be available until after the database insert has occurred. Returns null if the entity does not yet have an id.
- Parameters:
entity- entity instance
- Returns:
- id of the entity.
- Throws:
- if the object is found not to be an entity.IllegalArgumentException
- Since:
- Jakarta Persistence (JPA) 1.0