public static EOEnterpriseObject objectWithQualifier(EOEditingContext editingContext, String entityName, EOQualifier qualifier) {
EOFetchSpecification fetchSpec = new EOFetchSpecification(entityName, qualifier, null);
NSArray results = editingContext.objectsWithFetchSpecification(fetchSpec);
if( results.count() > 1)
{
throw new MoreThanOneException("objectMatchingValueForKeyEntityNamed: Matched more than one object with " +qualifier);
}
return (results.count() == 0) ? null : (EOEnterpriseObject)results.objectAtIndex(0);
}