protected void purgeEntity(ModelKey ref, ModelPayload payload) {
try {
final Class<IEntity> entityClass =
(Class<IEntity>) context.getEntityTypeResolver().resolveEntityClass(ref.getEntityType());
final IEntityService<IEntity> svc = context.getEntityServiceFactory().instanceByEntityType(entityClass);
final PrimaryKey pk = new PrimaryKey(entityClass, ref.getId());
final IEntity e = svc.load(pk);
svc.purge(e);
payload.setRef(ref);
payload.getStatus().addMsg(e.descriptor() + " purged.", MsgLevel.INFO, MsgAttr.STATUS.flag);
}