Core data boilerplate code