]> err.no Git - sope/blob - sope-gdl1/GDLAccess/EODatabaseFault.h
renamed PostgreSQL72 to PostgreSQL, install in Library/GDLAdaptors-1.1
[sope] / sope-gdl1 / GDLAccess / EODatabaseFault.h
1 /* 
2    EODatabaseFault.h
3
4    Copyright (C) 1996 Free Software Foundation, Inc.
5
6    Author: Mircea Oancea <mircea@jupiter.elcom.pub.ro>
7    Date: 1996
8
9    This file is part of the GNUstep Database Library.
10
11    This library is free software; you can redistribute it and/or
12    modify it under the terms of the GNU Library General Public
13    License as published by the Free Software Foundation; either
14    version 2 of the License, or (at your option) any later version.
15
16    This library is distributed in the hope that it will be useful,
17    but WITHOUT ANY WARRANTY; without even the implied warranty of
18    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19    Library General Public License for more details.
20
21    You should have received a copy of the GNU Library General Public
22    License along with this library; see the file COPYING.LIB.
23    If not, write to the Free Software Foundation,
24    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 */
26
27 #ifndef __eoaccess_EODatabaseFault_h__
28 #define __eoaccess_EODatabaseFault_h__
29
30 #import <GDLAccess/EOFault.h>
31
32 @class EOSQLQualifier, EOEntity, EODatabaseChannel;
33 @class NSArray, NSDictionary, NSString;
34
35 /*
36  * EODatabaseFault class
37  */
38
39 @interface EODatabaseFault : EOFault
40
41 // Creating a fault
42
43 + (id)objectFaultWithPrimaryKey:(NSDictionary*)key
44   entity:(EOEntity*)entity 
45   databaseChannel:(EODatabaseChannel*)channel
46   zone:(NSZone*)zone;
47
48 + (NSArray *)arrayFaultWithQualifier:(EOSQLQualifier*)qualifier 
49   fetchOrder:(NSArray*)fetchOrder 
50   databaseChannel:(EODatabaseChannel*)channel
51   zone:(NSZone*)zone;
52 + (NSArray *)gcArrayFaultWithQualifier:(EOSQLQualifier*)qualifier 
53   fetchOrder:(NSArray*)fetchOrder 
54   databaseChannel:(EODatabaseChannel*)channel
55   zone:(NSZone*)zone;
56
57 + (NSDictionary*)primaryKeyForFault:fault;
58 + (EOEntity*)entityForFault:fault;
59 + (EOSQLQualifier*)qualifierForFault:fault;
60 + (NSArray*)fetchOrderForFault:fault;
61 + (EODatabaseChannel*)databaseChannelForFault:fault;
62
63 @end /* EODatabaseFault */
64
65 /*
66  * Informal protocol that informs an instance that a to-one
67  * relationship could not be resoved to get data for self.
68  * Its implementation in NSObject raises NSObjectNotAvailableException. 
69  */
70
71 @interface NSObject(EOUnableToFaultToOne)
72 - (void)unableToFaultWithPrimaryKey:(NSDictionary*)key 
73   entity:(EOEntity*)entity 
74   databaseChannel:(EODatabaseChannel*)channel;
75 @end
76
77 #endif  /* __eoaccess_EODatabaseFault_h__ */