]> err.no Git - sope/commitdiff
added EO like model methods
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Thu, 4 Aug 2005 15:30:46 +0000 (15:30 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Thu, 4 Aug 2005 15:30:46 +0000 (15:30 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@970 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-core/EOCoreData/ChangeLog
sope-core/EOCoreData/GNUmakefile
sope-core/EOCoreData/NSEntityDescription+EO.h [new file with mode: 0644]
sope-core/EOCoreData/NSEntityDescription+EO.m [new file with mode: 0644]
sope-core/EOCoreData/Version

index 27c2ab7b8ed42bdffc8d11a29d23c0b97719d5ec..ebecd6282650b863a9f1a49b8179c68f6fffb8c2 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-04  Helge Hess  <helge.hess@opengroupware.org>
+
+       * NSEntityDescription+EO.m: added EO compatible attribute/relship 
+         lookup methods (v4.5.6)
+
 2005-08-04  Helge Hess  <helge.hess@skyrix.com>
 
        * NSPredicate+EO.m: also check 'selectorName' key during unarchiving
index 94667d1660680bb273689626bf2403ef10e465d0..9834c46ba20813f957005ecf3f96a12d15dd3f6e 100644 (file)
@@ -14,23 +14,28 @@ libEOCoreData_HEADER_FILES_INSTALL_DIR = /EOCoreData
 libEOCoreData_HEADER_FILES = \
        EOCoreData.h    \
        EOCoreDataSource.h              \
+       \
        EOFetchSpecification+CoreData.h \
        EOQualifier+CoreData.h          \
        EOSortOrdering+CoreData.h       \
+       \
        NSExpression+EO.h               \
        NSPredicate+EO.h                \
+       NSEntityDescription+EO.h        \
 
 libEOCoreData_OBJC_FILES = \
        EOCoreDataSource.m                      \
+       \
        EOFetchSpecification+CoreData.m         \
        EOQualifier+CoreData.m                  \
        EOSortOrdering+CoreData.m               \
-       NSExpression+EO.m                       \
-       NSPredicate+EO.m                        \
        EOKeyValueQualifier+CoreData.m          \
        EOKeyComparisonQualifier+CoreData.m     \
        EOCompoundQualifiers.m                  \
-
+       \
+       NSExpression+EO.m                       \
+       NSPredicate+EO.m                        \
+       NSEntityDescription+EO.m                \
 
 -include GNUmakefile.preamble
 include $(GNUSTEP_MAKEFILES)/library.make
diff --git a/sope-core/EOCoreData/NSEntityDescription+EO.h b/sope-core/EOCoreData/NSEntityDescription+EO.h
new file mode 100644 (file)
index 0000000..965dcc3
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+  Copyright (C) 2005 SKYRIX Software AG
+  
+  This file is part of SOPE.
+
+  SOPE is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the
+  Free Software Foundation; either version 2, or (at your option) any
+  later version.
+
+  SOPE 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 Lesser General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with SOPE; see the file COPYING.  If not, write to the
+  Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+  02111-1307, USA.
+*/
+
+#ifndef __NSEntityDescription_EO_H__
+#define __NSEntityDescription_EO_H__
+
+#import <CoreData/NSEntityDescription.h>
+/*
+  NSEntityDescription(EO)
+  
+  Make an NSEntityDescription behave like an EOEntity. This is mostly to make
+  the CoreData model objects work with DirectToWeb and EO at the same time.
+*/
+
+@interface NSEntityDescription(EO)
+
+- (id)relationshipNamed:(NSString *)_name;
+- (id)attributeNamed:(NSString *)_name;
+
+@end
+
+#endif /* __NSEntityDescription_EO_H__ */
diff --git a/sope-core/EOCoreData/NSEntityDescription+EO.m b/sope-core/EOCoreData/NSEntityDescription+EO.m
new file mode 100644 (file)
index 0000000..4151cf0
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+  Copyright (C) 2005 SKYRIX Software AG
+  
+  This file is part of SOPE.
+
+  SOPE is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the
+  Free Software Foundation; either version 2, or (at your option) any
+  later version.
+
+  SOPE 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 Lesser General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with SOPE; see the file COPYING.  If not, write to the
+  Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+  02111-1307, USA.
+*/
+
+#include "NSEntityDescription+EO.h"
+#include "common.h"
+
+@implementation NSEntityDescription(EO)
+
+- (id)relationshipNamed:(NSString *)_qname {
+  return [[self relationshipsByName] objectForKey:_qname];
+}
+
+- (id)attributeNamed:(NSString *)_qname {
+  return [[self attributesByName] objectForKey:_qname];
+}
+
+@end /* NSEntityDescription(EO) */
index d1646130b383b0ffd643ec15ead84ab41281eb5e..f3879a621640c27bcba29e6090db83d874417a83 100644 (file)
@@ -1,3 +1,3 @@
 # version file
 
-SUBMINOR_VERSION:=5
+SUBMINOR_VERSION:=6