]> err.no Git - sope/blob - sope-gdl1/GDLAccess/EOGenericRecord.h
removed subminor
[sope] / sope-gdl1 / GDLAccess / EOGenericRecord.h
1 // $Id: EOGenericRecord.h 1 2004-08-20 10:38:46Z znek $
2
3 #ifndef __eoaccess_EOGenericRecord_H__
4 #define __eoaccess_EOGenericRecord_H__
5
6 #import <EOControl/EOGenericRecord.h>
7
8 @class NSDictionary;
9 @class EOEntity;
10
11 @interface EOGenericRecord(EOAccess)
12
13 // Initializing new instances
14
15 - (id)initWithPrimaryKey:(NSDictionary *)aKey entity:(EOEntity *)anEntity;
16
17 // Getting the associated entity
18
19 - (EOEntity *)entity;
20
21 @end
22
23 /*
24  * Informal protocol. NOT implemented by NSObject.
25  * Before sending one of this messages the caller must
26  * check if the object responds to them.
27  */
28
29 @interface NSObject(EOGenericRecord)
30
31 /*
32  * Initialize an new instance of an object. 
33  * If an enterprise object does not respond
34  * to this method it will receive -init.
35  */
36 - (id)initWithPrimaryKey:(NSDictionary *)key entity:(EOEntity *)entity;
37
38 /*
39  * Determines the entity of user defined objects, 
40  * when more than one entity uses the same class for its objects.
41  */
42 - (EOEntity *)entity;
43
44 /*
45  * Determine the class for object based on its fetched row. 
46  * The returned class *must* be a subclass of the class that 
47  * receives this method.
48  */
49 + (Class)classForEntity:(EOEntity *)entity values:(NSDictionary *)values;
50
51 @end
52
53 #endif /* __eoaccess_EOGenericRecord_H__ */
54