Move non-CoreData backed fields out of CoreData objects

This commit is contained in:
Cameron Gutman
2015-12-01 20:36:08 -08:00
parent 5ea92a7b48
commit bfa4856bbe
8 changed files with 20 additions and 32 deletions

View File

@@ -11,16 +11,8 @@
@class Host;
NS_ASSUME_NONNULL_BEGIN
@interface App : NSManagedObject
@property BOOL isRunning;
- (NSComparisonResult)compareName:(App *)other;
@end
NS_ASSUME_NONNULL_END
#import "App+CoreDataProperties.h"

View File

@@ -10,10 +10,4 @@
@implementation App
@synthesize isRunning;
- (NSComparisonResult)compareName:(App *)other {
return [self.name caseInsensitiveCompare:other.name];
}
@end

View File

@@ -10,18 +10,8 @@
#import <CoreData/CoreData.h>
#import "Utils.h"
NS_ASSUME_NONNULL_BEGIN
@interface Host : NSManagedObject
@property (nonatomic) BOOL online;
@property (nonatomic) PairState pairState;
@property (nonatomic) NSString * activeAddress;
- (NSComparisonResult)compareName:(Host *)other;
@end
NS_ASSUME_NONNULL_END
#import "Host+CoreDataProperties.h"

View File

@@ -10,12 +10,4 @@
@implementation Host
@dynamic pairState;
@synthesize online;
@synthesize activeAddress;
- (NSComparisonResult)compareName:(Host *)other {
return [self.name caseInsensitiveCompare:other.name];
}
@end

View File

@@ -17,4 +17,10 @@
@property (nonatomic) BOOL isRunning;
@property (nullable, nonatomic, retain) TemporaryHost *host;
NS_ASSUME_NONNULL_BEGIN
- (NSComparisonResult)compareName:(TemporaryApp *)other;
NS_ASSUME_NONNULL_END
@end

View File

@@ -10,4 +10,8 @@
@implementation TemporaryApp
- (NSComparisonResult)compareName:(TemporaryApp *)other {
return [self.name caseInsensitiveCompare:other.name];
}
@end

View File

@@ -23,4 +23,10 @@
@property (nullable, nonatomic, retain) NSString *uuid;
@property (nullable, nonatomic, retain) NSSet *appList;
NS_ASSUME_NONNULL_BEGIN
- (NSComparisonResult)compareName:(TemporaryHost *)other;
NS_ASSUME_NONNULL_END
@end

View File

@@ -10,4 +10,8 @@
@implementation TemporaryHost
- (NSComparisonResult)compareName:(TemporaryHost *)other {
return [self.name caseInsensitiveCompare:other.name];
}
@end