diff --git a/ChangeLog b/ChangeLog index 75c6b00..170f4a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-02-18 David Ayers + + * EOAccess/EOGenericRecord.h/m ([-entity]): New category. + * EOAccess/GNUmakefile (EOGenericRecord): Build and install new + category. + 2009-02-18 David Ayers * configure.ac (disable-gui-projects): New option to disable builing diff --git a/EOAccess/EOGenericRecord.h b/EOAccess/EOGenericRecord.h new file mode 100644 index 0000000..9c5b000 --- /dev/null +++ b/EOAccess/EOGenericRecord.h @@ -0,0 +1,38 @@ +/* -*-objc-*- + EOGenericRecord.h + + Copyright (C) 2009 Free Software Foundation, Inc. + + Author: David Ayers + Date: February 2009 + + 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 + version 3 of the License, or (at your option) any later version. + + 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, + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +#ifndef __EOAccess_EOGenericRecord_h__ +#define __EOAccces_EOGenericRecord_h__ + +#include + +@class EOEntity; + +@interface EOGenericRecord (EOAccessAdditions) +- (EOEntity *)entity; +@end + +#endif /* __EOAccess_EOGenericRecord_h__ */ diff --git a/EOAccess/EOGenericRecord.m b/EOAccess/EOGenericRecord.m new file mode 100644 index 0000000..5126c52 --- /dev/null +++ b/EOAccess/EOGenericRecord.m @@ -0,0 +1,51 @@ +/* -*-objc-*- + EOGenericRecord.m EOGenericRecord Category + + Copyright (C) 2009 Free Software Foundation, Inc. + + Author: David Ayers + Date: February 2009 + + 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 + version 3 of the License, or (at your option) any later version. + + 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, + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +#include "config.h" + +RCS_ID("$Id: EOEntity.m 27910 2009-02-18 05:52:42Z ayers $") + +#ifndef GNUSTEP +#include +#include +#include +#endif + +#include + +#include + +@implementation EOGenericRecord (EOAccessAdditions) +/** + * Determins and returns the receivers entity. + */ +- (EOEntity *)entity +{ + if ([classDescription respondsToSelector:@selector(entity)]) + return [(EOEntityClassDescription *)classDescription entity]; + return nil; +} +@end diff --git a/EOAccess/EOSQLExpression.m b/EOAccess/EOSQLExpression.m index 8a5801f..51c1f4a 100644 --- a/EOAccess/EOSQLExpression.m +++ b/EOAccess/EOSQLExpression.m @@ -2244,7 +2244,7 @@ else if([attribute isDerived] == YES) } - (NSMutableDictionary *)bindVariableDictionaryForAttribute: (EOAttribute *)attribute - value: value + value: (id)value { [self subclassResponsibility: _cmd]; return nil; diff --git a/EOAccess/GNUmakefile b/EOAccess/GNUmakefile index fc3a210..535d225 100644 --- a/EOAccess/GNUmakefile +++ b/EOAccess/GNUmakefile @@ -59,6 +59,7 @@ EODatabaseChannel.m \ EODatabaseContext.m \ EOAccessFault.m \ EODatabaseDataSource.m \ +EOGenericRecord.m \ EOUtilities.m \ EOPrivate.m @@ -86,6 +87,7 @@ EOPropertyListEncoding.h \ EODatabaseDataSource.h \ EOSchemaSynchronization.h \ EOSchemaGeneration.h \ +EOGenericRecord.h \ EOUtilities.h \ EODefines.h \ EODeprecated.h \