Basic database access is working

This commit is contained in:
Cameron Gutman
2015-12-02 00:25:38 -08:00
parent fe616d86c5
commit 3076e29335
13 changed files with 274 additions and 118 deletions
+21
View File
@@ -7,9 +7,30 @@
//
#import "TemporaryApp.h"
#import "App.h"
@implementation TemporaryApp
- (id) initFromApp:(App*)app withTempHost:(TemporaryHost*)tempHost {
self = [self init];
self.parent = app;
self.id = app.id;
self.image = app.image;
self.name = app.name;
self.host = tempHost;
return self;
}
- (void) propagateChangesToParent {
self.parent.id = self.id;
self.parent.image = self.image;
self.parent.name = self.name;
self.parent.host = self.host.parent;
}
- (NSComparisonResult)compareName:(TemporaryApp *)other {
return [self.name caseInsensitiveCompare:other.name];
}