Author: torehalset
Date: Thu Sep 28 22:31:56 2006
New Revision: 451134
URL: http://svn.apache.org/viewvc?view=rev&rev=451134
Log:
* started to handle exceptions
* mapped some new classes not yet finished. sorry for this. should not be a
problem.
Added:
incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCayenneRuntimeException.h
incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCayenneRuntimeException.m
incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYMissingSessionException.h
incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYMissingSessionException.m
Modified:
incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCocoaCayenne.m
Added:
incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCayenneRuntimeException.h
URL:
http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCayenneRuntimeException.h?view=auto&rev=451134
==============================================================================
---
incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCayenneRuntimeException.h
(added)
+++
incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCayenneRuntimeException.h
Thu Sep 28 22:31:56 2006
@@ -0,0 +1,32 @@
+/*****************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+****************************************************************/
+
+#import <Cocoa/Cocoa.h>
+
+
[EMAIL PROTECTED] CAYCayenneRuntimeException : NSObject <NSCoding> {
+
+ NSString *detailMessage;
+
+}
+
+-(void)setDetailMessage:(NSString *)msg;
+-(NSString *)detailMessage;
+
[EMAIL PROTECTED]
Added:
incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCayenneRuntimeException.m
URL:
http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCayenneRuntimeException.m?view=auto&rev=451134
==============================================================================
---
incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCayenneRuntimeException.m
(added)
+++
incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCayenneRuntimeException.m
Thu Sep 28 22:31:56 2006
@@ -0,0 +1,63 @@
+/*****************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+****************************************************************/
+
+#import "CAYCayenneRuntimeException.h"
+
+
[EMAIL PROTECTED] CAYCayenneRuntimeException
+
+-(id)initWithCoder:(NSCoder*)coder
+{
+ [super init];
+ [self setDetailMessage:[coder decodeObjectForKey:@"detailMessage"]];
+ return self;
+}
+
+-(void)encodeWithCoder:(NSCoder*)coder
+{
+ [coder encodeObject:[self detailMessage] forKey:@"detailMessage"];
+}
+
+-(void)setDetailMessage:(NSString *)msg
+{
+ [msg retain];
+ [detailMessage release];
+ detailMessage = msg;
+}
+
+-(NSString *)detailMessage
+{
+ return detailMessage;
+}
+
+-(NSString *)description
+{
+ NSString *description = [[NSString alloc] initWithFormat:@"%@
{detailMessage = [EMAIL PROTECTED]", [self class], [self detailMessage]];
+ [description autorelease];
+ return description;
+}
+
+-(void)dealloc
+{
+ [self setDetailMessage:nil];
+ [super dealloc];
+}
+
+
[EMAIL PROTECTED]
Modified: incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCocoaCayenne.m
URL:
http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCocoaCayenne.m?view=diff&rev=451134&r1=451133&r2=451134
==============================================================================
--- incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCocoaCayenne.m
(original)
+++ incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYCocoaCayenne.m Thu
Sep 28 22:31:56 2006
@@ -25,7 +25,9 @@
+(NSMutableDictionary *)classMapping;
{
NSMutableDictionary *classMapping = [NSMutableDictionary dictionary];
- //[classMapping setObject:@"CAYRemoteSession"
forKey:@"org.apache.cayenne.remote.RemoteSession"];
+
+ // core
+ [classMapping setObject:@"CAYRemoteSession"
forKey:@"org.apache.cayenne.remote.RemoteSession"];
[classMapping setObject:@"CAYNamedQuery"
forKey:@"org.apache.cayenne.query.NamedQuery"];
[classMapping setObject:@"CAYRelationshipQuery"
forKey:@"org.apache.cayenne.query.RelationshipQuery"];
[classMapping setObject:@"CAYGenericResponse"
forKey:@"org.apache.cayenne.util.GenericResponse"];
@@ -35,6 +37,8 @@
[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"];
+ [classMapping setObject:@"CAYCayenneRuntimeException"
forKey:@"org.apache.cayenne.CayenneRuntimeException"];
+ [classMapping setObject:@"CAYMissingSessionException"
forKey:@"org.apache.cayenne.remote.service.MissingSessionException"];
// message
[classMapping setObject:@"CAYBootstrapMessage"
forKey:@"org.apache.cayenne.remote.BootstrapMessage"];
@@ -50,6 +54,11 @@
[classMapping setObject:@"CAYArcCreateOperation"
forKey:@"org.apache.cayenne.graph.ArcCreateOperation"];
[classMapping setObject:@"CAYArcDeleteOperation"
forKey:@"org.apache.cayenne.graph.ArcDeleteOperation"];
+ // validation
+ [classMapping setObject:@"CAYValidationException"
forKey:@"org.apache.cayenne.validation.ValidationException"];
+ [classMapping setObject:@"CAYBeanValidationFailure"
forKey:@"org.apache.cayenne.validation.BeanValidationFailure"];
+ [classMapping setObject:@"CAYValidationResult"
forKey:@"org.apache.cayenne.validation.ValidationResult"];
+
return classMapping;
}
Added:
incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYMissingSessionException.h
URL:
http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYMissingSessionException.h?view=auto&rev=451134
==============================================================================
---
incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYMissingSessionException.h
(added)
+++
incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYMissingSessionException.h
Thu Sep 28 22:31:56 2006
@@ -0,0 +1,28 @@
+/*****************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+****************************************************************/
+
+#import <Cocoa/Cocoa.h>
+
+#import "CAYCayenneRuntimeException.h"
+
[EMAIL PROTECTED] CAYMissingSessionException : CAYCayenneRuntimeException
<NSCoding> {
+
+}
+
[EMAIL PROTECTED]
Added:
incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYMissingSessionException.m
URL:
http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYMissingSessionException.m?view=auto&rev=451134
==============================================================================
---
incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYMissingSessionException.m
(added)
+++
incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYMissingSessionException.m
Thu Sep 28 22:31:56 2006
@@ -0,0 +1,36 @@
+/*****************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+****************************************************************/
+
+#import "CAYMissingSessionException.h"
+
+
[EMAIL PROTECTED] CAYMissingSessionException
+
+-(id)initWithCoder:(NSCoder*)coder
+{
+ [super initWithCoder:coder];
+ return self;
+}
+
+-(void)encodeWithCoder:(NSCoder*)coder
+{
+ [super encodeWithCoder:coder];
+}
+
[EMAIL PROTECTED]