if (!primaryKey.isPrimaryKey()) {
throw new GenericModelException("[GenericDelegator.findByPrimaryKey] Passed primary key is not a valid primary key: " + primaryKey);
}
this.evalEcaRules(EntityEcaHandler.EV_RUN, EntityEcaHandler.OP_FIND, primaryKey, ecaEventMap, (ecaEventMap == null), false);
try {
value = helper.findByPrimaryKey(primaryKey);
} catch (GenericEntityNotFoundException e) {
value = null;
}
if (value != null) {
value.setDelegator(this);