2004-04-17 11:30:47 +00:00
|
|
|
/* -*-objc-*-
|
2002-11-15 22:57:05 +00:00
|
|
|
EOUtilities.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
|
|
|
|
|
|
|
Author: Manuel Guesdon <mguesdon@orange-concept.com>
|
|
|
|
Date: Sep 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 __EOUtilities_h__
|
|
|
|
#define __EOUtilities_h__
|
|
|
|
|
2002-12-30 22:10:43 +00:00
|
|
|
|
2003-03-31 00:24:15 +00:00
|
|
|
#include <EOControl/EOEditingContext.h>
|
|
|
|
#include <EOControl/EOFetchSpecification.h>
|
|
|
|
#include <EOControl/EOObjectStoreCoordinator.h>
|
|
|
|
|
|
|
|
#include <EOAccess/EODefines.h>
|
2002-12-30 22:10:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
@class NSArray;
|
|
|
|
@class NSDictionary;
|
|
|
|
@class NSString;
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
@class EODatabaseContext;
|
|
|
|
@class EOModelGroup;
|
|
|
|
@class EOEntity;
|
|
|
|
|
2002-12-30 22:10:43 +00:00
|
|
|
|
2003-03-31 00:24:15 +00:00
|
|
|
GDL2ACCESS_EXPORT NSString *EOMoreThanOneException;
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
|
2002-12-30 22:10:43 +00:00
|
|
|
@interface EOEditingContext (EOUtilities)
|
2002-11-15 22:57:05 +00:00
|
|
|
|
2007-01-01 11:52:38 +00:00
|
|
|
- (NSArray *)objectsForEntityNamed: (NSString *)entityName;
|
2004-04-17 11:30:47 +00:00
|
|
|
- (NSArray *)objectsOfClass: (Class)classObject;
|
|
|
|
- (NSArray *)objectsWithFetchSpecificationNamed: (NSString *)fetchSpecName
|
|
|
|
entityNamed: (NSString *)entityName
|
|
|
|
bindings: (NSDictionary *)bindings;
|
2007-01-01 11:52:38 +00:00
|
|
|
- (NSArray *)objectsForEntityNamed: (NSString *)entityName
|
2004-04-17 11:30:47 +00:00
|
|
|
qualifierFormat: (NSString *)format, ...;
|
|
|
|
- (NSArray *)objectsMatchingValue: (id)value
|
|
|
|
forKey: (NSString *)key
|
2007-01-01 11:52:38 +00:00
|
|
|
entityNamed: (NSString *)entityName;
|
2004-04-17 11:30:47 +00:00
|
|
|
- (NSArray *)objectsMatchingValues: (NSDictionary *)values
|
2007-01-01 11:52:38 +00:00
|
|
|
entityNamed: (NSString *)entityName;
|
2004-04-17 11:30:47 +00:00
|
|
|
|
|
|
|
- (id)objectWithFetchSpecificationNamed: (NSString *)fetchSpecName
|
|
|
|
entityNamed: (NSString *)entityName
|
|
|
|
bindings: (NSDictionary *)bindings;
|
2007-01-01 11:52:38 +00:00
|
|
|
- (id)objectForEntityNamed: (NSString *)entityName
|
2004-04-17 11:30:47 +00:00
|
|
|
qualifierFormat: (NSString *)format, ...;
|
2002-11-15 22:57:05 +00:00
|
|
|
- (id)objectMatchingValue: (id)value
|
2004-04-17 11:30:47 +00:00
|
|
|
forKey: (NSString *)key
|
2007-01-01 11:52:38 +00:00
|
|
|
entityNamed: (NSString *)entityName;
|
2004-04-17 11:30:47 +00:00
|
|
|
- (id)objectMatchingValues: (NSDictionary *)values
|
2007-01-01 11:52:38 +00:00
|
|
|
entityNamed: (NSString *)entityName;
|
2002-11-15 22:57:05 +00:00
|
|
|
- (id)objectWithPrimaryKeyValue: (id)value
|
2007-01-01 11:52:38 +00:00
|
|
|
entityNamed: (NSString *)entityName;
|
2004-04-17 11:30:47 +00:00
|
|
|
- (id)objectWithPrimaryKey: (NSDictionary *)pkDict
|
2007-01-01 11:52:38 +00:00
|
|
|
entityNamed: (NSString *)entityName;
|
2004-04-17 11:30:47 +00:00
|
|
|
|
2007-01-01 11:52:38 +00:00
|
|
|
- (NSArray *)rawRowsForEntityNamed: (NSString *)entityName
|
2004-04-17 11:30:47 +00:00
|
|
|
qualifierFormat: (NSString *)format, ...;
|
|
|
|
- (NSArray *)rawRowsMatchingValue: (id)value
|
|
|
|
forKey: (NSString *)key
|
2007-01-01 11:52:38 +00:00
|
|
|
entityNamed: (NSString *)entityName;
|
2004-04-17 11:30:47 +00:00
|
|
|
- (NSArray *)rawRowsMatchingValues: (NSDictionary *)values
|
2007-01-01 11:52:38 +00:00
|
|
|
entityNamed: (NSString *)entityName;
|
2004-04-17 11:30:47 +00:00
|
|
|
- (NSArray *)rawRowsWithSQL: (NSString *)sqlString
|
|
|
|
modelNamed: (NSString *)name;
|
|
|
|
- (NSArray *)rawRowsWithStoredProcedureNamed: (NSString *)name
|
|
|
|
arguments: (NSDictionary *)args;
|
|
|
|
- (NSDictionary *)executeStoredProcedureNamed: (NSString *)name
|
|
|
|
arguments: (NSDictionary *)args;
|
|
|
|
- (id)objectFromRawRow: (NSDictionary *)row
|
2007-01-01 11:52:38 +00:00
|
|
|
entityNamed: (NSString *)entityName;
|
2004-04-17 11:30:47 +00:00
|
|
|
|
|
|
|
- (EODatabaseContext *)databaseContextForModelNamed: (NSString *)name;
|
|
|
|
- (void)connectWithModelNamed: (NSString *)name
|
|
|
|
connectionDictionaryOverrides: (NSDictionary *)overrides;
|
2002-11-15 22:57:05 +00:00
|
|
|
|
2002-12-06 20:09:34 +00:00
|
|
|
- (id)createAndInsertInstanceOfEntityNamed: (NSString *)entityName;
|
|
|
|
|
2004-04-17 11:30:47 +00:00
|
|
|
- (NSDictionary *)primaryKeyForObject: (id)object;
|
|
|
|
- (NSDictionary *)destinationKeyForSourceObject: (id)object
|
|
|
|
relationshipNamed: (NSString *)name;
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
- (id)localInstanceOfObject: (id)object;
|
2004-04-17 11:30:47 +00:00
|
|
|
- (NSArray *)localInstancesOfObjects: (NSArray *)objects;
|
2002-11-15 22:57:05 +00:00
|
|
|
|
2004-04-17 11:30:47 +00:00
|
|
|
- (EOModelGroup *)modelGroup;
|
2007-01-01 11:52:38 +00:00
|
|
|
- (EOEntity *)entityNamed: (NSString *)entityName;
|
2004-04-17 11:30:47 +00:00
|
|
|
- (EOEntity *)entityForClass: (Class)classObject;
|
2007-01-01 11:52:38 +00:00
|
|
|
- (EOEntity *)entityForObject: (id)object;
|
2002-11-15 22:57:05 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
#endif
|