Core Data helper classes from Learning Core Data for iOS, by Tim Roadley.