* @param entityId the the entity for which the listener was called.
* @return the list of results.
*/
public List findLifecycleEventByEntity(final String className, final CallbackType callbackEvent,
final int entityId) {
EntityManager entityManager = entityManagerFactory.createEntityManager();
Query query = entityManager.createQuery("SELECT e FROM ListenerManager "
+ "e WHERE e.className = :className AND e.callbackEvent= :event AND e.entityId = :entityId");
query.setParameter("className", className);
query.setParameter("event", callbackEvent);
query.setParameter("entityId", new Integer(entityId));
return query.getResultList();