in Technology by

What are the callback annotations for entity bean?

Please log in or register to answer this question.

1 Answer

0 votes
by

Following is the list of callback annotations for entity bean:

  • @PrePersist - method is invoked when an entity is created in database.

  • @PostPersist - method is invoked after an entity is created in database.

  • @PreRemove - method is invoked when an entity is deleted from the database.

  • @PostRemove - method is invoked after an entity is deleted from the database.

  • @PreUpdate - method is invoked before an entity is to be updated in the database.

  • @PostLoad - method is invoked when a record is fetched from database and loaded into the entity.

Related questions

...