@Override
 protected Serializable saveWithRequestedId(
     Object entity,
     Serializable requestedId,
     String entityName,
     Object anything,
     EventSource source) {
   callbackHandler.preCreate(entity);
   return super.saveWithRequestedId(entity, requestedId, entityName, anything, source);
 }
 @Override
 protected Serializable saveWithGeneratedId(
     Object entity,
     String entityName,
     Object anything,
     EventSource source,
     boolean requiresImmediateIdAccess) {
   callbackHandler.preCreate(entity);
   return super.saveWithGeneratedId(
       entity, entityName, anything, source, requiresImmediateIdAccess);
 }
 @Override
 protected boolean invokeInterceptor(
     SessionImplementor session,
     Object entity,
     EntityEntry entry,
     Object[] values,
     EntityPersister persister) {
   boolean isDirty = false;
   if (entry.getStatus() != Status.DELETED) {
     if (callbackHandler.preUpdate(entity)) {
       isDirty = copyState(entity, persister.getPropertyTypes(), values, session.getFactory());
     }
   }
   return super.invokeInterceptor(session, entity, entry, values, persister) || isDirty;
 }