|
From: Chris M. <cm...@us...> - 2007-08-01 04:13:28
|
User: cmicali
Date: 07/07/31 21:13:30
Modified: andromda-nhibernate/src/main/resources/templates/nhibernate
NHibernateEmbeddedValue.vsl
NHibernateEmbeddedValueImpl.vsl
NHibernateEntity.vsl NHibernateEntityImpl.vsl
NHibernateEntityImplManual.vsl
NHibernateEnumeration.vsl nhibernate.cfg.xml.vsl
nhibernate.hbm.xml.vm nhibernate.hbm.xml.vsl
Log:
- Updated cart versions to 1.2-SNAPSHOT
- Changed base/impl scheme to partial classes
- Updated NH cartridge to NHibernate v1.2
Revision Changes Path
1.6 +5 -5 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.5
retrieving revision 1.6
diff -u -w -r1.5 -r1.6
--- NHibernateEmbeddedValue.vsl 18 Oct 2006 12:37:31 -0000 1.5
+++ NHibernateEmbeddedValue.vsl 1 Aug 2007 04:13:28 -0000 1.6
@@ -1,5 +1,5 @@
-#set ($generatedFile = "${embeddedValue.packagePath}/${embeddedValue.name}.cs")
-// Name: ${embeddedValue.name}.cs
+#set ($generatedFile = "${embeddedValue.packagePath}/${embeddedValue.name}.g.cs")
+// Name: ${embeddedValue.name}.g.cs
// license-header cs merge-point
//
// Attention: Generated code! Do not modify by hand!
@@ -15,7 +15,7 @@
$embeddedValue.getDocumentation(" /// ")
/// </summary>
[Serializable]
- public abstract class $embeddedValue.name
+ public partial class $embeddedValue.name
#if($embeddedValue.generalization)
: $embeddedValue.generalization.fullyQualifiedName
#end
@@ -41,7 +41,7 @@
#end
{
- $embeddedValue.implementationName obj = new ${embeddedValue.implementationName}();
+ $embeddedValue.name obj = new ${embeddedValue.name}();
#foreach ($attribute in $embeddedValue.attributes)
obj._${attribute.name} = ${attribute.name};
#end
1.4 +4 -6 cartridges/andromda-nhibernate/src/main/resources/templates/nhibernate/NHibernateEmbeddedValueImpl.vsl
Index: NHibernateEmbeddedValueImpl.vsl
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nhibernate/src/main/resources/templates/nhibernate/NHibernateEmbeddedValueImpl.vsl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -r1.3 -r1.4
--- NHibernateEmbeddedValueImpl.vsl 15 Jun 2006 15:01:08 -0000 1.3
+++ NHibernateEmbeddedValueImpl.vsl 1 Aug 2007 04:13:28 -0000 1.4
@@ -1,5 +1,5 @@
-#set ($generatedFile = "${embeddedValue.packagePath}/${embeddedValue.implementationName}.cs")
-// Name: ${embeddedValue.implementationName}.cs
+#set ($generatedFile = "${embeddedValue.packagePath}/${embeddedValue.name}.cs")
+// Name: ${embeddedValue.name}.cs
// license-header cs merge-point
//
// This is only generated once! It will never be overwritten.
@@ -14,9 +14,7 @@
/// <summary>
/// <see cref="$embeddedValue.fullyQualifiedName"/>
/// </summary>
- [Serializable]
- public#if ($embeddedValue.abstract) abstract#end class $embeddedValue.implementationName
- : $embeddedValue.fullyQualifiedName
+ public#if ($embeddedValue.abstract) abstract#end partial class $embeddedValue.name
{
#foreach ($operation in $embeddedValue.operations)
/// <summary>
1.8 +9 -9 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.7
retrieving revision 1.8
diff -u -w -r1.7 -r1.8
--- NHibernateEntity.vsl 18 Oct 2006 12:37:31 -0000 1.7
+++ NHibernateEntity.vsl 1 Aug 2007 04:13:28 -0000 1.8
@@ -1,5 +1,5 @@
-#set ($generatedFile = "${entity.packagePath}/${entity.entityName}.cs")
-// Name: ${entity.entityName}.cs
+#set ($generatedFile = "${entity.packagePath}/${entity.entityName}.g.cs")
+// Name: ${entity.entityName}.g.cs
// license-header cs merge-point
//
// Attention: Generated code! Do not modify by hand!
@@ -15,9 +15,9 @@
$entity.getDocumentation(" /// ")
/// </summary>
[Serializable]
- public abstract class $entity.entityName
+ public partial class $entity.entityName
#if($entity.generalization)
- : $entity.generalization.fullyQualifiedEntityImplementationName
+ : $entity.generalization.fullyQualifiedEntityName
#end
{
@@ -121,7 +121,7 @@
#if ($identifiers.empty)
/// This entity does not have any identifiers
#if ($entity.generalization)
- /// but since it extends the <code>$entity.generalization.fullyQualifiedEntityImplementationName</code> class
+ /// but since it extends the <code>$entity.generalization.fullyQualifiedEntityName</code> class
/// it will simply delegate the call up there.
///
/// <see cref="$entity.generalization.fullyQualifiedEntityName#Equals(Object)"/>
@@ -149,7 +149,7 @@
#if ($identifiers.empty)
/// This entity does not have any identifiers
#if ($entity.generalization)
- /// but since it extends the <code>$entity.generalization.fullyQualifiedEntityImplementationName</code> class
+ /// but since it extends the <code>$entity.generalization.fullyQualifiedEntityName</code> class
/// it will simply delegate the call up there.
///
/// <see cref="$entity.generalization.fullyQualifiedEntityName#GetHashCode()"/>
@@ -202,7 +202,7 @@
/// </summary>
public static $entity.fullyQualifiedName NewInstance()
{
- return new ${entity.fullyQualifiedEntityImplementationName}();
+ return new ${entity.fullyQualifiedEntityName}();
}
}
@@ -225,7 +225,7 @@
/// </summary>
public static $entity.fullyQualifiedName NewInstance()
{
- return new ${entity.fullyQualifiedEntityImplementationName}();
+ return new ${entity.fullyQualifiedEntityName}();
}
}
#endregion
1.4 +4 -6 cartridges/andromda-nhibernate/src/main/resources/templates/nhibernate/NHibernateEntityImpl.vsl
Index: NHibernateEntityImpl.vsl
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nhibernate/src/main/resources/templates/nhibernate/NHibernateEntityImpl.vsl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -r1.3 -r1.4
--- NHibernateEntityImpl.vsl 18 Oct 2006 12:37:31 -0000 1.3
+++ NHibernateEntityImpl.vsl 1 Aug 2007 04:13:28 -0000 1.4
@@ -1,5 +1,5 @@
-#set ($generatedFile = "${entity.packagePath}/${entity.entityImplementationName}.cs")
-// Name: ${entity.entityImplementationName}.cs
+#set ($generatedFile = "${entity.packagePath}/${entity.entityName}.cs")
+// Name: ${entity.entityName}.cs
// license-header cs merge-point
//
// Attention: Generated code! Do not modify by hand!
@@ -14,9 +14,7 @@
/// <summary>
/// <see cref="$entity.fullyQualifiedEntityName"/>
/// </summary>
- [Serializable]
- public#if ($entity.abstract) abstract#end class $entity.entityImplementationName
- : $entity.fullyQualifiedEntityName
+ public#if ($entity.abstract) abstract#end partial class $entity.entityName
{
// NHibernateEntityImpl.vsl merge-point
}
1.3 +4 -6 cartridges/andromda-nhibernate/src/main/resources/templates/nhibernate/NHibernateEntityImplManual.vsl
Index: NHibernateEntityImplManual.vsl
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nhibernate/src/main/resources/templates/nhibernate/NHibernateEntityImplManual.vsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- NHibernateEntityImplManual.vsl 9 Apr 2006 14:32:40 -0000 1.2
+++ NHibernateEntityImplManual.vsl 1 Aug 2007 04:13:29 -0000 1.3
@@ -1,5 +1,5 @@
-#set ($generatedFile = "${entity.packagePath}/${entity.entityImplementationName}.cs")
-// Name: ${entity.entityImplementationName}.cs
+#set ($generatedFile = "${entity.packagePath}/${entity.entityName}.cs")
+// Name: ${entity.entityName}.cs
// license-header cs merge-point
//
// This is only generated once! It will never be overwritten.
@@ -14,9 +14,7 @@
/// <summary>
/// <see cref="$entity.fullyQualifiedEntityName"/>
/// </summary>
- [Serializable]
- public#if ($entity.abstract) abstract#end class $entity.entityImplementationName
- : $entity.fullyQualifiedEntityName
+ public#if ($entity.abstract) abstract#end partial class $entity.entityName
{
#foreach ($operation in $entity.businessOperations)
/// <summary>
1.3 +1 -1 cartridges/andromda-nhibernate/src/main/resources/templates/nhibernate/NHibernateEnumeration.vsl
Index: NHibernateEnumeration.vsl
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nhibernate/src/main/resources/templates/nhibernate/NHibernateEnumeration.vsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
1.2 +1 -1 cartridges/andromda-nhibernate/src/main/resources/templates/nhibernate/nhibernate.cfg.xml.vsl
Index: nhibernate.cfg.xml.vsl
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nhibernate/src/main/resources/templates/nhibernate/nhibernate.cfg.xml.vsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -r1.1 -r1.2
--- nhibernate.cfg.xml.vsl 8 Mar 2006 04:15:24 -0000 1.1
+++ nhibernate.cfg.xml.vsl 1 Aug 2007 04:13:29 -0000 1.2
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="$xmlEncoding"?>
+<?xml version="1.0" encoding="utf-8"?>
<!--
Attention: Generated code! Do not modify by hand!
Generated by: hibernate.cfg.xml.vsl in andromda-nhibernate-cartridge.
1.3 +9 -9 cartridges/andromda-nhibernate/src/main/resources/templates/nhibernate/nhibernate.hbm.xml.vm
Index: nhibernate.hbm.xml.vm
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nhibernate/src/main/resources/templates/nhibernate/nhibernate.hbm.xml.vm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- nhibernate.hbm.xml.vm 18 Oct 2006 12:30:44 -0000 1.2
+++ nhibernate.hbm.xml.vm 1 Aug 2007 04:13:29 -0000 1.3
@@ -11,7 +11,7 @@
#set ($fullyQualifiedPropertyType = "$attribute.type.fullyQualifiedHibernateType, ${commonAssemblyName}")
#end
#if ($attribute.containsEmbeddedObject)
- <component name="$stringUtils.upperCamelCaseName($attribute.name)" class="${attribute.type.packageName}.${attribute.type.implementationName}, ${coreAssemblyName}">
+ <component name="$stringUtils.upperCamelCaseName($attribute.name)" class="${attribute.type.packageName}.${attribute.type.name}, ${coreAssemblyName}">
## render the properties of the embedded type
#set ($sqlPrefix = $attribute.columnName)
#renderPropertiesAndAssociations($attribute.type $sqlPrefix)
@@ -34,17 +34,17 @@
#if ($sourceEnd.one2One)
#if ($sourceEnd.one2OnePrimary || (!$sourceEnd.navigable && !$entity.foreignHibernateGeneratorClass))
#if ($otherEnd.type.foreignHibernateGeneratorClass)
- <one-to-one name="$stringUtils.upperCamelCaseName($otherEnd.name)" class="$otherEnd.type.fullyQualifiedEntityImplementationName, ${coreAssemblyName}" outer-join="$otherEnd.outerJoin"#if ($otherEnd.hibernateCascade) cascade="$otherEnd.hibernateCascade"#end/>
+ <one-to-one name="$stringUtils.upperCamelCaseName($otherEnd.name)" class="$otherEnd.type.fullyQualifiedEntityName, ${coreAssemblyName}" outer-join="$otherEnd.outerJoin"#if ($otherEnd.hibernateCascade) cascade="$otherEnd.hibernateCascade"#end/>
#else
- <many-to-one name="$stringUtils.upperCamelCaseName($otherEnd.name)" class="$otherEnd.type.fullyQualifiedEntityImplementationName, ${coreAssemblyName}" foreign-key="$otherEnd.foreignKeyConstraintName" outer-join="$otherEnd.outerJoin"#if ($otherEnd.hibernateCascade) cascade="$otherEnd.hibernateCascade"#end#if($otherEnd.columnIndex) index="$otherEnd.columnIndex"#end>
+ <many-to-one name="$stringUtils.upperCamelCaseName($otherEnd.name)" class="$otherEnd.type.fullyQualifiedEntityName, ${coreAssemblyName}" foreign-key="$otherEnd.foreignKeyConstraintName" outer-join="$otherEnd.outerJoin"#if ($otherEnd.hibernateCascade) cascade="$otherEnd.hibernateCascade"#end#if($otherEnd.columnIndex) index="$otherEnd.columnIndex"#end>
<column name="$otherEnd.columnName" not-null="$otherEnd.required" sql-type="$otherEnd.sqlType" unique="true"/>
</many-to-one>
#end
#else
#if ($entity.foreignHibernateGeneratorClass)
- <one-to-one name="$stringUtils.upperCamelCaseName($otherEnd.name)" class="$otherEnd.type.fullyQualifiedEntityImplementationName, ${coreAssemblyName}" foreign-key="$otherEnd.foreignKeyConstraintName" outer-join="$otherEnd.outerJoin"#if ($otherEnd.hibernateCascade) cascade="$otherEnd.hibernateCascade"#end constrained="true"/>
+ <one-to-one name="$stringUtils.upperCamelCaseName($otherEnd.name)" class="$otherEnd.type.fullyQualifiedEntityName, ${coreAssemblyName}" foreign-key="$otherEnd.foreignKeyConstraintName" outer-join="$otherEnd.outerJoin"#if ($otherEnd.hibernateCascade) cascade="$otherEnd.hibernateCascade"#end constrained="true"/>
#else
- <one-to-one name="$stringUtils.upperCamelCaseName($otherEnd.name)" class="$otherEnd.type.fullyQualifiedEntityImplementationName, ${coreAssemblyName}" outer-join="$otherEnd.outerJoin" property-ref="$stringUtils.upperCamelCaseName($sourceEnd.name)"#if ($otherEnd.hibernateCascade) cascade="$otherEnd.hibernateCascade"#end/>
+ <one-to-one name="$stringUtils.upperCamelCaseName($otherEnd.name)" class="$otherEnd.type.fullyQualifiedEntityName, ${coreAssemblyName}" outer-join="$otherEnd.outerJoin" property-ref="$stringUtils.upperCamelCaseName($sourceEnd.name)"#if ($otherEnd.hibernateCascade) cascade="$otherEnd.hibernateCascade"#end/>
#end
#end
#end
@@ -65,10 +65,10 @@
#if ($otherEnd.indexedCollection)
<index column="$otherEnd.collectionIndexName"#if($otherEnd.map) type="$otherEnd.collectionIndexType"#end/>
#end
- <one-to-many class="$otherEnd.type.fullyQualifiedEntityImplementationName, ${coreAssemblyName}"/>
+ <one-to-many class="$otherEnd.type.fullyQualifiedEntityName, ${coreAssemblyName}"/>
</$otherEnd.collectionType>
#elseif ($sourceEnd.many2One)
- <many-to-one name="$stringUtils.upperCamelCaseName($otherEnd.name)" class="$otherEnd.type.fullyQualifiedEntityImplementationName, ${coreAssemblyName}" outer-join="$otherEnd.outerJoin"#if ($otherEnd.hibernateCascade) cascade="$otherEnd.hibernateCascade"#end foreign-key="$otherEnd.foreignKeyConstraintName"#if($otherEnd.columnIndex) index="$otherEnd.columnIndex"#end>
+ <many-to-one name="$stringUtils.upperCamelCaseName($otherEnd.name)" class="$otherEnd.type.fullyQualifiedEntityName, ${coreAssemblyName}" outer-join="$otherEnd.outerJoin"#if ($otherEnd.hibernateCascade) cascade="$otherEnd.hibernateCascade"#end foreign-key="$otherEnd.foreignKeyConstraintName"#if($otherEnd.columnIndex) index="$otherEnd.columnIndex"#end>
<column name="$otherEnd.columnName" not-null="$otherEnd.required" sql-type="$otherEnd.sqlType"/>
</many-to-one>
#elseif ($sourceEnd.many2Many)
@@ -76,7 +76,7 @@
<key foreign-key="$sourceEnd.foreignKeyConstraintName">
<column name="$sourceEnd.columnName" sql-type="$sourceEnd.sqlType"/>
</key>
- <many-to-many class="$otherEnd.type.fullyQualifiedEntityImplementationName, ${coreAssemblyName}" foreign-key="$otherEnd.foreignKeyConstraintName">
+ <many-to-many class="$otherEnd.type.fullyQualifiedEntityName, ${coreAssemblyName}" foreign-key="$otherEnd.foreignKeyConstraintName">
<column name="$otherEnd.columnName" sql-type="$otherEnd.sqlType"#if($otherEnd.columnIndex) index="$otherEnd.columnIndex"#end/>
</many-to-many>
</$otherEnd.collectionType>
@@ -90,7 +90,7 @@
##
#macro (renderSubClass $entity)
## Should only get get invoked for inheritance class or subclass.
- <$entity.mappingClassName name="$entity.fullyQualifiedEntityImplementationName, ${coreAssemblyName}"#if($entity.tableRequired) table="$entity.tableName"#else discriminator-value="$entity.entityImplementationName"#end lazy="$entity.lazy"#if($entity.hibernateProxy) proxy="$entity.fullyQualifiedEntityImplementationName"#end dynamic-insert="$entity.dynamicInsert" dynamic-update="$entity.dynamicUpdate">
+ <$entity.mappingClassName name="$entity.fullyQualifiedEntityName, ${coreAssemblyName}"#if($entity.tableRequired) table="$entity.tableName"#else discriminator-value="$entity.entityName"#end lazy="$entity.lazy"#if($entity.hibernateProxy) proxy="$entity.fullyQualifiedEntityName"#end dynamic-insert="$entity.dynamicInsert" dynamic-update="$entity.dynamicUpdate">
#if($entity.subclassKeyColumn)
<key foreign-key="${entity.tableName}_INHERITANCE_FKC">
<column name="$entity.subclassKeyColumn" sql-type="$identifier.sqlType"/>
1.5 +4 -4 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.4
retrieving revision 1.5
diff -u -w -r1.4 -r1.5
--- nhibernate.hbm.xml.vsl 10 Jan 2007 20:18:51 -0000 1.4
+++ nhibernate.hbm.xml.vsl 1 Aug 2007 04:13:29 -0000 1.5
@@ -9,17 +9,17 @@
Generated by: nhibernate.hbm.xml.vsl in andromda-nhibernate-cartridge.
-->
<hibernate-mapping
- xmlns="urn:nhibernate-mapping-2.0"
+ xmlns="urn:nhibernate-mapping-2.2"
default-cascade="$entity.hibernateDefaultCascade">
<class
- name="$entity.fullyQualifiedEntityImplementationName, ${coreAssemblyName}"
+ name="$entity.fullyQualifiedEntityName, ${coreAssemblyName}"
table="$entity.tableName"
dynamic-insert="$entity.dynamicInsert"
dynamic-update="$entity.dynamicUpdate"
#if ($stringUtils.isNotBlank($entity.schema)) schema="$entity.schema"
#end
- lazy="$entity.lazy"#if ($entity.hibernateProxy) proxy="$entity.fullyQualifiedEntityImplementationName"#end>
+ lazy="$entity.lazy"#if ($entity.hibernateProxy) proxy="$entity.fullyQualifiedEntityName"#end>
#if($hibernateEnableCache.equalsIgnoreCase("true"))
<cache usage="$entity.hibernateCacheType" />
|