Author: kelvingoodson
Date: Tue Nov 13 03:26:14 2007
New Revision: 594488
URL: http://svn.apache.org/viewvc?rev=594488&view=rev
Log:
Fix for TUSCANY-1811
Modified:
incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DataObjectBase.java
incubator/tuscany/java/sdo/tools-test/src/main/resources/CustomerAccount.xsd
incubator/tuscany/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryGenTestCase.java
Modified:
incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DataObjectBase.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DataObjectBase.java?rev=594488&r1=594487&r2=594488&view=diff
==============================================================================
---
incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DataObjectBase.java
(original)
+++
incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DataObjectBase.java
Tue Nov 13 03:26:14 2007
@@ -25,6 +25,7 @@
import org.apache.tuscany.sdo.SDOFactory;
import org.apache.tuscany.sdo.helper.HelperContextImpl;
import org.apache.tuscany.sdo.util.BasicSequence;
+import org.apache.tuscany.sdo.util.DataObjectUtil;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.URI;
@@ -32,6 +33,8 @@
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.EStructuralFeature.Setting;
+import org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
@@ -48,6 +51,7 @@
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.util.InternalEList;
+import commonj.sdo.Property;
import commonj.sdo.Sequence;
import commonj.sdo.Type;
@@ -75,24 +79,38 @@
int RESOLVE = Notification.RESOLVE;
}
- protected void notify(int changeKind, int property, Object oldValue, Object
newValue)
+ /**
+ * notify methods for types: boolean, byte, char, double, float, int, long,
short, and Object
+ */
+
+ protected void notify(int changeKind, int property, boolean oldBooleanValue,
boolean newBooleanValue)
{
- eNotify(new ENotificationImpl(this, Notification.SET, property, oldValue,
newValue));
+ eNotify(new ENotificationImpl(this, Notification.SET, property,
oldBooleanValue, newBooleanValue));
}
-
- protected void notify(int changeKind, int property, Object oldValue, Object
newValue, boolean isSetChange)
+
+ protected void notify(int changeKind, int property, boolean oldBooleanValue,
boolean newBooleanValue, boolean isSetChange)
{
- eNotify(new ENotificationImpl(this, Notification.SET, property, oldValue,
newValue, isSetChange));
+ eNotify(new ENotificationImpl(this, Notification.SET, property,
oldBooleanValue, newBooleanValue, isSetChange));
}
-
- protected void notify(int changeKind, int property, int oldIntValue, int
newIntValue)
+
+ protected void notify(int changeKind, int property, byte oldByteValue, byte
newByteValue)
{
- eNotify(new ENotificationImpl(this, Notification.SET, property,
oldIntValue, newIntValue));
+ eNotify(new ENotificationImpl(this, Notification.SET, property,
oldByteValue, newByteValue));
}
- protected void notify(int changeKind, int property, int oldIntValue, int
newIntValue, boolean isSetChange)
+ protected void notify(int changeKind, int property, byte oldByteValue, byte
newByteValue, boolean isSetChange)
{
- eNotify(new ENotificationImpl(this, Notification.SET, property,
oldIntValue, newIntValue, isSetChange));
+ eNotify(new ENotificationImpl(this, Notification.SET, property,
oldByteValue, newByteValue, isSetChange));
+ }
+
+ protected void notify(int changeKind, int property, char oldCharValue, char
newCharValue)
+ {
+ eNotify(new ENotificationImpl(this, Notification.SET, property,
oldCharValue, newCharValue));
+ }
+
+ protected void notify(int changeKind, int property, char oldCharValue, char
newCharValue, boolean isSetChange)
+ {
+ eNotify(new ENotificationImpl(this, Notification.SET, property,
oldCharValue, newCharValue, isSetChange));
}
protected void notify(int changeKind, int property, double oldDoubleValue,
double newDoubleValue)
@@ -105,14 +123,54 @@
eNotify(new ENotificationImpl(this, Notification.SET, property,
oldDoubleValue, newDoubleValue, isSetChange));
}
- protected void notify(int changeKind, int property, boolean oldBooleanValue,
boolean newBooleanValue)
+ protected void notify(int changeKind, int property, float oldFloatValue,
float newFloatValue)
{
- eNotify(new ENotificationImpl(this, Notification.SET, property,
oldBooleanValue, newBooleanValue));
+ eNotify(new ENotificationImpl(this, Notification.SET, property,
oldFloatValue, newFloatValue));
}
- protected void notify(int changeKind, int property, boolean oldBooleanValue,
boolean newBooleanValue, boolean isSetChange)
+ protected void notify(int changeKind, int property, float oldFloatValue,
float newFloatValue, boolean isSetChange)
+ {
+ eNotify(new ENotificationImpl(this, Notification.SET, property,
oldFloatValue, newFloatValue, isSetChange));
+ }
+
+ protected void notify(int changeKind, int property, int oldIntValue, int
newIntValue)
{
- eNotify(new ENotificationImpl(this, Notification.SET, property,
oldBooleanValue, newBooleanValue, isSetChange));
+ eNotify(new ENotificationImpl(this, Notification.SET, property,
oldIntValue, newIntValue));
+ }
+
+ protected void notify(int changeKind, int property, int oldIntValue, int
newIntValue, boolean isSetChange)
+ {
+ eNotify(new ENotificationImpl(this, Notification.SET, property,
oldIntValue, newIntValue, isSetChange));
+ }
+
+ protected void notify(int changeKind, int property, long oldLongValue, long
newLongValue)
+ {
+ eNotify(new ENotificationImpl(this, Notification.SET, property,
oldLongValue, newLongValue));
+ }
+
+ protected void notify(int changeKind, int property, long oldLongValue, long
newLongValue, boolean isSetChange)
+ {
+ eNotify(new ENotificationImpl(this, Notification.SET, property,
oldLongValue, newLongValue, isSetChange));
+ }
+
+ protected void notify(int changeKind, int property, short oldShortValue,
short newShortValue)
+ {
+ eNotify(new ENotificationImpl(this, Notification.SET, property,
oldShortValue, newShortValue));
+ }
+
+ protected void notify(int changeKind, int property, short oldShortValue,
short newShortValue, boolean isSetChange)
+ {
+ eNotify(new ENotificationImpl(this, Notification.SET, property,
oldShortValue, newShortValue, isSetChange));
+ }
+
+ protected void notify(int changeKind, int property, Object oldValue, Object
newValue)
+ {
+ eNotify(new ENotificationImpl(this, Notification.SET, property,
oldValue, newValue));
+ }
+
+ protected void notify(int changeKind, int property, Object oldValue, Object
newValue, boolean isSetChange)
+ {
+ eNotify(new ENotificationImpl(this, Notification.SET, property,
oldValue, newValue, isSetChange));
}
public interface ListKind
@@ -469,6 +527,7 @@
}
} //DataObjectBase
+
Modified:
incubator/tuscany/java/sdo/tools-test/src/main/resources/CustomerAccount.xsd
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools-test/src/main/resources/CustomerAccount.xsd?rev=594488&r1=594487&r2=594488&view=diff
==============================================================================
---
incubator/tuscany/java/sdo/tools-test/src/main/resources/CustomerAccount.xsd
(original)
+++
incubator/tuscany/java/sdo/tools-test/src/main/resources/CustomerAccount.xsd
Tue Nov 13 03:26:14 2007
@@ -1,38 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
- -->
-<xs:schema xmlns:sdo="commonj.sdo" xmlns:sdoJava="commonj.sdo/java"
xmlns:stn_1="http://example.com/customer"
xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified"
elementFormDefault="qualified" targetNamespace="http://example.com/customer">
+<!--
+ 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.
+-->
+<xs:schema xmlns:sdo="commonj.sdo" xmlns:sdoJava="commonj.sdo/java"
xmlns:stn_1="http://example.com/customer"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified"
elementFormDefault="qualified"
+ targetNamespace="http://example.com/customer">
- <xs:complexType abstract="false" name="Account">
- <xs:sequence/>
- <xs:attribute default="0" name="accountNum" type="xs:int"/>
- </xs:complexType>
+ <xs:complexType abstract="false" name="Account">
+ <xs:sequence />
+ <xs:attribute default="0" name="accountNum" type="xs:int" />
+ <xs:attribute default="0" name="balance" type="xs:float" />
+ </xs:complexType>
- <xs:element name="account" type="stn_1:Account"/>
-
- <xs:complexType abstract="false" name="Customer">
- <xs:sequence>
- <xs:element name="account" type="stn_1:Account"/>
- </xs:sequence>
- <xs:attribute name="firstName" type="xs:string"/>
- </xs:complexType>
-
- <xs:element name="customer" type="stn_1:Customer"/>
+ <xs:element name="account" type="stn_1:Account" />
+
+ <xs:complexType abstract="false" name="Customer">
+ <xs:sequence>
+ <xs:element name="account" type="stn_1:Account" />
+ </xs:sequence>
+ <xs:attribute name="firstName" type="xs:string" />
+ </xs:complexType>
+
+ <xs:element name="customer" type="stn_1:Customer" />
</xs:schema>
Modified:
incubator/tuscany/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryGenTestCase.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryGenTestCase.java?rev=594488&r1=594487&r2=594488&view=diff
==============================================================================
---
incubator/tuscany/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryGenTestCase.java
(original)
+++
incubator/tuscany/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryGenTestCase.java
Tue Nov 13 03:26:14 2007
@@ -111,7 +111,7 @@
assertEquals("in fact 1 Object was changed in the code", 1,
changedDataObjects.size());
}
- public void testChangeSummaryOnDataGraphWithInt() throws Exception {
+ public void testChangeSummaryOnDataGraphWithIntAndFloat() throws Exception
{
HelperContext hc = HelperProvider.getDefaultContext();
CustomerFactory factory = CustomerFactory.INSTANCE;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]