/** * Retrieve an object using a dictionary of keys and values to match. * * @param context The editing context to use * @param keysAndValues a dictionary of keys and values to match * @return the single entity that was retrieved, or null if there was none * @throws EOUtilities.MoreThanOneException if there is more than one matching object */ public static UserMessageSubscription uniqueObjectMatchingValues( EOEditingContext context, NSDictionary<String, Object> keysAndValues) throws EOUtilities.MoreThanOneException { try { return (UserMessageSubscription) EOUtilities.objectMatchingValues(context, ENTITY_NAME, keysAndValues); } catch (EOObjectNotAvailableException e) { return null; } }