}
// Since isLookupByNaturalKey is true there can be only one CriterionEntry and getCriterion() will
// return an instanceof NaturalIdentifier
final CriterionEntry criterionEntry = (CriterionEntry) criteria.iterateExpressionEntries().next();
final NaturalIdentifier naturalIdentifier = (NaturalIdentifier) criterionEntry.getCriterion();
final Map<String, Object> naturalIdValues = naturalIdentifier.getNaturalIdValues();
final int[] naturalIdentifierProperties = entityPersister.getNaturalIdentifierProperties();
// Verify the NaturalIdentifier criterion includes all naturalId properties, first check that the property counts match
if ( naturalIdentifierProperties.length != naturalIdValues.size() ) {
return null;