|
From: Chris M. <cm...@us...> - 2007-08-01 04:14:23
|
User: cmicali
Date: 07/07/31 21:14:25
Modified: andromda-nspring/src/test/expected cartridge-output.zip
andromda-nspring/src/test/expected/org/andromda/cartridges/nspring
ServiceOneTests.cs ServiceTwoNoStubsTests.cs
Added: andromda-nspring/src/test/expected/org/andromda/cartridges/nspring
ServiceOne.cs ServiceOne.g.cs ServiceTwoNoStubs.cs
ServiceTwoNoStubs.g.cs TestEntity1Dao.cs
TestEntity1Dao.g.cs
Removed: andromda-nspring/src/test/expected/org/andromda/cartridges/nspring
ServiceOneBase.cs ServiceOneImpl.cs
ServiceTwoNoStubsBase.cs ServiceTwoNoStubsImpl.cs
TestEntity1DaoBase.cs TestEntity1DaoImpl.cs
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.7 +54 -64 cartridges/andromda-nspring/src/test/expected/cartridge-output.zip
<<Binary file>>
1.3 +1 -1 cartridges/andromda-nspring/src/test/expected/org/andromda/cartridges/nspring/ServiceOneTests.cs
Index: ServiceOneTests.cs
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nspring/src/test/expected/org/andromda/cartridges/nspring/ServiceOneTests.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- ServiceOneTests.cs 10 Jan 2007 07:20:28 -0000 1.2
+++ ServiceOneTests.cs 1 Aug 2007 04:14:23 -0000 1.3
@@ -31,7 +31,7 @@
{
if (null == _ServiceOne)
{
- _ServiceOne = new org.andromda.cartridges.nspring.ServiceOneImpl();
+ _ServiceOne = new org.andromda.cartridges.nspring.ServiceOne();
}
return _ServiceOne;
}
1.3 +1 -1 cartridges/andromda-nspring/src/test/expected/org/andromda/cartridges/nspring/ServiceTwoNoStubsTests.cs
Index: ServiceTwoNoStubsTests.cs
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nspring/src/test/expected/org/andromda/cartridges/nspring/ServiceTwoNoStubsTests.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- ServiceTwoNoStubsTests.cs 10 Jan 2007 07:20:29 -0000 1.2
+++ ServiceTwoNoStubsTests.cs 1 Aug 2007 04:14:23 -0000 1.3
@@ -31,7 +31,7 @@
{
if (null == _ServiceTwoNoStubs)
{
- _ServiceTwoNoStubs = new org.andromda.cartridges.nspring.ServiceTwoNoStubsImpl();
+ _ServiceTwoNoStubs = new org.andromda.cartridges.nspring.ServiceTwoNoStubs();
}
return _ServiceTwoNoStubs;
}
1.1 cartridges/andromda-nspring/src/test/expected/org/andromda/cartridges/nspring/ServiceOne.cs
Index: ServiceOne.cs
===================================================================
// Name: ServiceOne.cs
// license-header cs merge-point
//
// This is only generated once! It will never be overwritten.
// You can (and have to!) safely modify it by hand.
using System;
using AndroMDA.NHibernateSupport;
namespace org.andromda.cartridges.nspring
{
/// <summary>
/// @see org::andromda::cartridges::nspring::ServiceOne
/// </summary>
public partial class ServiceOne
{
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(ServiceOne));
/// <summary>
/// @see org::andromda::cartridges::nspring::ServiceOne#doSomething()
/// </summary>
protected override datatype::void HandleDoSomething()
{
// put your implementation here
throw new Exception("org::andromda::cartridges::nspring::ServiceOne.HandleDoSomething() is not implemented.");
}
/// <summary>
/// @see org::andromda::cartridges::nspring::ServiceOne#doSomethingElse(datatype::String)
/// </summary>
protected override datatype::long HandleDoSomethingElse(datatype::String param)
{
// put your implementation here
return null;
}
// NSpringServiceImpl.vsl merge-point
}
}
1.1 cartridges/andromda-nspring/src/test/expected/org/andromda/cartridges/nspring/ServiceOne.g.cs
Index: ServiceOne.g.cs
===================================================================
// Name: ServiceOne.cs
// license-header cs merge-point
//
// Attention: Generated code! Do not modify by hand!
// Generated by: NSpringServiceBase.vsl in andromda-nspring-cartridge.
using System;
using AndroMDA.NHibernateSupport;
namespace org.andromda.cartridges.nspring
{
/// <summary>
/// <p>
/// Spring Service base class for <code>org::andromda::cartridges::nspring::ServiceOne</code>,
/// provides access to all services and entities referenced by this service.
/// </p>
///
/// @see org::andromda::cartridges::nspring::ServiceOne
/// </summary>
public partial class ServiceOne
: org.andromda.cartridges.nspring.IServiceOne
{
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(ServiceOne));
/// <summary>
/// @see org::andromda::cartridges::nspring::ServiceOne#doSomething()
/// </summary>
public datatype::void doSomething()
{
SessionManagerFactory.SessionManager.HandleSessionStart();
SessionManagerFactory.SessionManager.BeginTransaction();
try
{
HandleDoSomething();
SessionManagerFactory.SessionManager.CommitTransaction();
}
catch (Exception ex)
{
SessionManagerFactory.SessionManager.RollbackTransaction();
log.Error(ex);
throw ServiceOneException.Create(ex);
}
finally
{
SessionManagerFactory.SessionManager.HandleSessionEnd();
}
}
/// <summary>
/// Performs the core logic for {@link #doSomething()}
/// <summary>
protected abstract datatype::void HandleDoSomething();
/// <summary>
/// @see org::andromda::cartridges::nspring::ServiceOne#doSomethingElse(datatype::String)
/// </summary>
public datatype::long doSomethingElse(datatype::String param)
{
datatype::long result = null;
SessionManagerFactory.SessionManager.HandleSessionStart();
SessionManagerFactory.SessionManager.BeginTransaction();
try
{
result = HandleDoSomethingElse(param);
SessionManagerFactory.SessionManager.CommitTransaction();
}
catch (Exception ex)
{
SessionManagerFactory.SessionManager.RollbackTransaction();
log.Error(ex);
throw ServiceOneException.Create(ex);
}
finally
{
SessionManagerFactory.SessionManager.HandleSessionEnd();
}
return result;
}
/// <summary>
/// Performs the core logic for {@link #doSomethingElse(datatype::String)}
/// <summary>
protected abstract datatype::long HandleDoSomethingElse(datatype::String param);
// NSpringServiceBase.vsl merge-point
}
}
1.1 cartridges/andromda-nspring/src/test/expected/org/andromda/cartridges/nspring/ServiceTwoNoStubs.cs
Index: ServiceTwoNoStubs.cs
===================================================================
// Name: ServiceTwoNoStubs.cs
// license-header cs merge-point
//
// This is only generated once! It will never be overwritten.
// You can (and have to!) safely modify it by hand.
using System;
using AndroMDA.NHibernateSupport;
namespace org.andromda.cartridges.nspring
{
/// <summary>
/// @see org::andromda::cartridges::nspring::ServiceTwoNoStubs
/// </summary>
public partial class ServiceTwoNoStubs
{
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(ServiceTwoNoStubs));
/// <summary>
/// @see org::andromda::cartridges::nspring::ServiceTwoNoStubs#doSomething()
/// </summary>
protected override datatype::void HandleDoSomething()
{
// put your implementation here
throw new Exception("org::andromda::cartridges::nspring::ServiceTwoNoStubs.HandleDoSomething() is not implemented.");
}
/// <summary>
/// @see org::andromda::cartridges::nspring::ServiceTwoNoStubs#doSomethingElse(datatype::String)
/// </summary>
protected override datatype::long HandleDoSomethingElse(datatype::String param)
{
// put your implementation here
return null;
}
// NSpringServiceImpl.vsl merge-point
}
}
1.1 cartridges/andromda-nspring/src/test/expected/org/andromda/cartridges/nspring/ServiceTwoNoStubs.g.cs
Index: ServiceTwoNoStubs.g.cs
===================================================================
// Name: ServiceTwoNoStubs.cs
// license-header cs merge-point
//
// Attention: Generated code! Do not modify by hand!
// Generated by: NSpringServiceBase.vsl in andromda-nspring-cartridge.
using System;
using AndroMDA.NHibernateSupport;
namespace org.andromda.cartridges.nspring
{
/// <summary>
/// <p>
/// Spring Service base class for <code>org::andromda::cartridges::nspring::ServiceTwoNoStubs</code>,
/// provides access to all services and entities referenced by this service.
/// </p>
///
/// @see org::andromda::cartridges::nspring::ServiceTwoNoStubs
/// </summary>
public partial class ServiceTwoNoStubs
: org.andromda.cartridges.nspring.IServiceTwoNoStubs
{
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(ServiceTwoNoStubs));
/// <summary>
/// @see org::andromda::cartridges::nspring::ServiceTwoNoStubs#doSomething()
/// </summary>
public datatype::void doSomething()
{
HandleDoSomething();
}
/// <summary>
/// Performs the core logic for {@link #doSomething()}
/// <summary>
protected abstract datatype::void HandleDoSomething();
/// <summary>
/// @see org::andromda::cartridges::nspring::ServiceTwoNoStubs#doSomethingElse(datatype::String)
/// </summary>
public datatype::long doSomethingElse(datatype::String param)
{
return HandleDoSomethingElse(param);
}
/// <summary>
/// Performs the core logic for {@link #doSomethingElse(datatype::String)}
/// <summary>
protected abstract datatype::long HandleDoSomethingElse(datatype::String param);
// NSpringServiceBase.vsl merge-point
}
}
1.1 cartridges/andromda-nspring/src/test/expected/org/andromda/cartridges/nspring/TestEntity1Dao.cs
Index: TestEntity1Dao.cs
===================================================================
// Name: TestEntity1Dao.cs
// license-header cs merge-point
//
// Attention: Generated code! Do not modify by hand!
// Generated by: NSpringHibernateDaoImpl.vsl in andromda-nspring-cartridge.
using System;
namespace org.andromda.cartridges.nspring
{
/// <summary>
/// <see cref="org::andromda::cartridges::nspring::TestEntity1"/>
/// </summary>
public partial class TestEntity1Dao
{
// NSpringHibernateDaoImpl.vsl merge-point
}
}
1.1 cartridges/andromda-nspring/src/test/expected/org/andromda/cartridges/nspring/TestEntity1Dao.g.cs
Index: TestEntity1Dao.g.cs
===================================================================
// Name: TestEntity1Dao.cs
// license-header cs merge-point
//
// Attention: Generated code! Do not modify by hand!
// Generated by: NSpringHibernateDaoBase.vsl in andromda-nspring-cartridge.
using System;
using NHibernate;
using AndroMDA.NHibernateSupport;
namespace org.andromda.cartridges.nspring
{
/// <summary>
/// <p>
/// Base Spring DAO Class: is able to create, update, remove, load, and find
/// objects of type <code>org.andromda.cartridges.nspring.TestEntity1</code>.
/// </p>
///
/// <see cref="org.andromda.cartridges.nspring.TestEntity1"/>
/// </summary>
public partial class TestEntity1Dao
: NHibernateDaoSupport, org.andromda.cartridges.nspring.ITestEntity1Dao
{
/// <summary>
/// <see cref="org.andromda.cartridges.nspring.ITestEntity1Dao.Load(int, datatype::Long)"/>
/// </summary>
public virtual Object Load(int transform, datatype::Long id)
{
if (id == null)
{
throw new ArgumentNullException(
"TestEntity1.Load - 'id' can not be null");
}
Object entity = Session.Load(typeof(org.andromda.cartridges.nspring.TestEntity1), id);
return TransformEntity(transform, (org::andromda::cartridges::nspring::TestEntity1)entity);
}
/// <summary>
/// <see cref="org.andromda.cartridges.nspring.ITestEntity1Dao.Load(datatype::Long)"/>
/// </summary>
public virtual org.andromda.cartridges.nspring.TestEntity1 Load(datatype::Long id)
{
return (org.andromda.cartridges.nspring.TestEntity1)this.Load((int)TransformTestEntity1.TRANSFORM_NONE, id);
}
/// <summary>
/// <see cref="org.andromda.cartridges.nspring.ITestEntity1Dao.LoadAll()"/>
/// </summary>
public virtual System.Collections.IList LoadAll()
{
return this.LoadAll((int)TransformTestEntity1.TRANSFORM_NONE);
}
/// <summary>
/// <see cref="org.andromda.cartridges.nspring.ITestEntity1Dao.LoadAll(int)" />
/// </summary>
public virtual System.Collections.IList LoadAll(int transform)
{
System.Collections.IList entities = Session.Find("from org.andromda.cartridges.nspring.TestEntity1");
System.Collections.IList results = this.TransformEntities(transform, entities);
return results;
}
/// <summary>
/// <see cref="org.andromda.cartridges.nspring.ITestEntity1Dao.Create(org.andromda.cartridges.nspring.TestEntity1)"/>
/// </summary>
public virtual org.andromda.cartridges.nspring.TestEntity1 Create(org.andromda.cartridges.nspring.TestEntity1 testEntity1)
{
return (org.andromda.cartridges.nspring.TestEntity1)this.Create((int)TransformTestEntity1.TRANSFORM_NONE, testEntity1);
}
/// <summary>
/// <see cref="org.andromda.cartridges.nspring.ITestEntity1Dao.Create(int transform, org.andromda.cartridges.nspring.TestEntity1)"/>
/// </summary>
public virtual Object Create(int transform, org::andromda::cartridges::nspring::TestEntity1 testEntity1)
{
if (testEntity1 == null)
{
throw new ArgumentNullException(
"TestEntity1.Create - 'testEntity1' can not be null");
}
Session.Save(testEntity1);
return this.TransformEntity(transform, testEntity1);
}
/// <summary>
/// <see cref="org.andromda.cartridges.nspring.ITestEntity1Dao.Create(System.Collections.ICollection)"/>
/// </summary>
public virtual System.Collections.ICollection Create(System.Collections.ICollection entities)
{
return Create((int)TransformTestEntity1.TRANSFORM_NONE, entities);
}
/// <summary>
/// <see cref="org.andromda.cartridges.nspring.ITestEntity1Dao.Create(int, System.Collections.ICollection)"/>
/// </summary>
public virtual System.Collections.ICollection Create(int transform, System.Collections.ICollection entities)
{
if (entities == null)
{
throw new ArgumentNullException(
"TestEntity1.Create - 'entities' can not be null");
}
System.Collections.ArrayList result = new System.Collections.ArrayList();
foreach (Object entity in entities)
{
result.Add(Create(transform, (org.andromda.cartridges.nspring.TestEntity1)entity));
}
return result;
}
/// <summary>
/// <see cref="org.andromda.cartridges.nspring.ITestEntity1Dao.Create(datatype::String)"/>
/// </summary>
public virtual org.andromda.cartridges.nspring.TestEntity1 Create(
datatype::String firstName)
{
return (org.andromda.cartridges.nspring.TestEntity1)this.Create((int)TransformTestEntity1.TRANSFORM_NONE, firstName);
}
/// <summary>
/// <see cref="org.andromda.cartridges.nspring.ITestEntity1Dao.Create(int, datatype::String)"/>
/// </summary>
public virtual Object Create(
int transform,
datatype::String firstName)
{
org.andromda.cartridges.nspring.TestEntity1 entity = new org.andromda.cartridges.nspring.TestEntity1();
entity.FirstName = firstName;
return this.Create(transform, entity);
}
/// <summary>
/// <see cref="org.andromda.cartridges.nspring.ITestEntity1Dao.Update(org.andromda.cartridges.nspring.TestEntity1)"/>
/// </summary>
public virtual void Update(org.andromda.cartridges.nspring.TestEntity1 testEntity1)
{
if (testEntity1 == null)
{
throw new ArgumentNullException(
"TestEntity1.Update - 'testEntity1' can not be null");
}
Session.Update(testEntity1);
}
/// <summary>
/// <see cref="org.andromda.cartridges.nspring.ITestEntity1Dao.Update(System.Collections.ICollection)"/>
/// </summary>
public virtual void Update(System.Collections.ICollection entities)
{
if (entities == null)
{
throw new ArgumentNullException(
"TestEntity1.Update - 'entities' can not be null");
}
foreach (Object entity in entities)
{
Session.Update((org.andromda.cartridges.nspring.TestEntity1)entity);
}
}
/// <summary>
/// <see cref="org.andromda.cartridges.nspring.ITestEntity1Dao.Remove(org.andromda.cartridges.nspring.TestEntity1)"/>
/// </summary>
public virtual void Remove(org.andromda.cartridges.nspring.TestEntity1 testEntity1)
{
if (testEntity1 == null)
{
throw new ArgumentNullException(
"TestEntity1.Remove - 'testEntity1' can not be null");
}
Session.Delete(testEntity1);
}
/// <summary>
/// <see cref="org.andromda.cartridges.nspring.ITestEntity1Dao.Remove(datatype::Long)"/>
/// </summary>
public virtual void Remove(datatype::Long id)
{
if (id == null)
{
throw new ArgumentNullException(
"TestEntity1.Remove - 'id' can not be null");
}
org.andromda.cartridges.nspring.TestEntity1 entity = this.Load(id);
if (entity != null)
{
this.Remove(entity);
}
}
/// <summary>
/// <see cref="org.andromda.cartridges.nspring.ITestEntity1Dao.Remove(System.Collections.ICollection)"/>
/// </summary>
public virtual void Remove(System.Collections.ICollection entities)
{
if (entities == null)
{
throw new ArgumentNullException(
"TestEntity1.Remove - 'entities' can not be null");
}
foreach (TestEntity1 entity in entities)
this.Remove(entity);
}
/// <summary>
/// Allows transformation of entities into value objects
/// (or something else for that matter), when the <code>transform</code>
/// flag is set to one of the constants defined in <code>org.andromda.cartridges.nspring.ITestEntity1Dao</code>, please note
/// that the <seealso cref="#TransformTestEntity1.TRANSFORM_NONE"/> constant denotes no transformation, so the entity itself
/// will be returned.
///
/// If the integer argument value is unknown <seealso cref="TRANSFORM_NONE"/> is assumed.
/// </summary>
/// <param name="transform">one of the constants declared in <seealso cref="org.andromda.cartridges.nspring.ITestEntity1Dao"/></param>
/// <param name="entity">an entity that was found</param>
/// <returns>the transformed entity (i.e. new value object, etc) <see cref="#TransformEntities(int,System.Collections.ICollection)"/></returns>
protected Object TransformEntity(int transform, org::andromda::cartridges::nspring::TestEntity1 entity)
{
Object target = null;
if (entity != null)
{
switch (transform)
{
case (int)TransformTestEntity1.TRANSFORM_NONE : // fall-through
default:
target = entity;
break;
}
}
return target;
}
/// <summary>
/// Transforms a collection of entities using the
/// <seealso cref="#TransformEntity(int,org::andromda::cartridges::nspring::TestEntity1)"/> method.
/// <p/>
/// This method is to be used internally only.
/// </summary>
/// <param name="transform">one of the constants declared in <code>org.andromda.cartridges.nspring.ITestEntity1Dao</code></param>
/// <param name="entities">the collection of entities to transform</param>
/// <returns>a new list containing the transformed entities <see cref="#TransformEntity(int,org::andromda::cartridges::nspring::TestEntity1)"/></returns>
protected virtual System.Collections.IList TransformEntities(int transform, System.Collections.ICollection entities)
{
System.Collections.IList entityList = null;
switch (transform)
{
case (int)TransformTestEntity1.TRANSFORM_NONE : // fall-through
default:
// Convert collection to list if necesary
entityList = entities as System.Collections.IList;
if (entityList == null)
entityList = new System.Collections.ArrayList(entities);
break;
}
return entityList;
}
// NSpringHibernateDaoBase.vsl merge-point
}
}
|