69 lines
2.1 KiB
Text
69 lines
2.1 KiB
Text
//***************************************************************************//
|
|
// Legenerálja egy entitás testreszabható leszármazottjának forráskód vázát. //
|
|
//***************************************************************************//
|
|
template GenerateCustomEntity(MClass as ENTITY)
|
|
[BOM]using System;
|
|
using System.Linq;
|
|
using System.Xml;
|
|
using SDA.Framework;
|
|
using SDA.Framework.Classes;
|
|
using SDA.Framework.Entities;
|
|
using SDA.Framework.Query;
|
|
using SDA.Framework.Exceptions;
|
|
using SDA.[ProjectName].Entities;
|
|
|
|
namespace SDA.[ProjectName].CustomEntities
|
|
{
|
|
public partial class Custom[ENTITY.name] : [ENTITY.name]
|
|
{
|
|
public new static Custom[ENTITY.name] GiveAnInstance()
|
|
{
|
|
return (Custom[ENTITY.name])Entities.[ENTITY.name].GiveAnInstance();
|
|
}
|
|
|
|
#region Kézzel írt kód
|
|
//#ACD# M(["CustomEntity(" [ENTITY.guid] ")"])
|
|
|
|
//#end ACD#
|
|
#endregion
|
|
}
|
|
}
|
|
|
|
namespace SDA.[ProjectName].DirectXML
|
|
{
|
|
public class CustomDX[ENTITY.name]BaseSet : DX[ENTITY.name]BaseSet
|
|
{
|
|
#region Kézzel írt kód
|
|
//#ACD# M(["CustomDX" [ENTITY.name] "BaseSet"])
|
|
|
|
//#end ACD#
|
|
#endregion
|
|
}
|
|
|
|
sealed class CustomDX[ENTITY.name]ByID : DX[ENTITY.name]ByID
|
|
{
|
|
public CustomDX[ENTITY.name]ByID(int id)
|
|
: base(id) { }
|
|
|
|
#region Kézzel írt kód
|
|
//#ACD# M(["CustomDX" [ENTITY.name] "ById"])
|
|
|
|
//#end ACD#
|
|
#endregion
|
|
}
|
|
[loop (ENTITY -> Role as STARTROLE -> MAssociation as CURRENTASSOCIATION -> MAssociationEnd as ENDROLE -> MClass as PARTNER where (([STARTROLE.id] != [ENDROLE.id]) and GetStereoType([PARTNER]) == "Entity"))]
|
|
|
|
sealed class CustomDX[ENTITY.name]By[GetRoleName([ENDROLE])]ID : DX[ENTITY.name]By[GetRoleName([ENDROLE])]ID
|
|
{
|
|
public CustomDX[ENTITY.name]By[GetRoleName([ENDROLE])]ID(int [ToLower(GetRoleName([ENDROLE]) "ID")])
|
|
: base([ToLower(GetRoleName([ENDROLE]) "ID")]) { }
|
|
|
|
#region Kézzel írt kód
|
|
//#ACD# M(["CustomDX" [ENTITY.name] "By" GetRoleName([ENDROLE]) "Id"])
|
|
|
|
//#end ACD#
|
|
#endregion
|
|
}
|
|
[end loop]
|
|
}
|
|
end template
|