Author: torehalset
Date: Thu Sep 28 22:28:41 2006
New Revision: 451132
URL: http://svn.apache.org/viewvc?view=rev&rev=451132
Log:
added set/get sessionId
Modified:
incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYRemoteSession.m
Modified: incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYRemoteSession.m
URL:
http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYRemoteSession.m?view=diff&rev=451132&r1=451131&r2=451132
==============================================================================
--- incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYRemoteSession.m
(original)
+++ incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYRemoteSession.m Thu
Sep 28 22:28:41 2006
@@ -26,12 +26,14 @@
{
[super init];
[self setName:[coder decodeObjectForKey:@"name"]];
+ [self setSessionId:[coder decodeObjectForKey:@"sessionId"]];
return self;
}
-(void)encodeWithCoder:(NSCoder*)coder
{
- [coder encodeObject:name forKey:@"name"];
+ [coder encodeObject:[self name] forKey:@"name"];
+ [coder encodeObject:[self sessionId] forKey:@"sessionId"];
}
-(void)setName:(NSString *)n
@@ -58,12 +60,18 @@
return sessionId;
}
+-(NSString *)description
+{
+ NSString *description = [[NSString alloc] initWithFormat:@"%@ {name = %@,
sessionId = [EMAIL PROTECTED]", [self class], [self name], [self sessionId]];
+ [description autorelease];
+ return description;
+}
+
-(void)dealloc
{
- [name release];
- [sessionId release];
+ [self setName:nil];
+ [self setSessionId:nil];
[super dealloc];
}
-
@end