I have EntityListener class that serves several entities (which extends a base entity).
How can I determine which entity invoked the method of the EntityListener?
public class BaseEntityListener {
@PreUpdate
@PrePersist
public void onUpdate(BaseEntity md) {
md.timestamp = new Date();
//Do some code base on the entity type ...
}
I could resolve this issue this way:
This get the actual implementation.