2 Copyright (C) 2005 SKYRIX Software AG
4 This file is part of SOPE.
6 SOPE is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with SOPE; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 #ifndef __EOQualifier_CoreData_H__
23 #define __EOQualifier_CoreData_H__
25 #import <Foundation/NSPredicate.h>
26 #import <Foundation/NSComparisonPredicate.h>
27 #include <EOControl/EOQualifier.h>
32 Convert an libEOControl EOQualifier to a CoreData compliant NSPredicate
37 @class NSPredicate, NSExpression, NSComparisonPredicate, NSCompoundPredicate;
39 @interface EOQualifier(CoreData)
41 + (EOQualifier *)qualifierForPredicate:(NSPredicate *)_predicate;
42 - (NSPredicate *)asPredicate;
43 - (NSExpression *)asExpression;
47 + (SEL)eoSelectorForForComparisonPredicate:(NSComparisonPredicate *)_p;
48 + (NSPredicateOperatorType)predicateOperatorTypeForEOSelector:(SEL)_sel;
50 - (NSPredicate *)predicateWithLeftExpression:(NSExpression *)_lhs
51 rightExpression:(NSExpression *)_rhs
52 eoSelector:(SEL)_selector;
54 /* CoreData compatibility */
56 + (NSPredicate *)andPredicateWithSubpredicates:(NSArray *)_sub;
57 + (NSPredicate *)orPredicateWithSubpredicates:(NSArray *)_sub;
58 + (NSPredicate *)notPredicateWithSubpredicate:(id)_predicate;
62 #import <Foundation/Foundation.h>
65 /* compound qualifiers */
67 @interface EOAndQualifier(CoreData)
68 - (NSCompoundPredicateType)compoundPredicateType;
71 @interface EOOrQualifier(CoreData)
72 - (NSCompoundPredicateType)compoundPredicateType;
75 @interface EONotQualifier(CoreData)
76 - (NSCompoundPredicateType)compoundPredicateType;
80 /* comparison qualifiers */
82 @interface EOKeyValueQualifier(CoreData)
83 + (EOQualifier *)qualifierForComparisonPredicate:(NSComparisonPredicate *)_p;
84 - (NSComparisonPredicateModifier)comparisonPredicateModifier;
85 - (NSPredicateOperatorType)predicateOperatorType;
86 - (SEL)customSelector;
90 @interface EOKeyComparisonQualifier(CoreData)
91 + (EOQualifier *)qualifierForComparisonPredicate:(NSComparisonPredicate *)_p;
92 - (NSComparisonPredicateModifier)comparisonPredicateModifier;
93 - (NSPredicateOperatorType)predicateOperatorType;
94 - (SEL)customSelector;
98 #endif /* __EOQualifier_CoreData_H__ */