cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From torehal...@apache.org
Subject svn commit: r451685 - in /incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne: CAYCocoaCayenne.m CAYObjAttribute.h CAYObjAttribute.m
Date Sat, 30 Sep 2006 22:14:52 GMT
Author: torehalset
Date: Sat Sep 30 15:14:51 2006
New Revision: 451685

URL: http://svn.apache.org/viewvc?view=rev&rev=451685
Log:
CAY-674

Modified:
    incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCocoaCayenne.m
    incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjAttribute.h
    incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjAttribute.m

Modified: incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCocoaCayenne.m
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCocoaCayenne.m?view=diff&rev=451685&r1=451684&r2=451685
==============================================================================
--- incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCocoaCayenne.m (original)
+++ incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCocoaCayenne.m Sat Sep 30 15:14:51
2006
@@ -33,7 +33,7 @@
     [classMapping setObject:@"CAYGenericResponse" forKey:@"org.apache.cayenne.util.GenericResponse"];
     [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:@"CAYObjAttribute" forKey:@"org.apache.cayenne.map.ClientObjAttribute"];
     [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/CAYObjAttribute.h
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjAttribute.h?view=diff&rev=451685&r1=451684&r2=451685
==============================================================================
--- incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjAttribute.h (original)
+++ incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjAttribute.h Sat Sep 30 15:14:51
2006
@@ -27,7 +27,8 @@
 
     NSString *name;
     NSString *javaType;
-    CAYObjEntity *objEntity;
+    BOOL mandatory;
+    int maxLength;
     
 }
 
@@ -35,6 +36,10 @@
 -(NSString *)name;
 -(void)setJavaType:(NSString *)t;
 -(NSString *)javaType;
+-(void)setMandatory:(BOOL)m;
+-(BOOL)isMandatory;
+-(void)setMaxLength:(int)ml;
+-(int)maxLength;
 
 -(BOOL)isValueOfOkType:(id)value;
 

Modified: incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjAttribute.m
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjAttribute.m?view=diff&rev=451685&r1=451684&r2=451685
==============================================================================
--- incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjAttribute.m (original)
+++ incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjAttribute.m Sat Sep 30 15:14:51
2006
@@ -27,6 +27,8 @@
 	[super init];
 	[self setName:[coder decodeObjectForKey:@"name"]];
 	[self setJavaType:[coder decodeObjectForKey:@"type"]];
+	[self setMandatory:[coder decodeBoolForKey:@"mandatory"]];
+	[self setMaxLength:[coder decodeIntForKey:@"maxLength"]];
     
 	return self;
 }
@@ -35,6 +37,8 @@
 {
 	[coder encodeObject:[self name] forKey:@"name"];
 	[coder encodeObject:[self javaType] forKey:@"type"];
+	[coder encodeBool:[self isMandatory] forKey:@"mandatory"];
+	[coder encodeInt:[self maxLength] forKey:@"maxLength"];
 }
 
 -(void)setName:(NSString *)n
@@ -61,6 +65,26 @@
     return javaType;
 }
 
+-(void)setMandatory:(BOOL)m
+{
+    mandatory = m;
+}
+
+-(BOOL)isMandatory
+{
+    return mandatory;
+}
+
+-(void)setMaxLength:(int)ml
+{
+    maxLength = ml;
+}
+
+-(int)maxLength
+{
+    return maxLength;
+}
+
 -(BOOL)isValueOfOkType:(id)value
 {
     // TODO: create a Dictionary like class mapper. perhaps two, one for each direction.
@@ -81,7 +105,7 @@
 
 -(NSString *)description
 {
-    NSString *result = [[NSString alloc] initWithFormat:@"CAYObjAttribute {name = %@; javaType
= %@}", [self name], [self javaType]];
+    NSString *result = [[NSString alloc] initWithFormat:@"CAYObjAttribute {name = %@; javaType
= %@, mandatory = %i, maxLength = %i}", [self name], [self javaType], [self isMandatory],
[self maxLength]];
     [result autorelease];
     return result;
 }



Mime
View raw message