305 lines
18 KiB
C#
305 lines
18 KiB
C#
//////////////////////////////////////////////////////////////
|
|
// <auto-generated>This code was generated by LLBLGen Pro 5.7.</auto-generated>
|
|
//////////////////////////////////////////////////////////////
|
|
// Code is generated on:
|
|
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
|
|
// Templates vendor: Solutions Design.
|
|
//////////////////////////////////////////////////////////////
|
|
using System;
|
|
using System.ComponentModel;
|
|
using System.Collections.Generic;
|
|
using System.Runtime.Serialization;
|
|
using System.Xml.Serialization;
|
|
using Datalib.HelperClasses;
|
|
using Datalib.FactoryClasses;
|
|
using Datalib.RelationClasses;
|
|
|
|
using SD.LLBLGen.Pro.ORMSupportClasses;
|
|
|
|
namespace Datalib.EntityClasses
|
|
{
|
|
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
|
|
// __LLBLGENPRO_USER_CODE_REGION_END
|
|
|
|
/// <summary>Entity class which represents the entity 'TblQuizTemplate'.<br/><br/></summary>
|
|
[Serializable]
|
|
public partial class TblQuizTemplateEntity : CommonEntityBase
|
|
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
|
|
// __LLBLGENPRO_USER_CODE_REGION_END
|
|
|
|
{
|
|
private EntityCollection<TblQuizEntity> _tblQuizzes;
|
|
private EntityCollection<TblQuizTemplateDetailEntity> _tblQuizTemplateDetails;
|
|
private TblTrainingTypeEntity _tblTrainingType;
|
|
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
|
|
// __LLBLGENPRO_USER_CODE_REGION_END
|
|
|
|
private static TblQuizTemplateEntityStaticMetaData _staticMetaData = new TblQuizTemplateEntityStaticMetaData();
|
|
private static TblQuizTemplateRelations _relationsFactory = new TblQuizTemplateRelations();
|
|
|
|
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
|
|
public static partial class MemberNames
|
|
{
|
|
/// <summary>Member name TblTrainingType</summary>
|
|
public static readonly string TblTrainingType = "TblTrainingType";
|
|
/// <summary>Member name TblQuizzes</summary>
|
|
public static readonly string TblQuizzes = "TblQuizzes";
|
|
/// <summary>Member name TblQuizTemplateDetails</summary>
|
|
public static readonly string TblQuizTemplateDetails = "TblQuizTemplateDetails";
|
|
}
|
|
|
|
/// <summary>Static meta-data storage for navigator related information</summary>
|
|
protected class TblQuizTemplateEntityStaticMetaData : EntityStaticMetaDataBase
|
|
{
|
|
public TblQuizTemplateEntityStaticMetaData()
|
|
{
|
|
SetEntityCoreInfo("TblQuizTemplateEntity", InheritanceHierarchyType.None, false, (int)Datalib.EntityType.TblQuizTemplateEntity, typeof(TblQuizTemplateEntity), typeof(TblQuizTemplateEntityFactory), false);
|
|
AddNavigatorMetaData<TblQuizTemplateEntity, EntityCollection<TblQuizEntity>>("TblQuizzes", a => a._tblQuizzes, (a, b) => a._tblQuizzes = b, a => a.TblQuizzes, () => new TblQuizTemplateRelations().TblQuizEntityUsingQuizTemplateId, typeof(TblQuizEntity), (int)Datalib.EntityType.TblQuizEntity);
|
|
AddNavigatorMetaData<TblQuizTemplateEntity, EntityCollection<TblQuizTemplateDetailEntity>>("TblQuizTemplateDetails", a => a._tblQuizTemplateDetails, (a, b) => a._tblQuizTemplateDetails = b, a => a.TblQuizTemplateDetails, () => new TblQuizTemplateRelations().TblQuizTemplateDetailEntityUsingQuizTemplateId, typeof(TblQuizTemplateDetailEntity), (int)Datalib.EntityType.TblQuizTemplateDetailEntity);
|
|
AddNavigatorMetaData<TblQuizTemplateEntity, TblTrainingTypeEntity>("TblTrainingType", "TblQuizTemplates", (a, b) => a._tblTrainingType = b, a => a._tblTrainingType, (a, b) => a.TblTrainingType = b, Datalib.RelationClasses.StaticTblQuizTemplateRelations.TblTrainingTypeEntityUsingTrainingTypeIdStatic, ()=>new TblQuizTemplateRelations().TblTrainingTypeEntityUsingTrainingTypeId, null, new int[] { (int)TblQuizTemplateFieldIndex.TrainingTypeId }, null, true, (int)Datalib.EntityType.TblTrainingTypeEntity);
|
|
}
|
|
}
|
|
|
|
/// <summary>Static ctor</summary>
|
|
static TblQuizTemplateEntity()
|
|
{
|
|
}
|
|
|
|
/// <summary> CTor</summary>
|
|
public TblQuizTemplateEntity()
|
|
{
|
|
InitClassEmpty(null, null);
|
|
}
|
|
|
|
/// <summary> CTor</summary>
|
|
/// <param name="fields">Fields object to set as the fields for this entity.</param>
|
|
public TblQuizTemplateEntity(IEntityFields2 fields)
|
|
{
|
|
InitClassEmpty(null, fields);
|
|
}
|
|
|
|
/// <summary> CTor</summary>
|
|
/// <param name="validator">The custom validator object for this TblQuizTemplateEntity</param>
|
|
public TblQuizTemplateEntity(IValidator validator)
|
|
{
|
|
InitClassEmpty(validator, null);
|
|
}
|
|
|
|
/// <summary> CTor</summary>
|
|
/// <param name="quizTemplateId">PK value for TblQuizTemplate which data should be fetched into this TblQuizTemplate object</param>
|
|
public TblQuizTemplateEntity(System.String quizTemplateId) : this(quizTemplateId, null)
|
|
{
|
|
}
|
|
|
|
/// <summary> CTor</summary>
|
|
/// <param name="quizTemplateId">PK value for TblQuizTemplate which data should be fetched into this TblQuizTemplate object</param>
|
|
/// <param name="validator">The custom validator object for this TblQuizTemplateEntity</param>
|
|
public TblQuizTemplateEntity(System.String quizTemplateId, IValidator validator)
|
|
{
|
|
InitClassEmpty(validator, null);
|
|
this.QuizTemplateId = quizTemplateId;
|
|
}
|
|
|
|
/// <summary>Private CTor for deserialization</summary>
|
|
/// <param name="info"></param>
|
|
/// <param name="context"></param>
|
|
protected TblQuizTemplateEntity(SerializationInfo info, StreamingContext context) : base(info, context)
|
|
{
|
|
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
|
|
// __LLBLGENPRO_USER_CODE_REGION_END
|
|
}
|
|
|
|
/// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblQuiz' to this entity.</summary>
|
|
/// <returns></returns>
|
|
public virtual IRelationPredicateBucket GetRelationInfoTblQuizzes() { return CreateRelationInfoForNavigator("TblQuizzes"); }
|
|
|
|
/// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblQuizTemplateDetail' to this entity.</summary>
|
|
/// <returns></returns>
|
|
public virtual IRelationPredicateBucket GetRelationInfoTblQuizTemplateDetails() { return CreateRelationInfoForNavigator("TblQuizTemplateDetails"); }
|
|
|
|
/// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblTrainingType' to this entity.</summary>
|
|
/// <returns></returns>
|
|
public virtual IRelationPredicateBucket GetRelationInfoTblTrainingType() { return CreateRelationInfoForNavigator("TblTrainingType"); }
|
|
|
|
/// <inheritdoc/>
|
|
protected override EntityStaticMetaDataBase GetEntityStaticMetaData() { return _staticMetaData; }
|
|
|
|
/// <summary>Initializes the class members</summary>
|
|
private void InitClassMembers()
|
|
{
|
|
PerformDependencyInjection();
|
|
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
|
|
// __LLBLGENPRO_USER_CODE_REGION_END
|
|
|
|
OnInitClassMembersComplete();
|
|
}
|
|
|
|
/// <summary>Initializes the class with empty data, as if it is a new Entity.</summary>
|
|
/// <param name="validator">The validator object for this TblQuizTemplateEntity</param>
|
|
/// <param name="fields">Fields of this entity</param>
|
|
private void InitClassEmpty(IValidator validator, IEntityFields2 fields)
|
|
{
|
|
OnInitializing();
|
|
this.Fields = fields ?? CreateFields();
|
|
this.Validator = validator;
|
|
InitClassMembers();
|
|
// __LLBLGENPRO_USER_CODE_REGION_START InitClassEmpty
|
|
// __LLBLGENPRO_USER_CODE_REGION_END
|
|
|
|
|
|
OnInitialized();
|
|
}
|
|
|
|
/// <summary>The relations object holding all relations of this entity with other entity classes.</summary>
|
|
public static TblQuizTemplateRelations Relations { get { return _relationsFactory; } }
|
|
|
|
/// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblQuiz' for this entity.</summary>
|
|
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
|
|
public static IPrefetchPathElement2 PrefetchPathTblQuizzes { get { return _staticMetaData.GetPrefetchPathElement("TblQuizzes", CommonEntityBase.CreateEntityCollection<TblQuizEntity>()); } }
|
|
|
|
/// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblQuizTemplateDetail' for this entity.</summary>
|
|
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
|
|
public static IPrefetchPathElement2 PrefetchPathTblQuizTemplateDetails { get { return _staticMetaData.GetPrefetchPathElement("TblQuizTemplateDetails", CommonEntityBase.CreateEntityCollection<TblQuizTemplateDetailEntity>()); } }
|
|
|
|
/// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblTrainingType' for this entity.</summary>
|
|
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
|
|
public static IPrefetchPathElement2 PrefetchPathTblTrainingType { get { return _staticMetaData.GetPrefetchPathElement("TblTrainingType", CommonEntityBase.CreateEntityCollection<TblTrainingTypeEntity>()); } }
|
|
|
|
/// <summary>The FooterDes property of the Entity TblQuizTemplate<br/><br/></summary>
|
|
/// <remarks>Mapped on table field: "tblQuizTemplate"."FooterDes".<br/>Table field type characteristics (type, precision, scale, length): LongVarWChar, 0, 0, 536870911.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
|
|
public virtual System.String FooterDes
|
|
{
|
|
get { return (System.String)GetValue((int)TblQuizTemplateFieldIndex.FooterDes, true); }
|
|
set { SetValue((int)TblQuizTemplateFieldIndex.FooterDes, value); }
|
|
}
|
|
|
|
/// <summary>The HeaderDes property of the Entity TblQuizTemplate<br/><br/></summary>
|
|
/// <remarks>Mapped on table field: "tblQuizTemplate"."HeaderDes".<br/>Table field type characteristics (type, precision, scale, length): LongVarWChar, 0, 0, 536870911.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
|
|
public virtual System.String HeaderDes
|
|
{
|
|
get { return (System.String)GetValue((int)TblQuizTemplateFieldIndex.HeaderDes, true); }
|
|
set { SetValue((int)TblQuizTemplateFieldIndex.HeaderDes, value); }
|
|
}
|
|
|
|
/// <summary>The QuizTemplateCode property of the Entity TblQuizTemplate<br/><br/></summary>
|
|
/// <remarks>Mapped on table field: "tblQuizTemplate"."QuizTemplateCode".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
|
|
public virtual System.String QuizTemplateCode
|
|
{
|
|
get { return (System.String)GetValue((int)TblQuizTemplateFieldIndex.QuizTemplateCode, true); }
|
|
set { SetValue((int)TblQuizTemplateFieldIndex.QuizTemplateCode, value); }
|
|
}
|
|
|
|
/// <summary>The QuizTemplateId property of the Entity TblQuizTemplate<br/><br/></summary>
|
|
/// <remarks>Mapped on table field: "tblQuizTemplate"."QuizTemplateID".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32.<br/>Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
|
|
public virtual System.String QuizTemplateId
|
|
{
|
|
get { return (System.String)GetValue((int)TblQuizTemplateFieldIndex.QuizTemplateId, true); }
|
|
set { SetValue((int)TblQuizTemplateFieldIndex.QuizTemplateId, value); }
|
|
}
|
|
|
|
/// <summary>The Renumering property of the Entity TblQuizTemplate<br/><br/></summary>
|
|
/// <remarks>Mapped on table field: "tblQuizTemplate"."Renumering".<br/>Table field type characteristics (type, precision, scale, length): Boolean, 0, 0, 2.<br/>Table field behavior characteristics (is nullable, is PK, is identity): false, false, false</remarks>
|
|
public virtual System.Boolean Renumering
|
|
{
|
|
get { return (System.Boolean)GetValue((int)TblQuizTemplateFieldIndex.Renumering, true); }
|
|
set { SetValue((int)TblQuizTemplateFieldIndex.Renumering, value); }
|
|
}
|
|
|
|
/// <summary>The TemplateQuizName property of the Entity TblQuizTemplate<br/><br/></summary>
|
|
/// <remarks>Mapped on table field: "tblQuizTemplate"."TemplateQuizName".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
|
|
public virtual System.String TemplateQuizName
|
|
{
|
|
get { return (System.String)GetValue((int)TblQuizTemplateFieldIndex.TemplateQuizName, true); }
|
|
set { SetValue((int)TblQuizTemplateFieldIndex.TemplateQuizName, value); }
|
|
}
|
|
|
|
/// <summary>The TrainingTypeId property of the Entity TblQuizTemplate<br/><br/></summary>
|
|
/// <remarks>Mapped on table field: "tblQuizTemplate"."TrainingTypeID".<br/>Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2.<br/>Table field behavior characteristics (is nullable, is PK, is identity): false, false, false</remarks>
|
|
public virtual System.String TrainingTypeId
|
|
{
|
|
get { return (System.String)GetValue((int)TblQuizTemplateFieldIndex.TrainingTypeId, true); }
|
|
set { SetValue((int)TblQuizTemplateFieldIndex.TrainingTypeId, value); }
|
|
}
|
|
|
|
/// <summary>Gets the EntityCollection with the related entities of type 'TblQuizEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
|
|
[TypeContainedAttribute(typeof(TblQuizEntity))]
|
|
public virtual EntityCollection<TblQuizEntity> TblQuizzes { get { return GetOrCreateEntityCollection<TblQuizEntity, TblQuizEntityFactory>("TblQuizTemplate", true, false, ref _tblQuizzes); } }
|
|
|
|
/// <summary>Gets the EntityCollection with the related entities of type 'TblQuizTemplateDetailEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
|
|
[TypeContainedAttribute(typeof(TblQuizTemplateDetailEntity))]
|
|
public virtual EntityCollection<TblQuizTemplateDetailEntity> TblQuizTemplateDetails { get { return GetOrCreateEntityCollection<TblQuizTemplateDetailEntity, TblQuizTemplateDetailEntityFactory>("TblQuizTemplate", true, false, ref _tblQuizTemplateDetails); } }
|
|
|
|
/// <summary>Gets / sets related entity of type 'TblTrainingTypeEntity' which has to be set using a fetch action earlier. If no related entity is set for this property, null is returned..<br/><br/></summary>
|
|
[Browsable(false)]
|
|
public virtual TblTrainingTypeEntity TblTrainingType
|
|
{
|
|
get { return _tblTrainingType; }
|
|
set { SetSingleRelatedEntityNavigator(value, "TblTrainingType"); }
|
|
}
|
|
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
|
|
// __LLBLGENPRO_USER_CODE_REGION_END
|
|
|
|
|
|
}
|
|
}
|
|
|
|
namespace Datalib
|
|
{
|
|
public enum TblQuizTemplateFieldIndex
|
|
{
|
|
///<summary>FooterDes. </summary>
|
|
FooterDes,
|
|
///<summary>HeaderDes. </summary>
|
|
HeaderDes,
|
|
///<summary>QuizTemplateCode. </summary>
|
|
QuizTemplateCode,
|
|
///<summary>QuizTemplateId. </summary>
|
|
QuizTemplateId,
|
|
///<summary>Renumering. </summary>
|
|
Renumering,
|
|
///<summary>TemplateQuizName. </summary>
|
|
TemplateQuizName,
|
|
///<summary>TrainingTypeId. </summary>
|
|
TrainingTypeId,
|
|
/// <summary></summary>
|
|
AmountOfFields
|
|
}
|
|
}
|
|
|
|
namespace Datalib.RelationClasses
|
|
{
|
|
/// <summary>Implements the relations factory for the entity: TblQuizTemplate. </summary>
|
|
public partial class TblQuizTemplateRelations: RelationFactory
|
|
{
|
|
/// <summary>Returns a new IEntityRelation object, between TblQuizTemplateEntity and TblQuizEntity over the 1:n relation they have, using the relation between the fields: TblQuizTemplate.QuizTemplateId - TblQuiz.QuizTemplateId</summary>
|
|
public virtual IEntityRelation TblQuizEntityUsingQuizTemplateId
|
|
{
|
|
get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.OneToMany, "TblQuizzes", true, new[] { TblQuizTemplateFields.QuizTemplateId, TblQuizFields.QuizTemplateId }); }
|
|
}
|
|
|
|
/// <summary>Returns a new IEntityRelation object, between TblQuizTemplateEntity and TblQuizTemplateDetailEntity over the 1:n relation they have, using the relation between the fields: TblQuizTemplate.QuizTemplateId - TblQuizTemplateDetail.QuizTemplateId</summary>
|
|
public virtual IEntityRelation TblQuizTemplateDetailEntityUsingQuizTemplateId
|
|
{
|
|
get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.OneToMany, "TblQuizTemplateDetails", true, new[] { TblQuizTemplateFields.QuizTemplateId, TblQuizTemplateDetailFields.QuizTemplateId }); }
|
|
}
|
|
|
|
/// <summary>Returns a new IEntityRelation object, between TblQuizTemplateEntity and TblTrainingTypeEntity over the m:1 relation they have, using the relation between the fields: TblQuizTemplate.TrainingTypeId - TblTrainingType.TrainingTypeId</summary>
|
|
public virtual IEntityRelation TblTrainingTypeEntityUsingTrainingTypeId
|
|
{
|
|
get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.ManyToOne, "TblTrainingType", false, new[] { TblTrainingTypeFields.TrainingTypeId, TblQuizTemplateFields.TrainingTypeId }); }
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
|
|
internal static class StaticTblQuizTemplateRelations
|
|
{
|
|
internal static readonly IEntityRelation TblQuizEntityUsingQuizTemplateIdStatic = new TblQuizTemplateRelations().TblQuizEntityUsingQuizTemplateId;
|
|
internal static readonly IEntityRelation TblQuizTemplateDetailEntityUsingQuizTemplateIdStatic = new TblQuizTemplateRelations().TblQuizTemplateDetailEntityUsingQuizTemplateId;
|
|
internal static readonly IEntityRelation TblTrainingTypeEntityUsingTrainingTypeIdStatic = new TblQuizTemplateRelations().TblTrainingTypeEntityUsingTrainingTypeId;
|
|
|
|
/// <summary>CTor</summary>
|
|
static StaticTblQuizTemplateRelations() { }
|
|
}
|
|
}
|