#import <%= '' %> #import <%= '' %> <% if entity.parent_entity != 'NSManagedObject' -%> #import "<%= entity.parent_entity %>.h" <% end -%> <% for class_name in entity.relationships.map { |rel| rel.destination_entity }.uniq -%> @class <%= class_name %>; <% end -%> @interface _<%= entity.name %> : <%= entity.parent_entity %> <% for attribute in entity.attributes -%> @property (<%= type_generator.property_attributes(attribute).join(', ') %>) <%= type_generator.attribute_type(attribute)%><%= attribute.name %>; <% end -%> <% for relationship in entity.relationships -%> @property (nonatomic, strong) <%= type_generator.relationship_type(relationship) %><%= relationship.name %>; <% end -%> @end <% if !entity.relationships.select { |e| e.to_many }.empty? %> @interface _<%= entity.name %> (CoreDataGeneratedAccessors) <% for relationship in entity.relationships.select { |e| e.to_many } %> <% if relationship.ordered -%> - (void)insertObject:(<%= relationship.destination_entity %> *)value in<%= capitalized_name(relationship) %>AtIndex:(NSUInteger)index; - (void)removeObjectFrom<%= capitalized_name(relationship) %>AtIndex:(NSUInteger)index; - (void)insert<%= capitalized_name(relationship) %>:(NSArray *)values atIndexes:(NSIndexSet *)indexes; - (void)remove<%= capitalized_name(relationship) %>AtIndexes:(NSIndexSet *)indexes; - (void)replaceObjectIn<%= capitalized_name(relationship) %>AtIndex:(NSUInteger)index withObject:(<%= relationship.destination_entity %> *)value; - (void)replace<%= capitalized_name(relationship) %>AtIndexes:(NSIndexSet *)indexes with<%= capitalized_name(relationship) %>:(NSArray *)values; - (void)add<%= capitalized_name(relationship) %>Object:(<%= relationship.destination_entity %> *)value; - (void)remove<%= capitalized_name(relationship) %>Object:(<%= relationship.destination_entity %> *)value; - (void)add<%= capitalized_name(relationship) %>:(NSOrderedSet *)values; - (void)remove<%= capitalized_name(relationship) %>:(NSOrderedSet *)values; <% else -%> - (void)add<%= capitalized_name(relationship) %>Object:(<%= relationship.destination_entity %> *)value; - (void)remove<%= capitalized_name(relationship) %>Object:(<%= relationship.destination_entity %> *)value; - (void)add<%= capitalized_name(relationship) %>:(NSSet *)values; - (void)remove<%= capitalized_name(relationship) %>:(NSSet *)values; <% end -%> <% end %> @end <% end -%>