forked from alexanderedge/RestKitTutorial1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_Aeroplane.m
106 lines (58 loc) · 1.91 KB
/
_Aeroplane.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to Aeroplane.m instead.
#import "_Aeroplane.h"
const struct AeroplaneAttributes AeroplaneAttributes = {
.manufacturer = @"manufacturer",
.model = @"model",
.passengers = @"passengers",
};
const struct AeroplaneRelationships AeroplaneRelationships = {
.category = @"category",
};
const struct AeroplaneFetchedProperties AeroplaneFetchedProperties = {
};
@implementation AeroplaneID
@end
@implementation _Aeroplane
+ (id)insertInManagedObjectContext:(NSManagedObjectContext*)moc_ {
NSParameterAssert(moc_);
return [NSEntityDescription insertNewObjectForEntityForName:@"Aeroplane" inManagedObjectContext:moc_];
}
+ (NSString*)entityName {
return @"Aeroplane";
}
+ (NSEntityDescription*)entityInManagedObjectContext:(NSManagedObjectContext*)moc_ {
NSParameterAssert(moc_);
return [NSEntityDescription entityForName:@"Aeroplane" inManagedObjectContext:moc_];
}
- (AeroplaneID*)objectID {
return (AeroplaneID*)[super objectID];
}
+ (NSSet*)keyPathsForValuesAffectingValueForKey:(NSString*)key {
NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];
if ([key isEqualToString:@"passengersValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"passengers"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
return keyPaths;
}
@dynamic manufacturer;
@dynamic model;
@dynamic passengers;
- (int16_t)passengersValue {
NSNumber *result = [self passengers];
return [result shortValue];
}
- (void)setPassengersValue:(int16_t)value_ {
[self setPassengers:[NSNumber numberWithShort:value_]];
}
- (int16_t)primitivePassengersValue {
NSNumber *result = [self primitivePassengers];
return [result shortValue];
}
- (void)setPrimitivePassengersValue:(int16_t)value_ {
[self setPrimitivePassengers:[NSNumber numberWithShort:value_]];
}
@dynamic category;
@end