I have four main methods:
+ (NSArray *)findAll;
+ (NSArray *)findAllWithOrder:(NSArray *)order;
+ (NSArray *)findAllWithConditions:(NSDictionary *)conditions;
+ (NSArray *)findAllWithLimit:(NSRange)limit;
In addition, I want to combine these methods (so I can find all
by both order and conditions, for example). Currently I'm doing (all possibilities even with arguments in a different order not shown here):
+ (NSArray *)findAll;
+ (NSArray *)findAllWithOrder:(NSArray *)order;
+ (NSArray *)findAllWithConditions:(NSDictionary *)conditions;
+ (NSArray *)findAllWithLimit:(NSRange)limit;
+ (NSArray *)findAllWithOrder:(NSArray *)order conditions:(NSDictionary *)conditions;
+ (NSArray *)findAllWithOrder:(NSArray *)order limit:(NSRange)limit;
+ (NSArray *)findAllWithConditions:(NSDictionary *)conditions limit:(NSRange)limit;
+ (NSArray *)findAllWithOrder:(NSArray *)order conditions:(NSDictionary *)conditions limit:(NSRange)limit;
But is there a simpler way than creating dozens of methods for this? That would be very nice. Thanks.