1. José Manuel Sánchez Peñarroja
  2. BMF

Source

BMF / bmf / shared / data / parsers / BMFObjectParserProtocol.h

//
//  BMFObjectParserProtocol.h
//  Pods
//
//  Created by Jose Manuel Sánchez Peñarroja on 23/05/14.
//
//

#import <Foundation/Foundation.h>

@protocol BMFObjectParserDelegateProtocol <NSObject>

@optional

- (void) didCreateObject:(id) object;
- (void) didParseObject:(id)object withDictionary:(NSDictionary *) dictionary;
- (void) willDeleteObject:(id) object;

@end

@protocol BMFObjectParserProtocol <NSObject>

@property (nonatomic, weak) id<BMFObjectParserDelegateProtocol> delegate;

- (id) newObject;

- (NSArray *) fetchAllLocalObjectsSortedById;

- (NSComparisonResult) compareDictionary:(NSDictionary *) obj1 withDictionary:(NSDictionary *)obj2;
- (NSComparisonResult) compareObject:(id) obj1 withObject:(id)obj2;
- (NSComparisonResult) compareObject:(id) obj1 withDictionary:(id)obj2;

- (BOOL)updateObject:(id) object withDictionary:(NSDictionary *)dictionary error:(NSError **) error;

- (BOOL) deleteObject:(id) object;
- (BOOL) deleteAllLocalObjects;

- (BOOL) saveChanges;

@end