Permalink
Browse files

Fixed build errors caused by being built inside a library. Moved defi…

…nes to ActiveRecordHelpers for the same reason.
  • Loading branch information...
1 parent 27fd9b9 commit 4a2702902c7faa9f19a3c760806f7430ef1c7a0f @zwaldowski zwaldowski committed Jun 21, 2011
View
2 ARCoreDataAction.h
@@ -1,6 +1,6 @@
//
// ARCoreDataAction.h
-// Freshpod
+// MagicalRecord
//
// Created by Saul Mora on 2/24/11.
// Copyright 2011 Magical Panda Software. All rights reserved.
View
5 ARCoreDataAction.m
@@ -1,14 +1,17 @@
//
// ARCoreDataAction.m
-// Freshpod
+// MagicalRecord
//
// Created by Saul Mora on 2/24/11.
// Copyright 2011 Magical Panda Software. All rights reserved.
//
#import "ARCoreDataAction.h"
+#import "NSManagedObjectContext+ActiveRecord.h"
+#import <CoreData/CoreData.h>
static dispatch_queue_t coredata_background_save_queue;
+dispatch_queue_t background_save_queue(void);
dispatch_queue_t background_save_queue()
{
View
16 ActiveRecordHelpers.h
@@ -1,5 +1,6 @@
//
// ActiveRecordHelpers.h
+// MagicalRecord
//
// Created by Saul Mora on 3/11/10.
// Copyright 2010 Magical Panda Software, LLC All rights reserved.
@@ -8,6 +9,21 @@
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
+// enable to use caches for the fetchedResultsControllers (iOS only)
+// #define STORE_USE_CACHE
+
+#define kCreateNewCoordinatorOnBackgroundOperations 0
+
+#define ENABLE_ACTIVE_RECORD_LOGGING
+
+#ifdef DDLogWarn
+#define ARLog(...) DDLogWarn(__VA_ARGS__)
+#elif ENABLE_ACTIVE_RECORD_LOGGING
+#define ARLog(...) NSLog(@"%s(%x) %@", __PRETTY_FUNCTION__, (unsigned int)self, [NSString stringWithFormat:__VA_ARGS__])
+#else
+#define ARLog(...) ((void)0)
+#endif
+
#ifdef NS_BLOCKS_AVAILABLE
@class NSManagedObjectContext;
View
2 ActiveRecordHelpers.m
@@ -1,5 +1,6 @@
//
// ActiveRecordHelpers.m
+// MagicalRecord
//
// Created by Saul Mora on 3/11/10.
// Copyright 2010 Magical Panda Software, LLC All rights reserved.
@@ -10,6 +11,7 @@
#import "NSPersistentStoreCoordinator+ActiveRecord.h"
#import "NSManagedObjectModel+ActiveRecord.h"
#import "NSPersistentStore+ActiveRecord.h"
+#import "ARCoreDataAction.h"
#import <dispatch/dispatch.h>
@implementation ActiveRecordHelpers
View
14 CoreData+ActiveRecordFetching.h
@@ -1,18 +1,4 @@
-// enable to use caches for the fetchedResultsControllers (iOS only)
-// #define STORE_USE_CACHE
-
-#define kCreateNewCoordinatorOnBackgroundOperations 0
-
-#define ENABLE_ACTIVE_RECORD_LOGGING
-
-#ifdef DDLogWarn
- #define ARLog(...) DDLogWarn(__VA_ARGS__)
-#elif ENABLE_ACTIVE_RECORD_LOGGING
- #define ARLog(...) NSLog(@"%s(%x) %@", __PRETTY_FUNCTION__, (unsigned int)self, [NSString stringWithFormat:__VA_ARGS__])
-#else
- #define ARLog(...) ((void)0)
-#endif
#import "ActiveRecordHelpers.h"
#import "ARCoreDataAction.h"
View
1 NSFetchedResultsController+ActiveRecord.h
@@ -1,5 +1,6 @@
//
// NSFetchedResultsController+ActiveRecord.h
+// MagicalRecord
//
// Created by Peter Steinberger on 18.04.11.
// Copyright 2011 Peter Steinberger. All rights reserved.
View
1 NSFetchedResultsController+ActiveRecord.m
@@ -1,5 +1,6 @@
//
// NSFetchedResultsController+ActiveRecord.h
+// MagicalRecord
//
// Created by Peter Steinberger on 18.04.11.
// Copyright 2011 Peter Steinberger. All rights reserved.
View
12 NSManagedObject+ActiveRecord.h
@@ -1,4 +1,6 @@
- //
+//
+// NSManagedObject+ActiveRecord.h
+// MagicalRecord
//
// Created by Saul Mora on 11/15/09.
// Copyright 2010 Magical Panda Software, LLC All rights reserved.
@@ -92,10 +94,10 @@
+ (id) findFirstWithPredicate:(NSPredicate *)searchTerm sortedBy:(NSString *)sortBy ascending:(BOOL)ascending andRetrieveAttributes:(id)attributes, ...;
+ (id) findFirstWithPredicate:(NSPredicate *)searchTerm sortedBy:(NSString *)sortBy ascending:(BOOL)ascending inContext:(NSManagedObjectContext *)context andRetrieveAttributes:(id)attributes, ...;
-+ (id)findFirstByUID:(id)searchValue;
-+ (id)findFirstByUID:(id)searchValue inContext:(NSManagedObjectContext *)context;
-+ (id)findFirstByUIDHash:(id)searchValue;
-+ (id)findFirstByUIDHash:(id)searchValue inContext:(NSManagedObjectContext *)context;
++ (id)findFirstByUID:(NSNumber *)searchValue;
++ (id)findFirstByUID:(NSNumber *)searchValue inContext:(NSManagedObjectContext *)context;
++ (id)findFirstByUIDHash:(NSNumber *)searchValue;
++ (id)findFirstByUIDHash:(NSNumber *)searchValue inContext:(NSManagedObjectContext *)context;
+ (id)findFirstByAttribute:(NSString *)attribute withValue:(id)searchValue;
View
36 NSManagedObject+ActiveRecord.m
@@ -1,4 +1,7 @@
-
+//
+// NSManagedObject+ActiveRecord.m
+// MagicalRecord
+//
// Created by Saul Mora on 11/15/09.
// Copyright 2010 Magical Panda Software, LLC All rights reserved.
//
@@ -7,7 +10,6 @@
#import "NSManagedObject+ActiveRecord.h"
#import "NSManagedObjectContext+ActiveRecord.h"
-
static NSUInteger defaultBatchSize = kActiveRecordDefaultBatchSize;
@implementation NSManagedObject (ActiveRecord)
@@ -505,38 +507,20 @@ + (NSArray *)findAllWithPredicate:(NSPredicate *)searchTerm withBlock:(void (^)(
return [self executeFetchRequest:request inContext:[NSManagedObjectContext contextForCurrentThread]];
}
-+ (id)findFirstByUID:(id)searchValue {
++ (id)findFirstByUID:(NSNumber *)searchValue {
return [self findFirstByUID:searchValue inContext:[NSManagedObjectContext contextForCurrentThread]];
}
-+ (id)findFirstByUID:(id)searchValue inContext:(NSManagedObjectContext *)context {
- NSNumber *uidNum;
- if ([searchValue isKindOfClass:[NSNumber class]]) {
- uidNum = searchValue;
- } else if ([searchValue isKindOfClass:[NSString class]]) {
- uidNum = [NSNumber numberWithString:searchValue];
- } else {
- ARLog(@"Wrong type for searchValue!");
- return nil;
- }
- return [self findFirstByAttribute:@"uid" withValue:uidNum];
++ (id)findFirstByUID:(NSNumber *)searchValue inContext:(NSManagedObjectContext *)context {
+ return [self findFirstByAttribute:@"uid" withValue:searchValue];
}
-+ (id)findFirstByUIDHash:(id)searchValue {
++ (id)findFirstByUIDHash:(NSNumber *)searchValue {
return [self findFirstByUID:searchValue inContext:[NSManagedObjectContext contextForCurrentThread]];
}
-+ (id)findFirstByUIDHash:(id)searchValue inContext:(NSManagedObjectContext *)context {
- NSNumber *uidNum;
- if ([searchValue isKindOfClass:[NSNumber class]]) {
- uidNum = searchValue;
- } else if ([searchValue isKindOfClass:[NSString class]]) {
- uidNum = [NSNumber numberWithString:searchValue];
- } else {
- ARLog(@"Wrong type for searchValue!");
- return nil;
- }
- return [self findFirstByAttribute:@"uidHash" withValue:uidNum];
++ (id)findFirstByUIDHash:(NSNumber *)searchValue inContext:(NSManagedObjectContext *)context {
+ return [self findFirstByAttribute:@"uidHash" withValue:searchValue];
}
+ (id)findFirst
View
1 NSManagedObjectContext+ActiveRecord.h
@@ -1,5 +1,6 @@
//
// NSManagedObjectContext+ActiveRecord.h
+// MagicalRecord
//
// Created by Saul Mora on 11/23/09.
// Copyright 2010 Magical Panda Software, LLC All rights reserved.
View
1 NSManagedObjectContext+ActiveRecord.m
@@ -1,5 +1,6 @@
//
// NSManagedObjectContext+ActiveRecord.m
+// MagicalRecord
//
// Created by Saul Mora on 11/23/09.
// Copyright 2010 Magical Panda Software, LLC All rights reserved.
View
1 NSManagedObjectModel+ActiveRecord.h
@@ -1,5 +1,6 @@
//
// NSManagedObjectModel+ActiveRecord.h
+// MagicalRecord
//
// Created by Saul Mora on 3/11/10.
// Copyright 2010 Magical Panda Software, LLC All rights reserved.
View
2 NSManagedObjectModel+ActiveRecord.m
@@ -1,6 +1,6 @@
//
// NSManagedObjectModel+ActiveRecord.m
-// DocBook
+// MagicalRecord
//
// Created by Saul Mora on 3/11/10.
// Copyright 2010 Magical Panda Software, LLC All rights reserved.
View
1 NSPersistentStore+ActiveRecord.h
@@ -1,5 +1,6 @@
//
// NSPersistentStore+ActiveRecord.h
+// MagicalRecord
//
// Created by Saul Mora on 3/11/10.
// Copyright 2010 Magical Panda Software, LLC All rights reserved.
View
1 NSPersistentStore+ActiveRecord.m
@@ -1,5 +1,6 @@
//
// NSPersistentStore+ActiveRecord.m
+// MagicalRecord
//
// Created by Saul Mora on 3/11/10.
// Copyright 2010 Magical Panda Software, LLC All rights reserved.
View
1 NSPersistentStoreCoordinator+ActiveRecord.h
@@ -1,5 +1,6 @@
//
// NSPersistentStoreCoordinator+ActiveRecord.h
+// MagicalRecord
//
// Created by Saul Mora on 3/11/10.
// Copyright 2010 Magical Panda Software, LLC All rights reserved.
View
1 NSPersistentStoreCoordinator+ActiveRecord.m
@@ -1,5 +1,6 @@
//
// NSPersistentStoreCoordinator+ActiveRecord.m
+// MagicalRecord
//
// Created by Saul Mora on 3/11/10.
// Copyright 2010 Magical Panda Software, LLC All rights reserved.

0 comments on commit 4a27029

Please sign in to comment.