Jones, after my change you should be able to access the state object in the pre-load event with no performance impact. Adding something like state in the PostLoadEvent interface is not that useful IMO, since the getEntity() method will return an initialized entity instance which already contains all its property values. I don’t know why you need the state as an object array, but I would suggest accessing the data directly from the entity instance (i.e. using getters), rather than calling persister.getValues() which is expensive. I'd suggest also taking a look at JPA lifecycle callback methods once again. |