use of org.camunda.bpm.engine.impl.db.DbEntityLifecycleAware in project camunda-bpm-platform by camunda.
the class DbEntityManager method onEntityLoaded.
public void onEntityLoaded(DbEntity entity) {
// we get a callback when the persistence session loads an object from the database
DbEntity cachedPersistentObject = dbEntityCache.get(entity.getClass(), entity.getId());
if (cachedPersistentObject == null) {
// only put into the cache if not already present
dbEntityCache.putPersistent(entity);
// invoke postLoad() lifecycle method
if (entity instanceof DbEntityLifecycleAware) {
DbEntityLifecycleAware lifecycleAware = (DbEntityLifecycleAware) entity;
lifecycleAware.postLoad();
}
}
}
Aggregations