Changeset 611
- Timestamp:
- 07/03/08 22:15:16 (6 months ago)
- Files:
-
- branches/CoreData/SapphireFrappliance/MetaData/MOClasses/_SapphireCollectionDirectory.h (modified) (1 diff)
- branches/CoreData/SapphireFrappliance/MetaData/MOClasses/_SapphireCollectionDirectory.m (modified) (1 diff)
- branches/CoreData/SapphireFrappliance/MetaData/MOClasses/_SapphireSubEpisode.h (modified) (1 diff)
- branches/CoreData/SapphireFrappliance/MetaData/MOClasses/_SapphireSubEpisode.m (modified) (2 diffs)
- branches/CoreData/SapphireFrappliance/MetaData/Sapphire.xcdatamodel/elements (modified) (previous)
- branches/CoreData/SapphireFrappliance/MetaData/Sapphire.xcdatamodel/layout (modified) (previous)
- branches/CoreData/SapphireFrappliance/MetaData/SapphireMObjects/SapphireCollectionDirectory.h (modified) (1 diff)
- branches/CoreData/SapphireFrappliance/MetaData/SapphireMObjects/SapphireCollectionDirectory.m (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/CoreData/SapphireFrappliance/MetaData/MOClasses/_SapphireCollectionDirectory.h
r540 r611 32 32 33 33 34 - (NSNumber*)manualCollection; 35 - (void)setManualCollection:(NSNumber*)value_; 36 37 - (BOOL)manualCollectionValue; 38 - (void)setManualCollectionValue:(BOOL)value_; 39 40 //- (BOOL)validateManualCollection:(id*)value_ error:(NSError**)error_; 41 42 43 34 44 - (NSNumber*)isMount; 35 45 - (void)setIsMount:(NSNumber*)value_; branches/CoreData/SapphireFrappliance/MetaData/MOClasses/_SapphireCollectionDirectory.m
r540 r611 66 66 67 67 68 - (NSNumber*)manualCollection { 69 [self willAccessValueForKey:@"manualCollection"]; 70 NSNumber *result = [self primitiveValueForKey:@"manualCollection"]; 71 [self didAccessValueForKey:@"manualCollection"]; 72 return result; 73 } 74 75 - (void)setManualCollection:(NSNumber*)value_ { 76 [self willChangeValueForKey:@"manualCollection"]; 77 [self setPrimitiveValue:value_ forKey:@"manualCollection"]; 78 [self didChangeValueForKey:@"manualCollection"]; 79 } 80 81 82 83 - (BOOL)manualCollectionValue { 84 NSNumber *result = [self manualCollection]; 85 return result ? [result boolValue] : 0; 86 } 87 88 - (void)setManualCollectionValue:(BOOL)value_ { 89 [self setManualCollection:[NSNumber numberWithBool:value_]]; 90 } 91 92 93 94 95 96 68 97 - (NSNumber*)isMount { 69 98 [self willAccessValueForKey:@"isMount"]; branches/CoreData/SapphireFrappliance/MetaData/MOClasses/_SapphireSubEpisode.h
r576 r611 39 39 40 40 41 - (NSString*)episodeDescription; 42 - (void)setEpisodeDescription:(NSString*)value_; 43 44 //- (BOOL)validateEpisodeDescription:(id*)value_ error:(NSError**)error_; 45 46 47 41 48 - (NSString*)episodeTitle; 42 49 - (void)setEpisodeTitle:(NSString*)value_; 43 50 44 51 //- (BOOL)validateEpisodeTitle:(id*)value_ error:(NSError**)error_; 45 46 47 48 - (NSString*)episodeDescription;49 - (void)setEpisodeDescription:(NSString*)value_;50 51 //- (BOOL)validateEpisodeDescription:(id*)value_ error:(NSError**)error_;52 52 53 53 branches/CoreData/SapphireFrappliance/MetaData/MOClasses/_SapphireSubEpisode.m
r576 r611 84 84 85 85 86 - (NSString*)episodeDescription { 87 [self willAccessValueForKey:@"episodeDescription"]; 88 NSString *result = [self primitiveValueForKey:@"episodeDescription"]; 89 [self didAccessValueForKey:@"episodeDescription"]; 90 return result; 91 } 92 93 - (void)setEpisodeDescription:(NSString*)value_ { 94 [self willChangeValueForKey:@"episodeDescription"]; 95 [self setPrimitiveValue:value_ forKey:@"episodeDescription"]; 96 [self didChangeValueForKey:@"episodeDescription"]; 97 } 98 99 100 101 102 103 86 104 - (NSString*)episodeTitle { 87 105 [self willAccessValueForKey:@"episodeTitle"]; … … 95 113 [self setPrimitiveValue:value_ forKey:@"episodeTitle"]; 96 114 [self didChangeValueForKey:@"episodeTitle"]; 97 }98 99 100 101 102 103 104 - (NSString*)episodeDescription {105 [self willAccessValueForKey:@"episodeDescription"];106 NSString *result = [self primitiveValueForKey:@"episodeDescription"];107 [self didAccessValueForKey:@"episodeDescription"];108 return result;109 }110 111 - (void)setEpisodeDescription:(NSString*)value_ {112 [self willChangeValueForKey:@"episodeDescription"];113 [self setPrimitiveValue:value_ forKey:@"episodeDescription"];114 [self didChangeValueForKey:@"episodeDescription"];115 115 } 116 116 branches/CoreData/SapphireFrappliance/MetaData/SapphireMObjects/SapphireCollectionDirectory.h
r606 r611 2 2 3 3 @interface SapphireCollectionDirectory : _SapphireCollectionDirectory {} 4 + (SapphireCollectionDirectory *)collectionAtPath:(NSString *)path mount:(BOOL)isMount skip:(BOOL)skip hidden:(BOOL)hidden inContext:(NSManagedObjectContext *)moc;4 + (SapphireCollectionDirectory *)collectionAtPath:(NSString *)path mount:(BOOL)isMount skip:(BOOL)skip hidden:(BOOL)hidden manual:(BOOL)manual inContext:(NSManagedObjectContext *)moc; 5 5 + (SapphireCollectionDirectory *)collectionAtPath:(NSString *)path inContext:(NSManagedObjectContext *)moc; 6 6 + (NSArray *)availableCollectionDirectoriesInContext:(NSManagedObjectContext *)moc; branches/CoreData/SapphireFrappliance/MetaData/SapphireMObjects/SapphireCollectionDirectory.m
r606 r611 11 11 @implementation SapphireCollectionDirectory 12 12 13 + (SapphireCollectionDirectory *)collectionAtPath:(NSString *)path mount:(BOOL)isMount skip:(BOOL)skip hidden:(BOOL)hidden inContext:(NSManagedObjectContext *)moc13 + (SapphireCollectionDirectory *)collectionAtPath:(NSString *)path mount:(BOOL)isMount skip:(BOOL)skip hidden:(BOOL)hidden manual:(BOOL)manual inContext:(NSManagedObjectContext *)moc 14 14 { 15 15 SapphireDirectoryMetaData *dir = [SapphireDirectoryMetaData createDirectoryWithPath:path inContext:moc]; … … 24 24 ret = [NSEntityDescription insertNewObjectForEntityForName:MY_NAME inManagedObjectContext:moc]; 25 25 26 ret.manualCollectionValue = manual; 26 27 ret.isMountValue = isMount; 27 28 ret.skipValue = skip; … … 34 35 + (SapphireCollectionDirectory *)collectionAtPath:(NSString *)path inContext:(NSManagedObjectContext *)moc 35 36 { 36 return [SapphireCollectionDirectory collectionAtPath:path mount:YES skip:NO hidden:NO inContext:moc];37 return [SapphireCollectionDirectory collectionAtPath:path mount:YES skip:NO hidden:NO manual:NO inContext:moc]; 37 38 } 38 39 … … 62 63 NSString *mountPoint; 63 64 while((mountPoint = [mountEnum nextObject]) != nil) 64 [SapphireCollectionDirectory collectionAtPath:mountPoint mount:YES skip:NO hidden:NO inContext:moc];65 [SapphireCollectionDirectory collectionAtPath:mountPoint mount:YES skip:NO hidden:NO manual:NO inContext:moc]; 65 66 66 NSPredicate *predicate = [NSPredicate predicateWithFormat:@"( isMount == NO) OR (directory.path IN %@)", colSet];67 NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(hidden == NO) AND ((manualCollection == YES) OR (directory.path IN %@))", colSet]; 67 68 NSSortDescriptor *sort = [[NSSortDescriptor alloc] initWithKey:@"directory.path" ascending:YES]; 68 69 NSArray *ret = doSortedFetchRequest(MY_NAME, moc, predicate, sort);
