title: How to determine which entity invoked method on EntityListener
body: <p>I have EntityListener class that serves several entities (which extends a base entity).</p>
  
  <p>How can I determine which entity invoked the method of the  EntityListener?</p>
  
  <pre><code>public class BaseEntityListener {
      @PreUpdate
      @PrePersist
      public void onUpdate(BaseEntity md) {
          md.timestamp = new Date();
  
          //Do some code base on the entity type ...
      }
  </code></pre>