]> err.no Git - sope/blob - sope-core/EOControl/EOFetchSpecification.h
fixed resource lookup in SoProductResourceManager, added debug logs
[sope] / sope-core / EOControl / EOFetchSpecification.h
1 /*
2   Copyright (C) 2000-2004 SKYRIX Software AG
3
4   This file is part of OpenGroupware.org.
5
6   OGo 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
9   later version.
10
11   OGo 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.
15
16   You should have received a copy of the GNU Lesser General Public
17   License along with OGo; see the file COPYING.  If not, write to the
18   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
19   02111-1307, USA.
20 */
21
22 #ifndef __EOFetchSpecification_h__
23 #define __EOFetchSpecification_h__
24
25 #import <Foundation/NSObject.h>
26
27 @class NSArray, NSString, NSDictionary;
28 @class EOQualifier;
29
30 @interface EOFetchSpecification : NSObject < NSCopying >
31 {
32   NSString     *entityName;
33   EOQualifier  *qualifier;
34   NSArray      *sortOrderings;
35   unsigned     fetchLimit;
36   NSDictionary *hints;
37   struct {
38     int usesDistinct:1;
39     int locksObjects:1;
40     int deep:1;
41     int reserved:29;
42   } fsFlags;
43 }
44
45 + (EOFetchSpecification *)fetchSpecificationWithEntityName:(NSString *)_ename
46   qualifier:(EOQualifier *)_qualifier
47   sortOrderings:(NSArray *)sortOrderings;
48
49 - (id)initWithEntityName:(NSString *)_name
50   qualifier:(EOQualifier *)_qualifier
51   sortOrderings:(NSArray *)_sortOrderings
52   usesDistinct:(BOOL)_dflag isDeep:(BOOL)_isDeep
53   hints:(NSDictionary *)_hints;
54
55 /* accessors */
56
57 - (void)setEntityName:(NSString *)_name;
58 - (NSString *)entityName;
59
60 - (void)setQualifier:(EOQualifier *)_qualifier;
61 - (EOQualifier *)qualifier;
62
63 - (void)setSortOrderings:(NSArray *)_orderings;
64 - (NSArray *)sortOrderings;
65
66 - (void)setUsesDistinct:(BOOL)_flag;
67 - (BOOL)usesDistinct;
68
69 - (void)setIsDeep:(BOOL)_flag;
70 - (BOOL)isDeep;
71
72 - (void)setLocksObjects:(BOOL)_flag;
73 - (BOOL)locksObjects;
74
75 - (void)setFetchLimit:(unsigned)_limit;
76 - (unsigned)fetchLimit;
77
78 - (void)setHints:(NSDictionary *)_hints;
79 - (NSDictionary *)hints;
80
81 /* bindings */
82
83 - (EOFetchSpecification *)fetchSpecificationWithQualifierBindings:(NSDictionary *)_bindings;
84
85 /* remapping keys */
86
87 - (EOFetchSpecification *)fetchSpecificationByApplyingKeyMap:(NSDictionary *)_m;
88
89 @end
90
91 #endif /* __EOFetchSpecification_h__ */