JPA entity lifecycle events example.