You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by to...@apache.org on 2006/10/12 01:11:00 UTC

svn commit: r463039 - in /incubator/cayenne/sandbox/CocoaCayenne/CAYClient: Artist.h Artist.m

Author: torehalset
Date: Wed Oct 11 16:10:59 2006
New Revision: 463039

URL: http://svn.apache.org/viewvc?view=rev&rev=463039
Log:
example of custom set/get method

Modified:
    incubator/cayenne/sandbox/CocoaCayenne/CAYClient/Artist.h
    incubator/cayenne/sandbox/CocoaCayenne/CAYClient/Artist.m

Modified: incubator/cayenne/sandbox/CocoaCayenne/CAYClient/Artist.h
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CAYClient/Artist.h?view=diff&rev=463039&r1=463038&r2=463039
==============================================================================
--- incubator/cayenne/sandbox/CocoaCayenne/CAYClient/Artist.h (original)
+++ incubator/cayenne/sandbox/CocoaCayenne/CAYClient/Artist.h Wed Oct 11 16:10:59 2006
@@ -24,4 +24,7 @@
 
 }
 
+-(void)setName:(NSString *)name;
+-(NSString *)name;
+
 @end

Modified: incubator/cayenne/sandbox/CocoaCayenne/CAYClient/Artist.m
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CAYClient/Artist.m?view=diff&rev=463039&r1=463038&r2=463039
==============================================================================
--- incubator/cayenne/sandbox/CocoaCayenne/CAYClient/Artist.m (original)
+++ incubator/cayenne/sandbox/CocoaCayenne/CAYClient/Artist.m Wed Oct 11 16:10:59 2006
@@ -37,4 +37,16 @@
 	[coder encodeObject:[values valueForKey:@"dateOfBirth"] forKey:@"dateOfBirth"];
 }
 
+-(void)setName:(NSString *)name
+{
+    // NSLog(@"DEBUG: used custom method to set name. %@", name);
+    [super setPrimitiveValue:name forKey:@"name"];
+}
+
+-(NSString *)name;
+{
+    // NSLog(@"DEBUG: used custom method to get name");
+    return [super primitiveValueForKey:@"name"];
+}
+
 @end