]> err.no Git - sope/blob - sope-core/EOControl/EOFetchSpecification.h
renamed packages as discussed in the developer list
[sope] / sope-core / EOControl / EOFetchSpecification.h
1 /*
2   Copyright (C) 2000-2003 SKYRIX Software AG
3
4   This file is part of OGo
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 // $Id$
22
23 #ifndef __EOFetchSpecification_h__
24 #define __EOFetchSpecification_h__
25
26 #import <Foundation/NSObject.h>
27
28 @class NSArray, NSString, NSDictionary;
29 @class EOQualifier;
30
31 @interface EOFetchSpecification : NSObject < NSCopying >
32 {
33   NSString     *entityName;
34   EOQualifier  *qualifier;
35   NSArray      *sortOrderings;
36   unsigned     fetchLimit;
37   NSDictionary *hints;
38   struct {
39     int usesDistinct:1;
40     int locksObjects:1;
41     int deep:1;
42     int reserved:29;
43   } fsFlags;
44 }
45
46 + (EOFetchSpecification *)fetchSpecificationWithEntityName:(NSString *)_ename
47   qualifier:(EOQualifier *)_qualifier
48   sortOrderings:(NSArray *)sortOrderings;
49
50 - (id)initWithEntityName:(NSString *)_name
51   qualifier:(EOQualifier *)_qualifier
52   sortOrderings:(NSArray *)_sortOrderings
53   usesDistinct:(BOOL)_dflag isDeep:(BOOL)_isDeep
54   hints:(NSDictionary *)_hints;
55
56 /* accessors */
57
58 - (void)setEntityName:(NSString *)_name;
59 - (NSString *)entityName;
60
61 - (void)setQualifier:(EOQualifier *)_qualifier;
62 - (EOQualifier *)qualifier;
63
64 - (void)setSortOrderings:(NSArray *)_orderings;
65 - (NSArray *)sortOrderings;
66
67 - (void)setUsesDistinct:(BOOL)_flag;
68 - (BOOL)usesDistinct;
69
70 - (void)setIsDeep:(BOOL)_flag;
71 - (BOOL)isDeep;
72
73 - (void)setLocksObjects:(BOOL)_flag;
74 - (BOOL)locksObjects;
75
76 - (void)setFetchLimit:(unsigned)_limit;
77 - (unsigned)fetchLimit;
78
79 - (void)setHints:(NSDictionary *)_hints;
80 - (NSDictionary *)hints;
81
82 /* bindings */
83
84 - (EOFetchSpecification *)fetchSpecificationWithQualifierBindings:(NSDictionary *)_bindings;
85
86 /* remapping keys */
87
88 - (EOFetchSpecification *)fetchSpecificationByApplyingKeyMap:(NSDictionary *)_m;
89
90 @end
91
92 #endif /* __EOFetchSpecification_h__ */