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/09/30 20:51:38 UTC

svn commit: r451635 - in /incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne: ./ CocoaCayenne.xcodeproj/

Author: torehalset
Date: Sat Sep 30 11:51:37 2006
New Revision: 451635

URL: http://svn.apache.org/viewvc?view=rev&rev=451635
Log:
removed DbEntity/DbAttribute as it is not sent to the client

Removed:
    incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYDbAttribute.h
    incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYDbAttribute.m
    incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYDbEntity.h
    incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYDbEntity.m
    incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYEntity.h
    incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYEntity.m
Modified:
    incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCocoaCayenne.m
    incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYDataMap.h
    incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYDataMap.m
    incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYEntityResolver.m
    incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjEntity.h
    incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjEntity.m
    incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjectContext.m
    incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CocoaCayenne.xcodeproj/project.pbxproj

Modified: incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCocoaCayenne.m
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCocoaCayenne.m?view=diff&rev=451635&r1=451634&r2=451635
==============================================================================
--- incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCocoaCayenne.m (original)
+++ incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCocoaCayenne.m Sat Sep 30 11:51:37 2006
@@ -34,8 +34,6 @@
     [classMapping setObject:@"CAYObjectId" forKey:@"org.apache.cayenne.ObjectId"];
     [classMapping setObject:@"CAYObjEntity" forKey:@"org.apache.cayenne.map.ObjEntity"];
     [classMapping setObject:@"CAYObjAttribute" forKey:@"org.apache.cayenne.map.ObjAttribute"];
-    [classMapping setObject:@"CAYDbEntity" forKey:@"org.apache.cayenne.map.DbEntity"];
-    [classMapping setObject:@"CAYDbAttribute" forKey:@"org.apache.cayenne.map.DbAttribute"];
     [classMapping setObject:@"CAYClientObjRelationship" forKey:@"org.apache.cayenne.map.ClientObjRelationship"];
     [classMapping setObject:@"CAYEntityResolver" forKey:@"org.apache.cayenne.map.EntityResolver"];
     [classMapping setObject:@"CAYDataMap" forKey:@"org.apache.cayenne.map.DataMap"];

Modified: incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYDataMap.h
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYDataMap.h?view=diff&rev=451635&r1=451634&r2=451635
==============================================================================
--- incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYDataMap.h (original)
+++ incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYDataMap.h Sat Sep 30 11:51:37 2006
@@ -25,7 +25,6 @@
 
     NSString *name;
     NSMutableDictionary *objEntityMap;
-    NSMutableDictionary *dbEntityMap;
 
 }
 
@@ -33,8 +32,6 @@
 -(NSString *)name;
 -(void)setObjEntityMap:(NSMutableDictionary *)oem;
 -(NSMutableDictionary *)objEntityMap;
--(void)setDbEntityMap:(NSMutableDictionary *)dem;
--(NSMutableDictionary *)dbEntityMap;
 
 -(NSString *)classNameForObjEntity:(CAYObjEntity *)entity;
 

Modified: incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYDataMap.m
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYDataMap.m?view=diff&rev=451635&r1=451634&r2=451635
==============================================================================
--- incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYDataMap.m (original)
+++ incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYDataMap.m Sat Sep 30 11:51:37 2006
@@ -27,12 +27,10 @@
 	[super init];
 	[self setName:[coder decodeObjectForKey:@"name"]];
 	[self setObjEntityMap:[coder decodeObjectForKey:@"objEntityMap"]];
-	[self setDbEntityMap:[coder decodeObjectForKey:@"dbEntityMap"]];
     
     // remove extra entry created by hessian framework
     // TODO: fix in framework?
     [[self objEntityMap] removeObjectForKey:@"hessianClassName"];
-    [[self dbEntityMap] removeObjectForKey:@"hessianClassName"];
     
 	return self;
 }
@@ -41,7 +39,6 @@
 {
 	[coder encodeObject:[self name] forKey:@"name"];
 	[coder encodeObject:[self objEntityMap] forKey:@"objEntityMap"];
-	[coder encodeObject:[self dbEntityMap] forKey:@"dbEntityMap"];
 }
 
 -(void)setName:(NSString *)n
@@ -68,29 +65,23 @@
     return objEntityMap;
 }
 
--(void)setDbEntityMap:(NSMutableDictionary *)dem
-{
-    [dem retain];
-    [dbEntityMap release];
-    dbEntityMap = dem;
-}
-
--(NSMutableDictionary *)dbEntityMap
-{
-    return dbEntityMap;
-}
-
 -(NSString *)classNameForObjEntity:(CAYObjEntity *)entity;
 {
     // TODO: handle prefix for class name. Like MYPROJECTArtist
     return [entity name];
 }
 
+-(NSString *)description
+{
+    NSString *description = [[NSString alloc] initWithFormat:@"%@ {name = %@; objEntityMap = %@}", [self class], [self name], [self objEntityMap]];
+    [description autorelease];
+    return description;
+}
+
 -(void)dealloc
 {
     [self setName:nil];
     [self setObjEntityMap:nil];
-    [self setDbEntityMap:nil];
 	[super dealloc];
 }
 

Modified: incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYEntityResolver.m
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYEntityResolver.m?view=diff&rev=451635&r1=451634&r2=451635
==============================================================================
--- incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYEntityResolver.m (original)
+++ incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYEntityResolver.m Sat Sep 30 11:51:37 2006
@@ -127,6 +127,13 @@
     return [self objEntityForClass:[dataObject class]];
 }
 
+-(NSString *)description
+{
+    NSString *description = [[NSString alloc] initWithFormat:@"%@ {maps = %@}", [self class], [self maps]];
+    [description autorelease];
+    return description;
+}
+
 -(void)dealloc
 {
     [self setMaps:nil];

Modified: incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjEntity.h
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjEntity.h?view=diff&rev=451635&r1=451634&r2=451635
==============================================================================
--- incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjEntity.h (original)
+++ incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjEntity.h Sat Sep 30 11:51:37 2006
@@ -19,14 +19,21 @@
 
 #import <Cocoa/Cocoa.h>
 
-#import "CAYEntity.h"
-
-@interface CAYObjEntity : CAYEntity <NSCoding> {
+@interface CAYObjEntity : NSObject <NSCoding> {
 
+	NSMutableDictionary *attributes;
+	NSString *name;
+	NSMutableDictionary *relationships;
     NSString *serverClassName;
 	
 }
 
+-(void)setAttributes:(NSMutableDictionary *)a;
+-(NSMutableDictionary *)attributes;
+-(void)setName:(NSString *)n;
+-(NSString *)name;
+-(void)setRelationships:(NSMutableDictionary *)r;
+-(NSMutableDictionary *)relationships;
 -(void)setServerClassName:(NSString *)n;
 -(NSString *)serverClassName;
 

Modified: incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjEntity.m
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjEntity.m?view=diff&rev=451635&r1=451634&r2=451635
==============================================================================
--- incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjEntity.m (original)
+++ incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjEntity.m Sat Sep 30 11:51:37 2006
@@ -24,16 +24,62 @@
 
 -(id)initWithCoder:(NSCoder*)coder
 {
-	[super initWithCoder:coder];
+	[super init];
+	[self setAttributes:[coder decodeObjectForKey:@"attributes"]];
+	[self setName:[coder decodeObjectForKey:@"name"]];
+	[self setRelationships:[coder decodeObjectForKey:@"relationships"]];
 	[self setServerClassName:[coder decodeObjectForKey:@"className"]];
     
+    // remove extra entry created by hessian framework
+    // TODO: fix in framework?
+    [[self relationships] removeObjectForKey:@"hessianClassName"];
+    [[self attributes] removeObjectForKey:@"hessianClassName"];
+    
 	return self;
 }
 
 -(void)encodeWithCoder:(NSCoder*)coder
 {
-    [super encodeWithCoder:coder];
 	[coder encodeObject:serverClassName forKey:@"className"];
+	[coder encodeObject:[self  attributes] forKey:@"attributes"];
+	[coder encodeObject:[self name] forKey:@"name"];
+	[coder encodeObject:[self relationships] forKey:@"relationships"];
+}
+
+-(void)setAttributes:(NSMutableDictionary *)a
+{
+	[a retain];
+	[attributes release];
+	attributes = a;
+}
+
+-(NSMutableDictionary *)attributes
+{
+	return attributes;
+}
+
+-(void)setName:(NSString *)n
+{
+	[n retain];
+	[name release];
+	name = n;
+}
+
+-(NSString *)name
+{
+	return name;
+}
+
+-(void)setRelationships:(NSMutableDictionary *)r
+{
+	[r retain];
+	[relationships release];
+	relationships = r;
+}
+
+-(NSMutableDictionary *)relationships
+{
+	return relationships;
 }
 
 -(void)setServerClassName:(NSString *)n
@@ -50,6 +96,9 @@
 
 -(void)dealloc
 {
+    [self setAttributes:nil];
+    [self setRelationships:nil];
+    [self setName:nil];
     [self setServerClassName:nil];
 	[super dealloc];
 }

Modified: incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjectContext.m
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjectContext.m?view=diff&rev=451635&r1=451634&r2=451635
==============================================================================
--- incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjectContext.m (original)
+++ incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjectContext.m Sat Sep 30 11:51:37 2006
@@ -173,7 +173,7 @@
     id bootresult = [[self connection] sendMessage:bootstrapMsg];
     if([bootresult isKindOfClass:[CAYEntityResolver class]])
     {
-        NSLog(@" ****** got an CAYEntityResolver");
+        NSLog(@"DEBUG: got an CAYEntityResolver: %@", bootresult);
         CAYEntityResolver *resolver = (CAYEntityResolver *)bootresult;
         [self setEntityResolver:resolver];
     }

Modified: incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CocoaCayenne.xcodeproj/project.pbxproj
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CocoaCayenne.xcodeproj/project.pbxproj?view=diff&rev=451635&r1=451634&r2=451635
==============================================================================
--- incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CocoaCayenne.xcodeproj/project.pbxproj (original)
+++ incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CocoaCayenne.xcodeproj/project.pbxproj Sat Sep 30 11:51:37 2006
@@ -77,14 +77,8 @@
 		444F26400AC975E50097052B /* CAYValidationResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 444F263E0AC975E50097052B /* CAYValidationResult.m */; };
 		444F27A80AC9EDFF0097052B /* CAYCayenneRuntimeException.h in Headers */ = {isa = PBXBuildFile; fileRef = 444F27A60AC9EDFF0097052B /* CAYCayenneRuntimeException.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		444F27A90AC9EDFF0097052B /* CAYCayenneRuntimeException.m in Sources */ = {isa = PBXBuildFile; fileRef = 444F27A70AC9EDFF0097052B /* CAYCayenneRuntimeException.m */; };
-		444F27F50AC9F4B80097052B /* CAYMissingSessionException.h in Headers */ = {isa = PBXBuildFile; fileRef = 444F27F30AC9F4B80097052B /* CAYMissingSessionException.h */; };
+		444F27F50AC9F4B80097052B /* CAYMissingSessionException.h in Headers */ = {isa = PBXBuildFile; fileRef = 444F27F30AC9F4B80097052B /* CAYMissingSessionException.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		444F27F60AC9F4B80097052B /* CAYMissingSessionException.m in Sources */ = {isa = PBXBuildFile; fileRef = 444F27F40AC9F4B80097052B /* CAYMissingSessionException.m */; };
-		444F28B70ACC17B30097052B /* CAYDbEntity.h in Headers */ = {isa = PBXBuildFile; fileRef = 444F28B50ACC17B30097052B /* CAYDbEntity.h */; };
-		444F28B80ACC17B30097052B /* CAYDbEntity.m in Sources */ = {isa = PBXBuildFile; fileRef = 444F28B60ACC17B30097052B /* CAYDbEntity.m */; };
-		444F29210ACCF9DF0097052B /* CAYDbAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 444F291F0ACCF9DE0097052B /* CAYDbAttribute.h */; };
-		444F29220ACCF9DF0097052B /* CAYDbAttribute.m in Sources */ = {isa = PBXBuildFile; fileRef = 444F29200ACCF9DE0097052B /* CAYDbAttribute.m */; };
-		444F292B0ACCFBAB0097052B /* CAYEntity.h in Headers */ = {isa = PBXBuildFile; fileRef = 444F29290ACCFBAB0097052B /* CAYEntity.h */; };
-		444F292C0ACCFBAB0097052B /* CAYEntity.m in Sources */ = {isa = PBXBuildFile; fileRef = 444F292A0ACCFBAB0097052B /* CAYEntity.m */; };
 		448E1BA90AC0882F00D137DF /* CAYArrayController.h in Headers */ = {isa = PBXBuildFile; fileRef = 448E1BA70AC0882F00D137DF /* CAYArrayController.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		448E1BAA0AC0882F00D137DF /* CAYArrayController.m in Sources */ = {isa = PBXBuildFile; fileRef = 448E1BA80AC0882F00D137DF /* CAYArrayController.m */; };
 		44BD0F9D0ABF08320005EE1E /* CAYDataMapIO.h in Headers */ = {isa = PBXBuildFile; fileRef = 44BD0F9B0ABF08320005EE1E /* CAYDataMapIO.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -172,12 +166,6 @@
 		444F27A70AC9EDFF0097052B /* CAYCayenneRuntimeException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CAYCayenneRuntimeException.m; sourceTree = "<group>"; };
 		444F27F30AC9F4B80097052B /* CAYMissingSessionException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAYMissingSessionException.h; sourceTree = "<group>"; };
 		444F27F40AC9F4B80097052B /* CAYMissingSessionException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CAYMissingSessionException.m; sourceTree = "<group>"; };
-		444F28B50ACC17B30097052B /* CAYDbEntity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAYDbEntity.h; sourceTree = "<group>"; };
-		444F28B60ACC17B30097052B /* CAYDbEntity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CAYDbEntity.m; sourceTree = "<group>"; };
-		444F291F0ACCF9DE0097052B /* CAYDbAttribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAYDbAttribute.h; sourceTree = "<group>"; };
-		444F29200ACCF9DE0097052B /* CAYDbAttribute.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CAYDbAttribute.m; sourceTree = "<group>"; };
-		444F29290ACCFBAB0097052B /* CAYEntity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAYEntity.h; sourceTree = "<group>"; };
-		444F292A0ACCFBAB0097052B /* CAYEntity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CAYEntity.m; sourceTree = "<group>"; };
 		448E1BA70AC0882F00D137DF /* CAYArrayController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAYArrayController.h; sourceTree = "<group>"; };
 		448E1BA80AC0882F00D137DF /* CAYArrayController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CAYArrayController.m; sourceTree = "<group>"; };
 		44BD0F9B0ABF08320005EE1E /* CAYDataMapIO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAYDataMapIO.h; sourceTree = "<group>"; };
@@ -303,8 +291,6 @@
 				44463D780AA37577006BAA58 /* CAYEntityResolver.m */,
 				44463D750AA37577006BAA58 /* CAYDataMap.h */,
 				44463D760AA37577006BAA58 /* CAYDataMap.m */,
-				444F29290ACCFBAB0097052B /* CAYEntity.h */,
-				444F292A0ACCFBAB0097052B /* CAYEntity.m */,
 				44463D890AA37577006BAA58 /* CAYObjEntity.h */,
 				44463D8A0AA37577006BAA58 /* CAYObjEntity.m */,
 				44463D710AA37577006BAA58 /* CAYClientObjRelationship.h */,
@@ -313,10 +299,6 @@
 				4407C1310ABAD50D0065409F /* CAYObjAttribute.m */,
 				44BD0F9B0ABF08320005EE1E /* CAYDataMapIO.h */,
 				44BD0F9C0ABF08320005EE1E /* CAYDataMapIO.m */,
-				444F28B50ACC17B30097052B /* CAYDbEntity.h */,
-				444F28B60ACC17B30097052B /* CAYDbEntity.m */,
-				444F291F0ACCF9DE0097052B /* CAYDbAttribute.h */,
-				444F29200ACCF9DE0097052B /* CAYDbAttribute.m */,
 			);
 			name = model;
 			sourceTree = "<group>";
@@ -456,9 +438,6 @@
 				444F263F0AC975E50097052B /* CAYValidationResult.h in Headers */,
 				444F27A80AC9EDFF0097052B /* CAYCayenneRuntimeException.h in Headers */,
 				444F27F50AC9F4B80097052B /* CAYMissingSessionException.h in Headers */,
-				444F28B70ACC17B30097052B /* CAYDbEntity.h in Headers */,
-				444F29210ACCF9DF0097052B /* CAYDbAttribute.h in Headers */,
-				444F292B0ACCFBAB0097052B /* CAYEntity.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -554,9 +533,6 @@
 				444F26400AC975E50097052B /* CAYValidationResult.m in Sources */,
 				444F27A90AC9EDFF0097052B /* CAYCayenneRuntimeException.m in Sources */,
 				444F27F60AC9F4B80097052B /* CAYMissingSessionException.m in Sources */,
-				444F28B80ACC17B30097052B /* CAYDbEntity.m in Sources */,
-				444F29220ACCF9DF0097052B /* CAYDbAttribute.m in Sources */,
-				444F292C0ACCFBAB0097052B /* CAYEntity.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};