|
41 | 41 | @dynamic <$Relationship.name$>;
|
42 | 42 |
|
43 | 43 | <$if Relationship.isToMany$>
|
44 |
| - |
45 |
| -- (void)add<$Relationship.name.initialCapitalString$>:(NSSet*)value_ { |
46 |
| - [self willChangeValueForKey:@"<$Relationship.name$>" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value_]; |
47 |
| - [[self primitiveValueForKey:@"<$Relationship.name$>"] unionSet:value_]; |
48 |
| - [self didChangeValueForKey:@"<$Relationship.name$>" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value_]; |
49 |
| -} |
50 |
| - |
51 |
| --(void)remove<$Relationship.name.initialCapitalString$>:(NSSet*)value_ { |
52 |
| - [self willChangeValueForKey:@"<$Relationship.name$>" withSetMutation:NSKeyValueMinusSetMutation usingObjects:value_]; |
53 |
| - [[self primitiveValueForKey:@"<$Relationship.name$>"] minusSet:value_]; |
54 |
| - [self didChangeValueForKey:@"<$Relationship.name$>" withSetMutation:NSKeyValueMinusSetMutation usingObjects:value_]; |
55 |
| -} |
56 |
| - |
57 |
| -- (void)add<$Relationship.name.initialCapitalString$>Object:(<$Relationship.destinationEntity.managedObjectClassName$>*)value_ { |
58 |
| - NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value_ count:1]; |
59 |
| - [self willChangeValueForKey:@"<$Relationship.name$>" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects]; |
60 |
| - [[self primitiveValueForKey:@"<$Relationship.name$>"] addObject:value_]; |
61 |
| - [self didChangeValueForKey:@"<$Relationship.name$>" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects]; |
62 |
| - [changedObjects release]; |
63 |
| -} |
64 |
| - |
65 |
| -- (void)remove<$Relationship.name.initialCapitalString$>Object:(<$Relationship.destinationEntity.managedObjectClassName$>*)value_ { |
66 |
| - NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value_ count:1]; |
67 |
| - [self willChangeValueForKey:@"<$Relationship.name$>" withSetMutation:NSKeyValueMinusSetMutation usingObjects:changedObjects]; |
68 |
| - [[self primitiveValueForKey:@"<$Relationship.name$>"] removeObject:value_]; |
69 |
| - [self didChangeValueForKey:@"<$Relationship.name$>" withSetMutation:NSKeyValueMinusSetMutation usingObjects:changedObjects]; |
70 |
| - [changedObjects release]; |
71 |
| -} |
72 |
| - |
73 | 44 | - (NSMutableSet*)<$Relationship.name$>Set {
|
74 | 45 | [self willAccessValueForKey:@"<$Relationship.name$>"];
|
75 | 46 | NSMutableSet *result = [self mutableSetValueForKey:@"<$Relationship.name$>"];
|
76 | 47 | [self didAccessValueForKey:@"<$Relationship.name$>"];
|
77 | 48 | return result;
|
78 | 49 | }
|
79 |
| - |
80 | 50 | <$endif$>
|
81 | 51 | <$endforeach do$>
|
82 | 52 |
|
|
0 commit comments