2004-04-17 11:30:47 +00:00
|
|
|
/* -*-objc-*-
|
2002-11-15 22:57:05 +00:00
|
|
|
EOAccessFault.h
|
|
|
|
|
2005-08-17 08:07:57 +00:00
|
|
|
Copyright (C) 2000,2002,2003,2004,2005 Free Software Foundation, Inc.
|
2002-11-15 22:57:05 +00:00
|
|
|
|
2006-09-14 16:06:21 +00:00
|
|
|
Author: Mirko Viviani <mirko.viviani@gmail.com>
|
2002-11-15 22:57:05 +00:00
|
|
|
Date: June 2000
|
|
|
|
|
|
|
|
This file is part of the GNUstep Database Library.
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Library General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
2007-07-12 06:39:22 +00:00
|
|
|
version 3 of the License, or (at your option) any later version.
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Library General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
|
|
License along with this library; see the file COPYING.LIB.
|
|
|
|
If not, write to the Free Software Foundation,
|
2005-08-17 08:07:57 +00:00
|
|
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2002-11-15 22:57:05 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __EOAccessFault_h__
|
|
|
|
#define __EOAccessFault_h__
|
|
|
|
|
|
|
|
|
2003-03-31 00:24:15 +00:00
|
|
|
#include <EOControl/EOFault.h>
|
2002-12-30 22:10:43 +00:00
|
|
|
|
2003-03-31 00:24:15 +00:00
|
|
|
#include <EOAccess/EODefines.h>
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
@class EODatabaseContext;
|
2002-12-30 22:10:43 +00:00
|
|
|
@class EOEditingContext;
|
2002-11-15 22:57:05 +00:00
|
|
|
@class EOKeyGlobalID;
|
2002-12-30 22:10:43 +00:00
|
|
|
@class NSString;
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
|
2004-04-17 11:30:47 +00:00
|
|
|
@interface EOAccessGenericFaultHandler : EOFaultHandler
|
2002-11-15 22:57:05 +00:00
|
|
|
{
|
|
|
|
unsigned int _generation;
|
|
|
|
EOAccessGenericFaultHandler *_next;
|
|
|
|
EOAccessGenericFaultHandler *_prev;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void)linkAfter: (EOAccessGenericFaultHandler *)faultHandler
|
|
|
|
usingGeneration: (unsigned int)gen;
|
|
|
|
- (EOAccessGenericFaultHandler *)next;
|
|
|
|
- (EOAccessGenericFaultHandler *)previous;
|
|
|
|
- (unsigned int)generation;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
2004-04-17 11:30:47 +00:00
|
|
|
@interface EOAccessFaultHandler : EOAccessGenericFaultHandler
|
2002-11-15 22:57:05 +00:00
|
|
|
{
|
|
|
|
EOKeyGlobalID *gid;
|
|
|
|
EODatabaseContext *databaseContext;
|
|
|
|
EOEditingContext *editingContext;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ (EOAccessFaultHandler *)accessFaultHandlerWithGlobalID: (EOKeyGlobalID *)globalID
|
|
|
|
databaseContext: (EODatabaseContext *)dbcontext
|
|
|
|
editingContext: (EOEditingContext *)ec;
|
|
|
|
|
2004-04-17 11:30:47 +00:00
|
|
|
- (id)initWithGlobalID: (EOKeyGlobalID *)globalID
|
|
|
|
databaseContext: (EODatabaseContext *)dbcontext
|
|
|
|
editingContext: (EOEditingContext *)ec;
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
- (EOKeyGlobalID *)globalID;
|
|
|
|
- (EODatabaseContext *)databaseContext;
|
|
|
|
- (EOEditingContext *)editingContext;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
2004-04-17 11:30:47 +00:00
|
|
|
@interface EOAccessArrayFaultHandler : EOAccessGenericFaultHandler
|
2002-11-15 22:57:05 +00:00
|
|
|
{
|
|
|
|
EOKeyGlobalID *sgid;
|
|
|
|
NSString *relationshipName;
|
|
|
|
EODatabaseContext *databaseContext;
|
|
|
|
EOEditingContext *editingContext;
|
|
|
|
id copy;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ (EOAccessArrayFaultHandler *)accessArrayFaultHandlerWithSourceGlobalID: (EOKeyGlobalID *)sourceGID
|
2007-01-01 11:52:38 +00:00
|
|
|
relationshipName: (NSString *)relName
|
2002-11-15 22:57:05 +00:00
|
|
|
databaseContext: (EODatabaseContext *)dbcontext
|
|
|
|
editingContext: (EOEditingContext *)ec;
|
|
|
|
|
2004-04-17 11:30:47 +00:00
|
|
|
- (id)initWithSourceGlobalID: (EOKeyGlobalID *)sourceGID
|
2007-01-01 11:52:38 +00:00
|
|
|
relationshipName: (NSString *)relName
|
2004-04-17 11:30:47 +00:00
|
|
|
databaseContext: (EODatabaseContext *)dbcontext
|
|
|
|
editingContext: (EOEditingContext *)ec;
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
- (EOKeyGlobalID *)sourceGlobalID;
|
|
|
|
- (NSString *)relationshipName;
|
|
|
|
- (EODatabaseContext *)databaseContext;
|
|
|
|
- (EOEditingContext *)editingContext;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
@interface NSObject (EOAccessFaultUnableToFaultToOne)
|
|
|
|
|
2004-04-17 11:30:47 +00:00
|
|
|
- (void)unableToFaultObject: (id)object
|
|
|
|
databaseContext: (EODatabaseContext *)context;
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
2002-12-31 16:25:21 +00:00
|
|
|
@interface EOFault (EOAccess)
|
|
|
|
|
|
|
|
- (EODatabaseContext *)databaseContext;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
2003-03-31 00:24:15 +00:00
|
|
|
GDL2ACCESS_EXPORT NSString *EOAccessFaultObjectNotAvailableException;
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
#endif
|