From: Chris M. <cm...@us...> - 2006-08-15 22:48:50
|
User: cmicali Date: 06/08/15 15:48:50 Modified: andromda-cs/conf/test andromda.xml andromda-cs pom.xml andromda-cs/src/main/resources/META-INF/andromda cartridge.xml namespace.xml profile.xml andromda-cs/src/main/resources/templates/cs Enumeration.vsl Interface.vsl ValueObject.vsl andromda-cs/src/test/expected cartridge-output.zip andromda-cs/src/test/expected/org/andromda/cartridges/csharp OrderedValueObject.cs RelatedValueObject.cs SelfReferencingValueObject.cs TemplateTestVO.cs TestEnumeration.cs TestValueObject.cs andromda-cs/src/test/uml CsCartridgeTestModel.xml.zip andromda-nhibernate pom.xml andromda-nhibernate/src/main/resources/templates/nhibernate NHibernateEmbeddedValue.vsl NHibernateEntity.vsl nhibernate.hbm.xml.vsl andromda-nhibernate/src/test/expected cartridge-output.zip andromda-nhibernate/src/test/uml HibernateCartridgeTestModel.xml.zip andromda-nspring/conf/test andromda.xml andromda-nspring pom.xml andromda-nspring/src/main/resources/templates/nspring NSpringDaoFactory.vsl NSpringHibernateDaoBase.vsl NSpringServiceImpl.vsl andromda-nspring/src/test/expected cartridge-output.zip Added: andromda-cs/src/test/expected/org/andromda/cartridges/csharp TestStringEnumeration.cs TestSubInterface1.cs TestSubInterface2.cs TestSubInterface3.cs TestSuperInterface1.cs TestSuperInterface2.cs andromda-nhibernate/src/test/expected/org/andromda/cartridges/nhibernate EntityOne.cs EntityOne.hbm.xml EntityOneImpl.cs EntityTwo.cs EntityTwo.hbm.xml EntityTwoImpl.cs andromda-nspring/src/test/expected/org/andromda/cartridges/nspring IServiceOne.cs IServiceTwoNoStubs.cs ServiceOneBase.cs ServiceOneImpl.cs ServiceTwoNoStubsBase.cs ServiceTwoNoStubsImpl.cs andromda-nspring/src/test/uml NSpringCartridgeTestModel.xml.zip Removed: andromda-cs/src/main/resources/templates/cs Service.vsl ServiceImpl.vsl andromda-nspring/src/test/uml SpringCartridgeTestModel.xml.zip Log: - Removed old java tests, created new simple tests, and enabled tests on NSpring and NHibernate cartriges - Updated all .net templates to use regions, fix whitespace, and use _ before attribute names - Modified and enabled the interface template on the CS cartridge - Fixed entity->entity dependencies in the NHibernate cartridge Revision Changes Path 1.3 +0 -2 cartridges/andromda-cs/conf/test/andromda.xml Index: andromda.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-cs/conf/test/andromda.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- andromda.xml 22 Jun 2006 20:42:08 -0000 1.2 +++ andromda.xml 15 Aug 2006 22:48:42 -0000 1.3 @@ -31,8 +31,6 @@ <property name="overwrite">true</property> <property name="languageMappingsUri">Cs</property> <property name="wrapperMappingsUri">CsWrapper</property> - <property name="services">${test.output.dir}</property> - <property name="service-impls">${test.output.dir}</property> <property name="value-objects">${test.output.dir}</property> <property name="exceptions">${test.output.dir}</property> <property name="enumerations">${test.output.dir}</property> 1.6 +8 -0 cartridges/andromda-cs/pom.xml Index: pom.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-cs/pom.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -r1.5 -r1.6 --- pom.xml 28 Jul 2006 02:45:44 -0000 1.5 +++ pom.xml 15 Aug 2006 22:48:43 -0000 1.6 @@ -20,6 +20,14 @@ <role>Developer</role> </roles> </developer> + <developer> + <name>Chris Micali</name> + <id>chris</id> + <email>ch...@an...</email> + <roles> + <role>Developer</role> + </roles> + </developer> </developers> <build> <plugins> 1.2 +2 -30 cartridges/andromda-cs/src/main/resources/META-INF/andromda/cartridge.xml Index: cartridge.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-cs/src/main/resources/META-INF/andromda/cartridge.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- cartridge.xml 8 Mar 2006 04:10:53 -0000 1.1 +++ cartridge.xml 15 Aug 2006 22:48:43 -0000 1.2 @@ -9,34 +9,6 @@ <!-- cartridge-resource merge-point --> -<!-- - <template - path="templates/cs/Service.vsl" - outputPattern="{0}/{1}.cs" - outlet="services" - overwrite="true"> - <modelElements variable="service"> - <modelElement> - <type name="org.andromda.metafacades.uml.Service"/> - </modelElement> - </modelElements> - </template> ---> - -<!-- - <template - path="templates/cs/ServiceImpl.vsl" - outputPattern="{0}/{1}Impl.cs" - outlet="service-impls" - overwrite="false"> - <modelElements variable="service"> - <modelElement> - <type name="org.andromda.metafacades.uml.Service"/> - </modelElement> - </modelElements> - </template> ---> - <template path="templates/cs/ValueObject.vsl" outputPattern="{0}/{1}.cs" @@ -86,7 +58,7 @@ </modelElements> </template> -<!-- + <template path="templates/cs/Interface.vsl" outputPattern="{0}/{1}.cs" @@ -100,7 +72,7 @@ </modelElement> </modelElements> </template> ---> + <!-- cartridge-template merge-point --> 1.3 +0 -10 cartridges/andromda-cs/src/main/resources/META-INF/andromda/namespace.xml Index: namespace.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-cs/src/main/resources/META-INF/andromda/namespace.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- namespace.xml 28 Jul 2006 02:58:30 -0000 1.2 +++ namespace.xml 15 Aug 2006 22:48:43 -0000 1.3 @@ -12,16 +12,6 @@ <documentation> Defines the locations to which output is generated. </documentation> - <property name="services" required="false"> - <documentation> - The directory to which service interfaces are generated. - </documentation> - </property> - <property name="service-impls" required="false"> - <documentation> - The directory to which service implementation classes are generated - </documentation> - </property> <property name="value-objects" required="false"> <documentation> The directory to which value objects are generated. 1.3 +0 -8 cartridges/andromda-cs/src/main/resources/META-INF/andromda/profile.xml Index: profile.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-cs/src/main/resources/META-INF/andromda/profile.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- profile.xml 28 Jul 2006 02:58:50 -0000 1.2 +++ profile.xml 15 Aug 2006 22:48:43 -0000 1.3 @@ -3,14 +3,6 @@ <profile> <elements> <elementGroup name="Stereotypes"> - <element name="SERVICE"> - <documentation> - Produces C# service classes. This includes both a service interface as well as a - service implemention. - </documentation> - <value>Service</value> - <appliedOnElement>class</appliedOnElement> - </element> <element name="VALUE_OBJECT"> <documentation> Produces Cs value objects. 1.5 +2 -1 cartridges/andromda-cs/src/main/resources/templates/cs/Enumeration.vsl Index: Enumeration.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-cs/src/main/resources/templates/cs/Enumeration.vsl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- Enumeration.vsl 28 Jul 2006 02:39:56 -0000 1.4 +++ Enumeration.vsl 15 Aug 2006 22:48:43 -0000 1.5 @@ -17,6 +17,7 @@ $enumeration.getDocumentation(" /// ") /// </summary> public enum $enumeration.name#if ($stringUtils.isNotBlank($enumType)) :$enumType#end + { #foreach ($literal in $enumeration.literals) #if ($literal.defaultValue) 1.3 +23 -45 cartridges/andromda-cs/src/main/resources/templates/cs/Interface.vsl Index: Interface.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-cs/src/main/resources/templates/cs/Interface.vsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- Interface.vsl 28 Jul 2006 02:09:21 -0000 1.2 +++ Interface.vsl 15 Aug 2006 22:48:43 -0000 1.3 @@ -20,45 +20,23 @@ #end { + // ----- Accessors ----- #foreach($attribute in $interface.attributes) #if ($attribute.visibility == "public") -#if ($attribute.static) /// <summary> $attribute.getDocumentation(" /// ") /// </summary> - /* C# does not support fields in an interface */ - /*public static $attribute.type.fullyQualifiedName $attribute.name = $attribute.defaultValue;*/ -#else - /// <summary> -$attribute.getDocumentation(" /// ") - /// </summary> - $attribute.getterSetterTypeName ${attribute.getterName}(); - - /// <summary> -$attribute.getDocumentation(" /// ") - /// </summary> - void ${attribute.setterName}($attribute.getterSetterTypeName $attribute.name); -#end - -#end + $attribute.getterSetterTypeName ${stringUtils.upperCamelCaseName($attribute.name)} + { + get; +#if (!$attribute.static) + set; #end -#foreach ($associationEnd in $interface.associationEnds) -#set ($target = $associationEnd.otherEnd) -#if ($target.navigable) - /// <summary> - /// Get the $target.name -$target.getDocumentation(" /// ") - /// </summary> - $target.getterSetterTypeName ${target.getterName}(); - - /// <summary> - /// Set the $target.name - /// </summary> - void ${target.setterName}($target.getterSetterTypeName $target.name); + } #end #end - + // ----- Operations ----- #foreach ( $operation in $interface.operations) #if ($operation.visibility == "public") /// <summary> 1.3 +25 -14 cartridges/andromda-cs/src/main/resources/templates/cs/ValueObject.vsl Index: ValueObject.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-cs/src/main/resources/templates/cs/ValueObject.vsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- ValueObject.vsl 28 Jul 2006 02:10:07 -0000 1.2 +++ ValueObject.vsl 15 Aug 2006 22:48:43 -0000 1.3 @@ -19,20 +19,25 @@ : ${class.generalization.fullyQualifiedName} #end { - // ----- Attributes and Associations ----- + + #region Attributes and Associations + ## **** Generate attribute **** #foreach ($attribute in $class.attributes) - private $attribute.getterSetterTypeName $attribute.name; + private $attribute.getterSetterTypeName _$attribute.name; #end ## **** Generate associations **** #foreach ($associationEnd in $class.associationEnds) #set ($target = $associationEnd.otherEnd) #if ($target.navigable) - private $target.getterSetterTypeName $target.name; + private $target.getterSetterTypeName _$target.name; #end #end - // ----- Constructors ----- + #endregion + + #region Constructors + #if (!$class.properties.empty) public ${class.name}() { @@ -57,7 +62,7 @@ #end { #foreach ($property in $class.properties) - this.${property.name} = ${property.name}; + this._${property.name} = ${property.name}; #end } @@ -66,17 +71,20 @@ /// <summary> /// Copy constructor /// </summary> - public ${class.name}(${class.name} otherBean) + public ${class.name}(${class.name} other${class.name}) { - if (otherBean != null) + if (other${class.name} != null) { #foreach ( $property in $class.properties) - this.${property.name} = otherBean.${property.name}; + this._${property.name} = other${class.name}.${stringUtils.upperCamelCaseName($property.name)}; #end } } - // ----- Accessors ----- + #endregion + + #region Properties + ## **** Generate accessors for attributes **** #foreach ($attribute in $class.attributes) /// <summary> @@ -84,8 +92,8 @@ /// </summary> $attribute.visibility $attribute.getterSetterTypeName ${stringUtils.upperCamelCaseName($attribute.name)} { - get { return $attribute.name; } - set { this.$attribute.name = value; } + get { return _$attribute.name; } + set { this._$attribute.name = value; } } #end @@ -98,13 +106,16 @@ /// </summary> public $target.getterSetterTypeName ${stringUtils.upperCamelCaseName($target.name)} { - get { return $target.name; } - set { this.$target.name = value; } + get { return _$target.name; } + set { this._$target.name = value; } } #end #end + #endregion + // ValueObject.vsl merge-point + } #if ($stringUtils.isNotBlank($class.packageName)) } 1.4 +34 -19 cartridges/andromda-cs/src/test/expected/cartridge-output.zip <<Binary file>> 1.2 +22 -11 cartridges/andromda-cs/src/test/expected/org/andromda/cartridges/csharp/OrderedValueObject.cs Index: OrderedValueObject.cs =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-cs/src/test/expected/org/andromda/cartridges/csharp/OrderedValueObject.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- OrderedValueObject.cs 22 Jun 2006 20:28:27 -0000 1.1 +++ OrderedValueObject.cs 15 Aug 2006 22:48:44 -0000 1.2 @@ -18,10 +18,15 @@ [Serializable] public class OrderedValueObject { - // ----- Attributes and Associations ----- - private org.andromda.cartridges.csharp.TestValueObject testValueObject; - // ----- Constructors ----- + #region Attributes and Associations + + private org.andromda.cartridges.csharp.TestValueObject _testValueObject; + + #endregion + + #region Constructors + public OrderedValueObject() { } @@ -33,30 +38,36 @@ org.andromda.cartridges.csharp.TestValueObject testValueObject) { - this.testValueObject = testValueObject; + this._testValueObject = testValueObject; } /// <summary> /// Copy constructor /// </summary> - public OrderedValueObject(OrderedValueObject otherBean) + public OrderedValueObject(OrderedValueObject otherOrderedValueObject) { - if (otherBean != null) + if (otherOrderedValueObject != null) { - this.testValueObject = otherBean.testValueObject; + this._testValueObject = otherOrderedValueObject.TestValueObject; } } - // ----- Accessors ----- + #endregion + + #region Properties + /// <summary> /// /// </summary> public org.andromda.cartridges.csharp.TestValueObject TestValueObject { - get { return testValueObject; } - set { this.testValueObject = value; } + get { return _testValueObject; } + set { this._testValueObject = value; } } + #endregion + // ValueObject.vsl merge-point + } } 1.2 +32 -21 cartridges/andromda-cs/src/test/expected/org/andromda/cartridges/csharp/RelatedValueObject.cs Index: RelatedValueObject.cs =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-cs/src/test/expected/org/andromda/cartridges/csharp/RelatedValueObject.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- RelatedValueObject.cs 22 Jun 2006 20:28:27 -0000 1.1 +++ RelatedValueObject.cs 15 Aug 2006 22:48:44 -0000 1.2 @@ -18,12 +18,17 @@ [Serializable] public class RelatedValueObject { - // ----- Attributes and Associations ----- - private org.andromda.cartridges.csharp.TestSuperInterface1 oneAttribute; - private org.andromda.cartridges.csharp.TestValueObject testValueObject; - private org.andromda.cartridges.csharp.TestEnumeration testEnumeration; - // ----- Constructors ----- + #region Attributes and Associations + + private org.andromda.cartridges.csharp.TestSuperInterface1 _oneAttribute; + private org.andromda.cartridges.csharp.TestValueObject _testValueObject; + private org.andromda.cartridges.csharp.TestEnumeration _testEnumeration; + + #endregion + + #region Constructors + public RelatedValueObject() { } @@ -37,32 +42,35 @@ org.andromda.cartridges.csharp.TestEnumeration testEnumeration) { - this.oneAttribute = oneAttribute; - this.testValueObject = testValueObject; - this.testEnumeration = testEnumeration; + this._oneAttribute = oneAttribute; + this._testValueObject = testValueObject; + this._testEnumeration = testEnumeration; } /// <summary> /// Copy constructor /// </summary> - public RelatedValueObject(RelatedValueObject otherBean) + public RelatedValueObject(RelatedValueObject otherRelatedValueObject) { - if (otherBean != null) + if (otherRelatedValueObject != null) { - this.oneAttribute = otherBean.oneAttribute; - this.testValueObject = otherBean.testValueObject; - this.testEnumeration = otherBean.testEnumeration; + this._oneAttribute = otherRelatedValueObject.OneAttribute; + this._testValueObject = otherRelatedValueObject.TestValueObject; + this._testEnumeration = otherRelatedValueObject.TestEnumeration; } } - // ----- Accessors ----- + #endregion + + #region Properties + /// <summary> /// /// </summary> public org.andromda.cartridges.csharp.TestSuperInterface1 OneAttribute { - get { return oneAttribute; } - set { this.oneAttribute = value; } + get { return _oneAttribute; } + set { this._oneAttribute = value; } } /// <summary> @@ -70,8 +78,8 @@ /// </summary> public org.andromda.cartridges.csharp.TestValueObject TestValueObject { - get { return testValueObject; } - set { this.testValueObject = value; } + get { return _testValueObject; } + set { this._testValueObject = value; } } /// <summary> @@ -79,10 +87,13 @@ /// </summary> public org.andromda.cartridges.csharp.TestEnumeration TestEnumeration { - get { return testEnumeration; } - set { this.testEnumeration = value; } + get { return _testEnumeration; } + set { this._testEnumeration = value; } } + #endregion + // ValueObject.vsl merge-point + } } 1.2 +21 -10 cartridges/andromda-cs/src/test/expected/org/andromda/cartridges/csharp/SelfReferencingValueObject.cs Index: SelfReferencingValueObject.cs =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-cs/src/test/expected/org/andromda/cartridges/csharp/SelfReferencingValueObject.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- SelfReferencingValueObject.cs 22 Jun 2006 20:28:27 -0000 1.1 +++ SelfReferencingValueObject.cs 15 Aug 2006 22:48:44 -0000 1.2 @@ -18,10 +18,15 @@ [Serializable] public class SelfReferencingValueObject { - // ----- Attributes and Associations ----- - private org.andromda.cartridges.csharp.SelfReferencingValueObject reference; - // ----- Constructors ----- + #region Attributes and Associations + + private org.andromda.cartridges.csharp.SelfReferencingValueObject _reference; + + #endregion + + #region Constructors + public SelfReferencingValueObject() { } @@ -29,24 +34,30 @@ /// <summary> /// Copy constructor /// </summary> - public SelfReferencingValueObject(SelfReferencingValueObject otherBean) + public SelfReferencingValueObject(SelfReferencingValueObject otherSelfReferencingValueObject) { - if (otherBean != null) + if (otherSelfReferencingValueObject != null) { - this.reference = otherBean.reference; + this._reference = otherSelfReferencingValueObject.Reference; } } - // ----- Accessors ----- + #endregion + + #region Properties + /// <summary> /// /// </summary> public org.andromda.cartridges.csharp.SelfReferencingValueObject Reference { - get { return reference; } - set { this.reference = value; } + get { return _reference; } + set { this._reference = value; } } + #endregion + // ValueObject.vsl merge-point + } } 1.2 +27 -16 cartridges/andromda-cs/src/test/expected/org/andromda/cartridges/csharp/TemplateTestVO.cs Index: TemplateTestVO.cs =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-cs/src/test/expected/org/andromda/cartridges/csharp/TemplateTestVO.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- TemplateTestVO.cs 22 Jun 2006 20:28:27 -0000 1.1 +++ TemplateTestVO.cs 15 Aug 2006 22:48:44 -0000 1.2 @@ -18,11 +18,16 @@ [Serializable] public class TemplateTestVO { - // ----- Attributes and Associations ----- - private int someAttribute; - private org.andromda.cartridges.csharp.TemplateTestVO[] reference; - // ----- Constructors ----- + #region Attributes and Associations + + private int _someAttribute; + private org.andromda.cartridges.csharp.TemplateTestVO[] _reference; + + #endregion + + #region Constructors + public TemplateTestVO() { } @@ -35,30 +40,33 @@ org.andromda.cartridges.csharp.TemplateTestVO[] reference) { - this.someAttribute = someAttribute; - this.reference = reference; + this._someAttribute = someAttribute; + this._reference = reference; } /// <summary> /// Copy constructor /// </summary> - public TemplateTestVO(TemplateTestVO otherBean) + public TemplateTestVO(TemplateTestVO otherTemplateTestVO) { - if (otherBean != null) + if (otherTemplateTestVO != null) { - this.someAttribute = otherBean.someAttribute; - this.reference = otherBean.reference; + this._someAttribute = otherTemplateTestVO.SomeAttribute; + this._reference = otherTemplateTestVO.Reference; } } - // ----- Accessors ----- + #endregion + + #region Properties + /// <summary> /// /// </summary> public int SomeAttribute { - get { return someAttribute; } - set { this.someAttribute = value; } + get { return _someAttribute; } + set { this._someAttribute = value; } } /// <summary> @@ -66,10 +74,13 @@ /// </summary> public org.andromda.cartridges.csharp.TemplateTestVO[] Reference { - get { return reference; } - set { this.reference = value; } + get { return _reference; } + set { this._reference = value; } } + #endregion + // ValueObject.vsl merge-point + } } 1.2 +1 -1 cartridges/andromda-cs/src/test/expected/org/andromda/cartridges/csharp/TestEnumeration.cs Index: TestEnumeration.cs =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-cs/src/test/expected/org/andromda/cartridges/csharp/TestEnumeration.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- TestEnumeration.cs 22 Jun 2006 20:28:27 -0000 1.1 +++ TestEnumeration.cs 15 Aug 2006 22:48:44 -0000 1.2 @@ -15,7 +15,7 @@ /// <summary> /// /// </summary> - public enum :Long TestEnumeration + public enum TestEnumeration : long { TEST1 = 0, TEST2 = 1203212 1.2 +37 -26 cartridges/andromda-cs/src/test/expected/org/andromda/cartridges/csharp/TestValueObject.cs Index: TestValueObject.cs =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-cs/src/test/expected/org/andromda/cartridges/csharp/TestValueObject.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- TestValueObject.cs 22 Jun 2006 20:28:27 -0000 1.1 +++ TestValueObject.cs 15 Aug 2006 22:48:44 -0000 1.2 @@ -20,13 +20,18 @@ [Serializable] public class TestValueObject { - // ----- Attributes and Associations ----- - private System.Collections.ICollection attributeOne; - private int? attributeTwo; - private org.andromda.cartridges.csharp.RelatedValueObject[] relatedValueObjects; - private org.andromda.cartridges.csharp.OrderedValueObject[] orderedValueObjects; - // ----- Constructors ----- + #region Attributes and Associations + + private System.Collections.ICollection _attributeOne; + private int? _attributeTwo; + private org.andromda.cartridges.csharp.RelatedValueObject[] _relatedValueObjects; + private org.andromda.cartridges.csharp.OrderedValueObject[] _orderedValueObjects; + + #endregion + + #region Constructors + public TestValueObject() { } @@ -41,34 +46,37 @@ org.andromda.cartridges.csharp.OrderedValueObject[] orderedValueObjects) { - this.attributeOne = attributeOne; - this.attributeTwo = attributeTwo; - this.relatedValueObjects = relatedValueObjects; - this.orderedValueObjects = orderedValueObjects; + this._attributeOne = attributeOne; + this._attributeTwo = attributeTwo; + this._relatedValueObjects = relatedValueObjects; + this._orderedValueObjects = orderedValueObjects; } /// <summary> /// Copy constructor /// </summary> - public TestValueObject(TestValueObject otherBean) + public TestValueObject(TestValueObject otherTestValueObject) { - if (otherBean != null) + if (otherTestValueObject != null) { - this.attributeOne = otherBean.attributeOne; - this.attributeTwo = otherBean.attributeTwo; - this.relatedValueObjects = otherBean.relatedValueObjects; - this.orderedValueObjects = otherBean.orderedValueObjects; + this._attributeOne = otherTestValueObject.AttributeOne; + this._attributeTwo = otherTestValueObject.AttributeTwo; + this._relatedValueObjects = otherTestValueObject.RelatedValueObjects; + this._orderedValueObjects = otherTestValueObject.OrderedValueObjects; } } - // ----- Accessors ----- + #endregion + + #region Properties + /// <summary> /// /// </summary> public System.Collections.ICollection AttributeOne { - get { return attributeOne; } - set { this.attributeOne = value; } + get { return _attributeOne; } + set { this._attributeOne = value; } } /// <summary> @@ -76,8 +84,8 @@ /// </summary> public int? AttributeTwo { - get { return attributeTwo; } - set { this.attributeTwo = value; } + get { return _attributeTwo; } + set { this._attributeTwo = value; } } /// <summary> @@ -85,8 +93,8 @@ /// </summary> public org.andromda.cartridges.csharp.RelatedValueObject[] RelatedValueObjects { - get { return relatedValueObjects; } - set { this.relatedValueObjects = value; } + get { return _relatedValueObjects; } + set { this._relatedValueObjects = value; } } /// <summary> @@ -94,10 +102,13 @@ /// </summary> public org.andromda.cartridges.csharp.OrderedValueObject[] OrderedValueObjects { - get { return orderedValueObjects; } - set { this.orderedValueObjects = value; } + get { return _orderedValueObjects; } + set { this._orderedValueObjects = value; } } + #endregion + // ValueObject.vsl merge-point + } } 1.1 cartridges/andromda-cs/src/test/expected/org/andromda/cartridges/csharp/TestStringEnumeration.cs Index: TestStringEnumeration.cs =================================================================== // Name: TestStringEnumeration.cs /** * Example license header for Cs files * * http://www.andromda.org/ */ // // Attention: Generated code! Do not modify by hand! // Generated by: Enumeration.vsl in andromda-cs-cartridge. using System; namespace org.andromda.cartridges.csharp { /// <summary> /// /// </summary> public enum TestStringEnumeration { Test1, Test2 // Enumeration.vsl merge-point } } 1.1 cartridges/andromda-cs/src/test/expected/org/andromda/cartridges/csharp/TestSubInterface1.cs Index: TestSubInterface1.cs =================================================================== // Name: TestSubInterface1.cs /** * Example license header for Cs files * * http://www.andromda.org/ */ // // Attention: Generated code! Do not modify by hand! // Generated by: Interface.vsl in andromda-cs-cartridge. using System; namespace org.andromda.cartridges.csharp { /// <summary> /// /// </summary> public interface TestSubInterface1 : org.andromda.cartridges.csharp.TestSuperInterface1, org.andromda.cartridges.csharp.TestSuperInterface2 { // ----- Accessors ----- // ----- Operations ----- } } 1.1 cartridges/andromda-cs/src/test/expected/org/andromda/cartridges/csharp/TestSubInterface2.cs Index: TestSubInterface2.cs =================================================================== // Name: TestSubInterface2.cs /** * Example license header for Cs files * * http://www.andromda.org/ */ // // Attention: Generated code! Do not modify by hand! // Generated by: Interface.vsl in andromda-cs-cartridge. using System; namespace org.andromda.cartridges.csharp { /// <summary> /// /// </summary> public interface TestSubInterface2 : org.andromda.cartridges.csharp.TestSuperInterface1, org.andromda.cartridges.csharp.TestSuperInterface2 { // ----- Accessors ----- // ----- Operations ----- } } 1.1 cartridges/andromda-cs/src/test/expected/org/andromda/cartridges/csharp/TestSubInterface3.cs Index: TestSubInterface3.cs =================================================================== // Name: TestSubInterface3.cs /** * Example license header for Cs files * * http://www.andromda.org/ */ // // Attention: Generated code! Do not modify by hand! // Generated by: Interface.vsl in andromda-cs-cartridge. using System; namespace org.andromda.cartridges.csharp { /// <summary> /// /// </summary> public interface TestSubInterface3 : org.andromda.cartridges.csharp.TestSuperInterface1 { // ----- Accessors ----- // ----- Operations ----- /// <summary> /// /// </summary> org.andromda.cartridges.csharp.TestSuperInterface2 operation31(float xx); } } 1.1 cartridges/andromda-cs/src/test/expected/org/andromda/cartridges/csharp/TestSuperInterface1.cs Index: TestSuperInterface1.cs =================================================================== // Name: TestSuperInterface1.cs /** * Example license header for Cs files * * http://www.andromda.org/ */ // // Attention: Generated code! Do not modify by hand! // Generated by: Interface.vsl in andromda-cs-cartridge. using System; namespace org.andromda.cartridges.csharp { /// <summary> /// /// </summary> public interface TestSuperInterface1 { // ----- Accessors ----- /// <summary> /// <p> /// This is an arbitrarily simple constant. /// </p> /// </summary> int MYCONSTANT1 { get; } /// <summary> /// <p> /// This is an equally arbitrarily simple constant. /// </p> /// </summary> int MYCONSTANT2 { get; } /// <summary> /// <p> /// This attribute should be generated as a pair of getters/setters. /// </p> /// </summary> String SomeInstanceAttribute { get; set; } // ----- Operations ----- /// <summary> /// /// </summary> void operation1(int i); } } 1.1 cartridges/andromda-cs/src/test/expected/org/andromda/cartridges/csharp/TestSuperInterface2.cs Index: TestSuperInterface2.cs =================================================================== // Name: TestSuperInterface2.cs /** * Example license header for Cs files * * http://www.andromda.org/ */ // // Attention: Generated code! Do not modify by hand! // Generated by: Interface.vsl in andromda-cs-cartridge. using System; namespace org.andromda.cartridges.csharp { /// <summary> /// /// </summary> public interface TestSuperInterface2 { // ----- Accessors ----- // ----- Operations ----- } } 1.4 +69 -80 cartridges/andromda-cs/src/test/uml/CsCartridgeTestModel.xml.zip <<Binary file>> 1.3 +10 -1 cartridges/andromda-nhibernate/pom.xml Index: pom.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nhibernate/pom.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- pom.xml 14 Jun 2006 15:13:36 -0000 1.2 +++ pom.xml 15 Aug 2006 22:48:46 -0000 1.3 @@ -9,6 +9,7 @@ </parent> <artifactId>andromda-nhibernate-cartridge</artifactId> <packaging>andromda-cartridge</packaging> + <version>1.0</version> <name>AndroMDA NHibernate Cartridge</name> <description> Produces NHibernate entities optionally services implemented as Session EJB facades. @@ -27,6 +28,14 @@ </roles> </developer> <developer> + <name>Chris Micali</name> + <id>chris</id> + <email>ch...@an...</email> + <roles> + <role>Developer</role> + </roles> + </developer> + <developer> <name>Louis Coude</name> <id>Louis</id> <email>l_...@ho...</email> @@ -110,7 +119,7 @@ </plugins> </build> <properties> - <maven.test.skip>true</maven.test.skip> + <maven.test.skip>false</maven.test.skip> <model.uri>jar:file:${pom.basedir}/src/main/uml/HibernateMetafacadeModel.xml.zip!/HibernateMetafacadeModel.xml</model.uri> <test.model.uri>jar:file:${pom.basedir}/src/test/uml/HibernateCartridgeTestModel.xml.zip!/HibernateCartridgeTestModel.xml</test.model.uri> </properties> 1.3 +7 -7 cartridges/andromda-nhibernate/src/main/resources/templates/nhibernate/NHibernateEmbeddedValue.vsl Index: NHibernateEmbeddedValue.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nhibernate/src/main/resources/templates/nhibernate/NHibernateEmbeddedValue.vsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- NHibernateEmbeddedValue.vsl 15 Jun 2006 15:01:08 -0000 1.2 +++ NHibernateEmbeddedValue.vsl 15 Aug 2006 22:48:46 -0000 1.3 @@ -22,7 +22,7 @@ { // ----- Attributes ----- #foreach ($attribute in $embeddedValue.attributes) - private $attribute.getterSetterTypeName $attribute.name; + private $attribute.getterSetterTypeName _$attribute.name; #end // ----- Constructors ----- @@ -43,7 +43,7 @@ { $embeddedValue.implementationName obj = new ${embeddedValue.implementationName}(); #foreach ($attribute in $embeddedValue.attributes) - obj.${attribute.name} = ${attribute.name}; + obj._${attribute.name} = ${attribute.name}; #end obj.initialize(); return obj; @@ -58,7 +58,7 @@ { return newInstance( #foreach ($attribute in $embeddedValue.attributes) - otherObject.${attribute.name}#if($velocityCount != $embeddedValue.attributes.size()),#else); + otherObject._${attribute.name}#if($velocityCount != $embeddedValue.attributes.size()),#else); #end #end @@ -89,17 +89,17 @@ #if ($embeddedValue.immutable) public $typeName ${stringUtils.upperCamelCaseName($attribute.name)} { - get { return $attribute.name; } + get { return _$attribute.name; } } protected void ${attribute.setterName}($attribute.getterSetterTypeName $attribute.name) { - this.${attribute.name} = $attribute.name; + this._${attribute.name} = $attribute.name; } #else public $typeName ${stringUtils.upperCamelCaseName($attribute.name)} { - get { return $attribute.name; } - set { this.$attribute.name = value; } + get { return _$attribute.name; } + set { this._$attribute.name = value; } } #end 1.3 +30 -18 cartridges/andromda-nhibernate/src/main/resources/templates/nhibernate/NHibernateEntity.vsl Index: NHibernateEntity.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nhibernate/src/main/resources/templates/nhibernate/NHibernateEntity.vsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- NHibernateEntity.vsl 9 Apr 2006 14:32:40 -0000 1.2 +++ NHibernateEntity.vsl 15 Aug 2006 22:48:46 -0000 1.3 @@ -20,48 +20,52 @@ : $entity.generalization.fullyQualifiedEntityImplementationName #end { + #if ($stringUtils.isNotBlank($entity.hibernateVersionProperty)) #set ($versionProperty = $entity.hibernateVersionProperty) #set ($versionPropertyCapitalized = $stringUtils.capitalize($entity.hibernateVersionProperty)) + #region Hibernate version property + /// <summary> /// Version property managed by Hibernate. /// </summary> - private int $versionProperty; + private int _$versionProperty; - public int get$versionPropertyCapitalized() + public int ${stringUtils.upperCamelCaseName($versionProperty)} { - return this.$versionProperty; + get { return $versionProperty; } + set { this.$versionProperty= value; } } - private void set$versionPropertyCapitalized (int $versionProperty) - { - this.$versionProperty = $versionProperty; - } + #endregion #end - #region Attributes and Associations ----- + #region Attributes and Associations + ## **** Generate attribute **** #foreach ( $attribute in $entity.attributes ) #set ($typeName = $attribute.type.fullyQualifiedName) #if ($attribute.containsEmbeddedObject) #set ($typeName = $attribute.type.fullyQualifiedEntityName) #end - private $typeName $attribute.name; + private $typeName _$attribute.name; #end ## **** Generate associations **** #foreach ($associationEnd in $entity.associationEnds) #set ($target = $associationEnd.otherEnd) #if ($target.navigable || ($associationEnd.child && $entity.foreignHibernateGeneratorClass)) #if ($target.many) - private $target.getterSetterTypeName $target.name = $target.collectionTypeImplementation; + private $target.getterSetterTypeName _$target.name = $target.collectionTypeImplementation; #else - private $target.getterSetterTypeName $target.name; + private $target.getterSetterTypeName _$target.name; #end #end #end + #endregion - #region Accessors + #region Properties + ## **** Generate accessors for attributes **** #foreach ( $attribute in $entity.attributes ) #set ($typeName = $attribute.type.fullyQualifiedName) @@ -73,8 +77,8 @@ /// </summary> $attribute.visibility virtual $typeName ${stringUtils.upperCamelCaseName($attribute.name)} { - get { return $attribute.name; } - set { this.$attribute.name = value; } + get { return _$attribute.name; } + set { this._$attribute.name = value; } } #end @@ -87,12 +91,13 @@ /// </summary> public virtual $target.getterSetterTypeName ${stringUtils.upperCamelCaseName($target.name)} { - get { return $target.name; } - set { this.$target.name = value; } + get { return _$target.name; } + set { this._$target.name = value; } } #end #end + #endregion #region Abstract Methods @@ -105,9 +110,11 @@ $operation.visibility abstract $returnType.fullyQualifiedName $signature; #end + #endregion #region Overriden Methods + #if ($generateEntityEqualsAndHashCode.equalsIgnoreCase('true')) #set ($identifiers = $entity.getIdentifiers(false)) /// <summary> @@ -177,12 +184,14 @@ #end return sb.ToString(); } - #endregion #end + #endregion + #if (!$entity.abstract && ($visualStudioVersion != "2003")) #set ($concreteBaseClass = $entity.generalization && !$entity.generalization.abstract) #region Factory + /// <summary> /// Constructs new instances of <seealso cref="${entity.fullyQualifiedName}"/>. /// </summary> @@ -196,9 +205,12 @@ return new ${entity.fullyQualifiedEntityImplementationName}(); } } + #endregion + #end // HibernateEntity.vsl merge-point + } #if (!$entity.abstract && ($visualStudioVersion == "2003")) #set ($concreteBaseClass = $entity.generalization && !$entity.generalization.abstract) 1.2 +1 -1 cartridges/andromda-nhibernate/src/main/resources/templates/nhibernate/nhibernate.hbm.xml.vsl Index: nhibernate.hbm.xml.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nhibernate/src/main/resources/templates/nhibernate/nhibernate.hbm.xml.vsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- nhibernate.hbm.xml.vsl 8 Mar 2006 04:15:24 -0000 1.1 +++ nhibernate.hbm.xml.vsl 15 Aug 2006 22:48:46 -0000 1.2 @@ -3,7 +3,7 @@ <?xml version="1.0" encoding="$xmlEncoding"?> <!-- Name: ${entity.entityName}.hbm.xml - license-header java merge-point + license-header hbm merge-point Attention: Generated code! Do not modify by hand! Generated by: nhibernate.hbm.xml.vsl in andromda-nhibernate-cartridge. 1.2 +25 -711 cartridges/andromda-nhibernate/src/test/expected/cartridge-output.zip <<Binary file>> 1.2 +46 -197 cartridges/andromda-nhibernate/src/test/uml/HibernateCartridgeTestModel.xml.zip <<Binary file>> 1.2 +7 -1 cartridges/andromda-nspring/conf/test/andromda.xml Index: andromda.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nspring/conf/test/andromda.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- andromda.xml 8 Mar 2006 04:18:50 -0000 1.1 +++ andromda.xml 15 Aug 2006 22:48:47 -0000 1.2 @@ -35,8 +35,14 @@ <property name="hibernateQueryCacheFactory">net.sf.hibernate.cache.StandardQueryCacheFactory</property> <property name="hibernateInheritanceStrategy">subclass</property> <property name="springTypesPackage">${application.package}.Domain</property> + + <!-- File output locations --> <property name="daos">${test.output.dir}</property> <property name="dao-impls">${test.output.dir}</property> + <property name="services">${test.output.dir}</property> + <property name="service-interfaces">${test.output.dir}</property> + <property name="service-impls">${test.output.dir}</property> + </properties> </namespace> </namespaces> 1.3 +10 -2 cartridges/andromda-nspring/pom.xml Index: pom.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nspring/pom.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- pom.xml 14 Jun 2006 15:13:36 -0000 1.2 +++ pom.xml 15 Aug 2006 22:48:47 -0000 1.3 @@ -20,6 +20,14 @@ <role>Developer</role> </roles> </developer> + <developer> + <name>Chris Micali</name> + <id>chris</id> + <email>ch...@an...</email> + <roles> + <role>Developer</role> + </roles> + </developer> </developers> <dependencies> <dependency> @@ -102,9 +110,9 @@ </plugins> </build> <properties> - <maven.test.skip>true</maven.test.skip> + <maven.test.skip>false</maven.test.skip> <model.uri>jar:file:${pom.basedir}/src/main/uml/SpringMetafacadeModel.xml.zip!/SpringMetafacadeModel.xml</model.uri> - <test.model.uri>jar:file:${pom.basedir}/src/test/uml/SpringCartridgeTestModel.xml.zip!/SpringCartridgeTestModel.xml</test.model.uri> + <test.model.uri>jar:file:${pom.basedir}/src/test/uml/NSpringCartridgeTestModel.xml.zip!/NSpringCartridgeTestModel.xml</test.model.uri> <howto.model.uri>jar:file:${pom.basedir}/src/site/xdocs/resources/howto/HowToModel.xml.zip!/HowToModel.xml</howto.model.uri> </properties> </project> \ No newline at end of file 1.3 +4 -4 cartridges/andromda-nspring/src/main/resources/templates/nspring/NSpringDaoFactory.vsl Index: NSpringDaoFactory.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nspring/src/main/resources/templates/nspring/NSpringDaoFactory.vsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- NSpringDaoFactory.vsl 25 Mar 2006 03:45:12 -0000 1.2 +++ NSpringDaoFactory.vsl 15 Aug 2006 22:48:47 -0000 1.3 @@ -22,13 +22,13 @@ { #foreach($entity in $entities) - private static ${entity.packageName}.I${entity.entityName}Dao ${entity.entityName}Dao = null; + private static ${entity.packageName}.I${entity.entityName}Dao _${entity.entityName}Dao = null; public static ${entity.packageName}.I${entity.entityName}Dao Get${entity.entityName}Dao() { - if (${entity.entityName}Dao == null) - ${entity.entityName}Dao = new ${entity.packageName}.${entity.entityName}DaoImpl(); - return ${entity.entityName}Dao; + if (_${entity.entityName}Dao == null) + _${entity.entityName}Dao = new ${entity.packageName}.${entity.entityName}DaoImpl(); + return _${entity.entityName}Dao; } #end 1.5 +5 -15 cartridges/andromda-nspring/src/main/resources/templates/nspring/NSpringHibernateDaoBase.vsl Index: NSpringHibernateDaoBase.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nspring/src/main/resources/templates/nspring/NSpringHibernateDaoBase.vsl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- NSpringHibernateDaoBase.vsl 15 Jun 2006 14:59:55 -0000 1.4 +++ NSpringHibernateDaoBase.vsl 15 Aug 2006 22:48:47 -0000 1.5 @@ -57,25 +57,15 @@ #end #foreach($entityRef in $entity.entityReferences) - private $entityRef.targetElement.fullyQualifiedDaoName $entityRef.daoName; - - /// <summary> - /// Sets the reference to <code>$entityRef.daoName</code>. - /// </summary> - public void ${entityRef.daoSetterName}($entityRef.targetElement.fullyQualifiedDaoName $entityRef.daoName) +#set ($daoPropertyName = "$stringUtils.capitalize($entityRef.name)Dao") + /// <summary>Property to access $daoPropertyName</summary> + protected $entityRef.targetElement.fullyQualifiedDaoName $daoPropertyName { - this.$entityRef.daoName = $entityRef.daoName; - } - - /// <summary> - /// Gets the reference to <code>$entityRef.daoName</code>. - /// </summary> - protected $entityRef.targetElement.fullyQualifiedDaoName ${entityRef.daoGetterName}() - { - return this.$entityRef.daoName; + get { return ${springTypesPackage}.DaoFactory.Get$daoPropertyName(); } } #end + #set ($identifier = $entity.identifiers.iterator().next()) #set ($argumentName = $stringUtils.uncapitalize($entity.name)) /// <summary> 1.2 +1 -1 cartridges/andromda-nspring/src/main/resources/templates/nspring/NSpringServiceImpl.vsl Index: NSpringServiceImpl.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nspring/src/main/resources/templates/nspring/NSpringServiceImpl.vsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- NSpringServiceImpl.vsl 15 Jun 2006 14:59:55 -0000 1.1 +++ NSpringServiceImpl.vsl 15 Aug 2006 22:48:47 -0000 1.2 @@ -37,7 +37,7 @@ #if ($operation.returnTypePresent) return $operation.returnType.javaNullString; #else - throw new InvalidOperationException("${service.fullyQualifiedName}.${operation.implementationSignature} Not implemented!"); + throw new Exception("${service.fullyQualifiedName}.${operation.implementationSignature} is not implemented."); #end } 1.2 +19 -825 cartridges/andromda-nspring/src/test/expected/cartridge-output.zip <<Binary file>> 1.1 cartridges/andromda-nhibernate/src/test/expected/org/andromda/cartridges/nhibernate/EntityOne.cs Index: EntityOne.cs =================================================================== // Name: EntityOne.cs // license-header cs merge-point // // Attention: Generated code! Do not modify by hand! // Generated by: HibernateEntity.vsl in andromda-nhibernate-cartridge. using System; namespace org.andromda.cartridges.nhibernate { /// <summary> /// /// </summary> [Serializable] public abstract class EntityOne { #region Hibernate version property /// <summary> /// Version property managed by Hibernate. /// </summary> private int _version; public int Version { get { return version; } set { this.version= value; } } #endregion #region Attributes and Associations private long _longAttribute; private org.andromda.cartridges.nhibernate.string _stringAttribute; private DateTime? _dateAttribute; private long? _id; private Iesi.Collections.ISet _entityTwos = new Iesi.Collections.HashedSet(); #endregion #region Properties /// <summary> /// /// </summary> public virtual long LongAttribute { get { return _longAttribute; } set { this._longAttribute = value; } } /// <summary> /// /// </summary> public virtual org.andromda.cartridges.nhibernate.string StringAttribute { get { return _stringAttribute; } set { this._stringAttribute = value; } } /// <summary> /// /// </summary> public virtual DateTime? DateAttribute { get { return _dateAttribute; } set { this._dateAttribute = value; } } /// <summary> /// /// </summary> public virtual long? Id { get { return _id; } set { this._id = value; } } /// <summary> /// /// </summary> public virtual Iesi.Collections.ISet EntityTwos { get { return _entityTwos; } set { this._entityTwos = value; } } #endregion #region Abstract Methods /// <summary> /// /// </summary> public abstract void operationOne(); #endregion #region Overriden Methods /// <summary> /// Returns <code>true</code> if the argument is a EntityOne instance and all identifiers for this entity /// equal the identifiers of the argument entity. Returns <code>false</code> otherwise. /// </summary> public override bool Equals(Object obj) { if (this == obj) { return true; } if (GetType() != obj.GetType()) { return false; } EntityOne that = (EntityOne)obj; if (this.Id == null || that.Id == null || !this.Id.Equals(that.Id)) { return false; } return true; } /// <summary> /// Returns a hash code based on this entity's identifiers. /// </summary> public override int GetHashCode() { int hashCode = 0; hashCode = 29 * hashCode + (Id == null ? 0 : Id.GetHashCode()); return hashCode; } /// <summary> /// Returns a String representation of this Entity /// </summary> public override String ToString() { System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append("EntityOne: "); sb.Append("longAttribute").Append('=').Append(LongAttribute).Append(", "); sb.Append("stringAttribute").Append('=').Append(StringAttribute).Append(", "); sb... [truncated message content] |