125 lines
6.1 KiB
C#
125 lines
6.1 KiB
C#
///////////////////////////////////////////////////////////////
|
|
// This is generated code.
|
|
//////////////////////////////////////////////////////////////
|
|
// Code is generated using LLBLGen Pro version: 4.2
|
|
// Code is generated on:
|
|
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
|
|
// Templates vendor: Solutions Design.
|
|
// Templates version:
|
|
//////////////////////////////////////////////////////////////
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Datalib;
|
|
using Datalib.FactoryClasses;
|
|
using Datalib.HelperClasses;
|
|
using SD.LLBLGen.Pro.ORMSupportClasses;
|
|
|
|
namespace Datalib.RelationClasses
|
|
{
|
|
/// <summary>Implements the relations factory for the entity: TblTreatmentInfo. </summary>
|
|
public partial class TblTreatmentInfoRelations
|
|
{
|
|
/// <summary>CTor</summary>
|
|
public TblTreatmentInfoRelations()
|
|
{
|
|
}
|
|
|
|
/// <summary>Gets all relations of the TblTreatmentInfoEntity as a list of IEntityRelation objects.</summary>
|
|
/// <returns>a list of IEntityRelation objects</returns>
|
|
public virtual List<IEntityRelation> GetAllRelations()
|
|
{
|
|
List<IEntityRelation> toReturn = new List<IEntityRelation>();
|
|
toReturn.Add(this.TblPatientEntityUsingPatientId);
|
|
toReturn.Add(this.TblRegimenEntityUsingRegimenid);
|
|
toReturn.Add(this.TblRegimenStopReasonEntityUsingReasonId);
|
|
toReturn.Add(this.TblTreatmentEntityUsingTreatmentId);
|
|
return toReturn;
|
|
}
|
|
|
|
#region Class Property Declarations
|
|
|
|
|
|
|
|
/// <summary>Returns a new IEntityRelation object, between TblTreatmentInfoEntity and TblPatientEntity over the m:1 relation they have, using the relation between the fields:
|
|
/// TblTreatmentInfo.PatientId - TblPatient.PatientId
|
|
/// </summary>
|
|
public virtual IEntityRelation TblPatientEntityUsingPatientId
|
|
{
|
|
get
|
|
{
|
|
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblPatient", false);
|
|
relation.AddEntityFieldPair(TblPatientFields.PatientId, TblTreatmentInfoFields.PatientId);
|
|
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPatientEntity", false);
|
|
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblTreatmentInfoEntity", true);
|
|
return relation;
|
|
}
|
|
}
|
|
/// <summary>Returns a new IEntityRelation object, between TblTreatmentInfoEntity and TblRegimenEntity over the m:1 relation they have, using the relation between the fields:
|
|
/// TblTreatmentInfo.Regimenid - TblRegimen.Regimenid
|
|
/// </summary>
|
|
public virtual IEntityRelation TblRegimenEntityUsingRegimenid
|
|
{
|
|
get
|
|
{
|
|
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblRegiman", false);
|
|
relation.AddEntityFieldPair(TblRegimenFields.Regimenid, TblTreatmentInfoFields.Regimenid);
|
|
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblRegimenEntity", false);
|
|
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblTreatmentInfoEntity", true);
|
|
return relation;
|
|
}
|
|
}
|
|
/// <summary>Returns a new IEntityRelation object, between TblTreatmentInfoEntity and TblRegimenStopReasonEntity over the m:1 relation they have, using the relation between the fields:
|
|
/// TblTreatmentInfo.ReasonId - TblRegimenStopReason.ReasonId
|
|
/// </summary>
|
|
public virtual IEntityRelation TblRegimenStopReasonEntityUsingReasonId
|
|
{
|
|
get
|
|
{
|
|
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblRegimenStopReason", false);
|
|
relation.AddEntityFieldPair(TblRegimenStopReasonFields.ReasonId, TblTreatmentInfoFields.ReasonId);
|
|
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblRegimenStopReasonEntity", false);
|
|
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblTreatmentInfoEntity", true);
|
|
return relation;
|
|
}
|
|
}
|
|
/// <summary>Returns a new IEntityRelation object, between TblTreatmentInfoEntity and TblTreatmentEntity over the m:1 relation they have, using the relation between the fields:
|
|
/// TblTreatmentInfo.TreatmentId - TblTreatment.TreatmentId
|
|
/// </summary>
|
|
public virtual IEntityRelation TblTreatmentEntityUsingTreatmentId
|
|
{
|
|
get
|
|
{
|
|
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblTreatment", false);
|
|
relation.AddEntityFieldPair(TblTreatmentFields.TreatmentId, TblTreatmentInfoFields.TreatmentId);
|
|
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblTreatmentEntity", false);
|
|
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblTreatmentInfoEntity", true);
|
|
return relation;
|
|
}
|
|
}
|
|
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
|
|
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
|
|
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
|
|
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
|
|
#endregion
|
|
|
|
#region Included Code
|
|
|
|
#endregion
|
|
}
|
|
|
|
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
|
|
internal static class StaticTblTreatmentInfoRelations
|
|
{
|
|
internal static readonly IEntityRelation TblPatientEntityUsingPatientIdStatic = new TblTreatmentInfoRelations().TblPatientEntityUsingPatientId;
|
|
internal static readonly IEntityRelation TblRegimenEntityUsingRegimenidStatic = new TblTreatmentInfoRelations().TblRegimenEntityUsingRegimenid;
|
|
internal static readonly IEntityRelation TblRegimenStopReasonEntityUsingReasonIdStatic = new TblTreatmentInfoRelations().TblRegimenStopReasonEntityUsingReasonId;
|
|
internal static readonly IEntityRelation TblTreatmentEntityUsingTreatmentIdStatic = new TblTreatmentInfoRelations().TblTreatmentEntityUsingTreatmentId;
|
|
|
|
/// <summary>CTor</summary>
|
|
static StaticTblTreatmentInfoRelations()
|
|
{
|
|
}
|
|
}
|
|
}
|