init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
853
Kreta.DataAccessGenerated/Entities/TanuloMulasztas.cs
Normal file
853
Kreta.DataAccessGenerated/Entities/TanuloMulasztas.cs
Normal file
|
@ -0,0 +1,853 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.DataAccess.Interfaces;
|
||||
using Kreta.Framework;
|
||||
using Kreta.Framework.Actions;
|
||||
using Kreta.Framework.Collections;
|
||||
using Kreta.Framework.Collections.Generic;
|
||||
using Kreta.Framework.Entities;
|
||||
using Kreta.Framework.Entities.Generic;
|
||||
using Kreta.Framework.Exceptions;
|
||||
|
||||
namespace SDA.Kreta.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Az UML modell TanuloMulasztas entitásának megvalósítása.
|
||||
/// </summary>
|
||||
/// <remarks>A kód teljes egészében generált, kézi módosítása nem megengedett!</remarks>
|
||||
[Entity("TanuloMulasztas")]
|
||||
// alapértelmezett EntityHistoryMode
|
||||
public class TanuloMulasztas : Entity, ITanuloMulasztas
|
||||
{
|
||||
internal protected TanuloMulasztas()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
public class AttributeInfo
|
||||
{
|
||||
public const string Igazolt = "Igazolt";
|
||||
public const string KesesPercben = "KesesPercben";
|
||||
public const string Megjegyzes = "Megjegyzes";
|
||||
public const string Tipus = "Tipus";
|
||||
public const string IgazolasTipusa = "IgazolasTipusa";
|
||||
public const string IsErtesitesElkuldve = "IsErtesitesElkuldve";
|
||||
}
|
||||
|
||||
public class AttributeLengthInfo
|
||||
{
|
||||
public const int MegjegyzesLength = 255;
|
||||
}
|
||||
|
||||
#region General
|
||||
private TanuloMulasztasDA m_DA = new TanuloMulasztasDA();
|
||||
|
||||
protected static TanuloMulasztas FakeTanuloMulasztas { get; set; }
|
||||
|
||||
public static TanuloMulasztas GiveAnInstance()
|
||||
{
|
||||
TanuloMulasztas result = FakeTanuloMulasztas == null
|
||||
? new TanuloMulasztas()
|
||||
: (TanuloMulasztas)FakeTanuloMulasztas.MemberwiseClone();
|
||||
result.Reset();
|
||||
result.SetDefaultData();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
protected void SetDefaultData()
|
||||
{
|
||||
if (UserContext.Instance != null)
|
||||
{
|
||||
if (UserContext.Instance.IntezmenyId > 0)
|
||||
{
|
||||
IntezmenyId = UserContext.Instance.IntezmenyId;
|
||||
}
|
||||
|
||||
if (UserContext.Instance.AktivTanevId > 0)
|
||||
{
|
||||
TanevId = UserContext.Instance.AktivTanevId;
|
||||
}
|
||||
|
||||
m_State = EntityState.Uninitialized;
|
||||
}
|
||||
}
|
||||
|
||||
protected override IEntityDataAccessor GetDataAccessor() { return m_DA; }
|
||||
protected internal virtual IEntityDataAccessor InheritedDA { get { return null; } }
|
||||
|
||||
[Obsolete("Ezt ne használjátok, mert mindenhova bele kellene fogalmazni a tanév szűrést is! Meg fog majd szűnni!")]
|
||||
public static IEntityCollection<TanuloMulasztas> LoadAll()
|
||||
{
|
||||
return LoadWithFilter("");
|
||||
}
|
||||
|
||||
[Obsolete("Ezt ne használjátok, mert mindenhova bele kellene fogalmazni a tanév szűrést is! Meg fog majd szűnni!")]
|
||||
public static IEntityCollection<TanuloMulasztas> LoadAll(ColumnFilterMode columnFilterMode, IEnumerable<string> columns)
|
||||
{
|
||||
return LoadWithFilter("", columnFilterMode, columns);
|
||||
}
|
||||
|
||||
[Obsolete("Ezt ne használjátok, mert mindenhova bele kellene fogalmazni a tanév szűrést is! Meg fog majd szűnni!")]
|
||||
public static IEntityCollection<TanuloMulasztas> LoadWithFilter(string filter, Dictionary<string, object> commandParameters = null)
|
||||
{
|
||||
var result = new EntityCollection<TanuloMulasztas>();
|
||||
new TanuloMulasztasDA().LoadWithFilter(result, filter, commandParameters);
|
||||
return result;
|
||||
}
|
||||
|
||||
[Obsolete("Ezt ne használjátok, mert mindenhova bele kellene fogalmazni a tanév szűrést is! Meg fog majd szűnni!")]
|
||||
public static IEntityCollection<TanuloMulasztas> LoadWithFilter(string filter, ColumnFilterMode columnFilterMode, IEnumerable<string> columns, Dictionary<string, object> commandParameters = null)
|
||||
{
|
||||
var result = new EntityCollection<TanuloMulasztas>();
|
||||
new TanuloMulasztasDA().LoadWithFilter(result, filter, columnFilterMode, columns, commandParameters);
|
||||
return result;
|
||||
}
|
||||
|
||||
protected override void StoreOriginalValues()
|
||||
{
|
||||
base.StoreOriginalValues();
|
||||
OriginalValues.Add("Igazolt", (Igazolt == null ? (object)DBNull.Value : (object)m_Igazolt));
|
||||
OriginalValues.Add("KesesPercben", (KesesPercben == null ? (object)DBNull.Value : (object)m_KesesPercben));
|
||||
OriginalValues.Add("Megjegyzes", (Megjegyzes == null ? (object)DBNull.Value : (object)m_Megjegyzes));
|
||||
OriginalValues.Add("Tipus", (object)m_Tipus);
|
||||
OriginalValues.Add("IgazolasTipusa", (IgazolasTipusa == null ? (object)DBNull.Value : (object)m_IgazolasTipusa));
|
||||
OriginalValues.Add("IsErtesitesElkuldve", (object)m_IsErtesitesElkuldve);
|
||||
OriginalValues.Add("IntezmenyId", (m_IntezmenyId < 0 ? (object)DBNull.Value : (object)m_IntezmenyId));
|
||||
OriginalValues.Add("TanevId", (m_TanevId < 0 ? (object)DBNull.Value : (object)m_TanevId));
|
||||
OriginalValues.Add("OraTanuloiId", m_OraTanuloiId);
|
||||
OriginalValues.Add("TanitasiOrakId", m_TanitasiOrakId);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Ellenőrzés
|
||||
|
||||
protected override void Validate(bool skipValidateAttributes = false)
|
||||
{
|
||||
base.Validate();
|
||||
|
||||
if (!skipValidateAttributes)
|
||||
{
|
||||
// korlátos hosszúságú mezők ellenőrzése...
|
||||
if (m_Megjegyzes != null && m_Megjegyzes.Length > 255)
|
||||
{
|
||||
throw new InvalidEntityAttributeException("TanuloMulasztas", "Megjegyzes", EntityAttributeError.TooLong);
|
||||
}
|
||||
}
|
||||
|
||||
// kötelező asszociációk ellenőrzése...
|
||||
if (m_IntezmenyId == -1) { throw new InvalidEntityAttributeException("TanuloMulasztas", "IntezmenyId", EntityAttributeError.Empty); }
|
||||
if (m_TanevId == -1) { throw new InvalidEntityAttributeException("TanuloMulasztas", "TanevId", EntityAttributeError.Empty); }
|
||||
|
||||
if (this.TanitasiOrakId == -1) { throw new InvalidEntityAttributeException("TanuloMulasztas", "TanitasiOrakId", EntityAttributeError.Empty); }
|
||||
if (this.OraTanuloiId == -1) { throw new InvalidEntityAttributeException("TanuloMulasztas", "OraTanuloiId", EntityAttributeError.Empty); }
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Alaphelyzetbe állítás
|
||||
protected override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
|
||||
// alaphelyzetbe állítjuk az egyszerű mezőket
|
||||
this.m_Igazolt = null;
|
||||
this.m_KesesPercben = null;
|
||||
this.m_Megjegyzes = null;
|
||||
this.m_Tipus = -1;
|
||||
this.m_IgazolasTipusa = null;
|
||||
this.m_IsErtesitesElkuldve = false;
|
||||
|
||||
// alaphelyzetbe állítjuk az asszociációkból származó mezőket
|
||||
this.m_OraTanuloiId = -1; // ID
|
||||
this.m_TanitasiOrakId = -1; // ID
|
||||
this.m_TanuloMulasztasLattamozas = null; // EntityCollection
|
||||
this.m_IntezmenyId = -1;
|
||||
this.m_Intezmeny = null; // Entity
|
||||
this.m_TanevId = -1;
|
||||
this.m_Tanev = null; // Entity
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected override void DeAssociateBeforeDelete(bool runHandler = false)
|
||||
{
|
||||
// Nem kaszkád törölhető asszociációk ellenőrzése, hogy üresek-e...
|
||||
|
||||
if (this.TanuloMulasztasLattamozas.Count > 0)
|
||||
{
|
||||
throw new EntityDeleteFailedException("TanuloMulasztas", "TanuloMulasztasLattamozas", EntityUtil.GetAssociationDescription("T_TANULOMULASZTASLATTAMOZAS_OSSZES", "C_TANULOMULASZTASID")); // nincs kapcsolotabla
|
||||
}
|
||||
// Intezmeny esetében mi mutatunk a másikra: startrole: *, endrole: 1
|
||||
// Tanev esetében mi mutatunk a másikra: startrole: *, endrole: 1
|
||||
|
||||
// kaszkád törlések...
|
||||
|
||||
}
|
||||
|
||||
#region Mezők és tulajdonságok
|
||||
|
||||
#region Egyszerű mezők
|
||||
|
||||
#region Igazolt
|
||||
|
||||
protected internal bool? m_Igazolt;
|
||||
|
||||
/// <summary>
|
||||
/// igazolt
|
||||
/// </summary>
|
||||
[EntityProperty("Igazolt", EntityPropertyBaseType.ValueType, typeof(bool), EntityCopyMethod.ShallowCopy)]
|
||||
public virtual bool? Igazolt
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Igazolt;
|
||||
}
|
||||
set
|
||||
{
|
||||
CheckModifyable();
|
||||
|
||||
if (m_Igazolt == value) return;
|
||||
m_Igazolt = value;
|
||||
FieldModified("Igazolt", value);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region KesesPercben
|
||||
|
||||
protected internal int? m_KesesPercben;
|
||||
|
||||
/// <summary>
|
||||
/// késés percben megadva
|
||||
/// </summary>
|
||||
[EntityProperty("KesesPercben", EntityPropertyBaseType.ValueType, typeof(int), EntityCopyMethod.ShallowCopy)]
|
||||
public virtual int? KesesPercben
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_KesesPercben;
|
||||
}
|
||||
set
|
||||
{
|
||||
CheckModifyable();
|
||||
|
||||
if (m_KesesPercben == value) return;
|
||||
m_KesesPercben = value;
|
||||
FieldModified("KesesPercben", value);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Megjegyzes
|
||||
|
||||
protected internal string m_Megjegyzes;
|
||||
|
||||
/// <summary>
|
||||
/// megjegyzés
|
||||
/// </summary>
|
||||
[EntityProperty("Megjegyzes", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
||||
public virtual string Megjegyzes
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Megjegyzes;
|
||||
}
|
||||
set
|
||||
{
|
||||
CheckModifyable();
|
||||
|
||||
if (m_Megjegyzes == value) return;
|
||||
m_Megjegyzes = value;
|
||||
FieldModified("Megjegyzes", value);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Tipus
|
||||
|
||||
protected internal int /* DictionaryItem */ m_Tipus;
|
||||
|
||||
/// <summary>
|
||||
/// mulasztás típusa
|
||||
/// </summary>
|
||||
[EntityProperty("Tipus", EntityPropertyBaseType.ValueType, typeof(int /* DictionaryItem */), EntityCopyMethod.ShallowCopy)]
|
||||
[EntityDictionaryItemProperty("Tipus", "MulasztasTipus", typeof(SDA.Kreta.Entities.MulasztasTipus))]
|
||||
|
||||
public virtual int /* DictionaryItem */ Tipus
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Tipus;
|
||||
}
|
||||
set
|
||||
{
|
||||
CheckModifyable();
|
||||
|
||||
if (m_Tipus == value) return;
|
||||
m_Tipus = value;
|
||||
FieldModified("Tipus", value);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IgazolasTipusa
|
||||
|
||||
protected internal int? /* DictionaryItem */ m_IgazolasTipusa;
|
||||
|
||||
/// <summary>
|
||||
/// igazolás típusa
|
||||
/// </summary>
|
||||
[EntityProperty("IgazolasTipusa", EntityPropertyBaseType.ValueType, typeof(int /* DictionaryItem */), EntityCopyMethod.ShallowCopy)]
|
||||
[EntityDictionaryItemProperty("IgazolasTipusa", "IgazolasTipus", typeof(SDA.Kreta.Entities.IgazolasTipus))]
|
||||
|
||||
public virtual int? /* DictionaryItem */ IgazolasTipusa
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_IgazolasTipusa;
|
||||
}
|
||||
set
|
||||
{
|
||||
CheckModifyable();
|
||||
|
||||
if (m_IgazolasTipusa == value) return;
|
||||
m_IgazolasTipusa = value;
|
||||
FieldModified("IgazolasTipusa", value);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IsErtesitesElkuldve
|
||||
|
||||
protected internal bool m_IsErtesitesElkuldve;
|
||||
|
||||
/// <summary>
|
||||
/// Értesítés elküldve?
|
||||
/// </summary>
|
||||
[EntityProperty("IsErtesitesElkuldve", EntityPropertyBaseType.ValueType, typeof(bool), EntityCopyMethod.ShallowCopy)]
|
||||
public virtual bool IsErtesitesElkuldve
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_IsErtesitesElkuldve;
|
||||
}
|
||||
set
|
||||
{
|
||||
CheckModifyable();
|
||||
|
||||
if (m_IsErtesitesElkuldve == value) return;
|
||||
m_IsErtesitesElkuldve = value;
|
||||
FieldModified("IsErtesitesElkuldve", value);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region Asszociációkkal kapcsolatos dolgok
|
||||
|
||||
#region Tanulo (*) -> TanitasiOra (*) TanuloMulasztas
|
||||
|
||||
public void DeleteByOraTanuloiAndTanitasiOrak(int startId, int endId)
|
||||
{
|
||||
DeAssociateBeforeDelete();
|
||||
m_DA.DeleteByOraTanuloiAndTanitasiOrak(startId, endId);
|
||||
}
|
||||
|
||||
public void DeleteByTanitasiOrakAndOraTanuloi(int startId, int endId)
|
||||
{
|
||||
DeAssociateBeforeDelete();
|
||||
m_DA.DeleteByOraTanuloiAndTanitasiOrak(endId, startId);
|
||||
}
|
||||
|
||||
protected internal int m_OraTanuloiId;
|
||||
|
||||
protected internal Tanulo m_OraTanuloi = null;
|
||||
|
||||
/// <summary>
|
||||
/// Csak akkor használhatod, ha pontosan tudod, hogy mit csinál és hogyan, és
|
||||
/// milyen mellékhatásai lehetnek!
|
||||
/// </summary>
|
||||
public int OraTanuloiId
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_OraTanuloiId;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_OraTanuloiId = value;
|
||||
FieldModified("OraTanuloiId", value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool LoadByOraTanuloi(Tanulo entity, TanitasiOra partner)
|
||||
{
|
||||
if (m_DA.LoadByOraTanuloi(entity, partner, this) == true)
|
||||
{
|
||||
SetLoaded();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
ITanulo ITanuloMulasztas.OraTanuloi
|
||||
{
|
||||
get { return OraTanuloi; }
|
||||
set { OraTanuloi = value as Tanulo; }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Nincs definiálva megjegyzés.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Az entitás szerepel a(z) 'Tanulo (*) -> TanitasiOra (*)' asszociációban, mint asszociációs osztály.
|
||||
/// </remarks>
|
||||
[EntityProperty("OraTanuloi", EntityPropertyBaseType.Entity, typeof(Tanulo), EntityCopyMethod.ShallowCopy)]
|
||||
public Tanulo OraTanuloi
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_OraTanuloiId == -1)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if (m_OraTanuloi == null || m_OraTanuloi.ID != m_OraTanuloiId)
|
||||
{
|
||||
m_OraTanuloi = SDA.Kreta.Entities.Tanulo.GiveAnInstance();
|
||||
m_OraTanuloi.LoadByID(m_OraTanuloiId);
|
||||
}
|
||||
return m_OraTanuloi;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_OraTanuloi = value;
|
||||
OraTanuloiId = value.ID;
|
||||
if (this.State != EntityState.New)
|
||||
{
|
||||
UpdateAssociations(true);
|
||||
}
|
||||
FieldModified("OraTanuloiId", value.ID);
|
||||
}
|
||||
}
|
||||
|
||||
protected internal int m_TanitasiOrakId;
|
||||
|
||||
protected internal TanitasiOra m_TanitasiOrak = null;
|
||||
|
||||
/// <summary>
|
||||
/// Csak akkor használhatod, ha pontosan tudod, hogy mit csinál és hogyan, és
|
||||
/// milyen mellékhatásai lehetnek!
|
||||
/// </summary>
|
||||
public int TanitasiOrakId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_TanitasiOrakId;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_TanitasiOrakId = value;
|
||||
FieldModified("TanitasiOrakId", value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool LoadByTanitasiOrak(TanitasiOra entity, Tanulo partner)
|
||||
{
|
||||
if (this.m_DA.LoadByTanitasiOrak(entity, partner, this) == true)
|
||||
{
|
||||
this.SetState(EntityState.Initialized);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
ITanitasiOra ITanuloMulasztas.TanitasiOrak
|
||||
{
|
||||
get { return TanitasiOrak; }
|
||||
set { TanitasiOrak = value as TanitasiOra; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Nincs definiálva megjegyzés.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Az entitás szerepel a(z) 'Tanulo (*) -> TanitasiOra (*)' asszociációban, mint asszociációs osztály.
|
||||
/// </remarks>
|
||||
[EntityProperty("TanitasiOrak", EntityPropertyBaseType.Entity, typeof(TanitasiOra), EntityCopyMethod.ShallowCopy)]
|
||||
public TanitasiOra TanitasiOrak
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_TanitasiOrakId == -1)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if (m_TanitasiOrak == null || m_TanitasiOrak.ID != m_TanitasiOrakId)
|
||||
{
|
||||
m_TanitasiOrak = SDA.Kreta.Entities.TanitasiOra.GiveAnInstance();
|
||||
m_TanitasiOrak.LoadByID(m_TanitasiOrakId);
|
||||
}
|
||||
return m_TanitasiOrak;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_TanitasiOrak = value;
|
||||
this.TanitasiOrakId = value.ID;
|
||||
if (this.State != EntityState.New)
|
||||
{
|
||||
UpdateAssociations(true);
|
||||
}
|
||||
FieldModified("TanitasiOrakId", value.ID);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected internal virtual bool LoadByTanuloMulasztasLattamozasId(int id)
|
||||
{
|
||||
return m_DA.LoadByTanuloMulasztasLattamozasId(id, this);
|
||||
}
|
||||
|
||||
#region TanuloMulasztas (*) -> Intezmeny (1)
|
||||
|
||||
protected internal int m_IntezmenyId = -1;
|
||||
|
||||
/// <summary>
|
||||
/// A(z) Intezmeny asszociáció végpontjának ID-ja.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// - Insert() előtt célszerű kitölteni
|
||||
/// - Update() nincs rá hatással: ezt a mezőt nem frissíti
|
||||
/// - LoadByID() felhozza ezt a mezőt
|
||||
/// </remarks>
|
||||
public virtual int IntezmenyId
|
||||
{
|
||||
get
|
||||
{
|
||||
return InternalIntezmenyId;
|
||||
}
|
||||
set
|
||||
{
|
||||
InternalIntezmenyId = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ez egy külön bejárat a DA számára
|
||||
/// <summary>
|
||||
internal int InternalIntezmenyId
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_Intezmeny != null)
|
||||
{
|
||||
return m_Intezmeny.ID;
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_IntezmenyId;// XXX az meg nem teljesen OK
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
CheckModifyable();
|
||||
if (m_IntezmenyId != value)
|
||||
{
|
||||
m_IntezmenyId = value;
|
||||
m_Intezmeny = null;
|
||||
FieldModified("IntezmenyId", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ez egy külön bejárat a DA számára
|
||||
/// <summary>
|
||||
internal void ModifyIntezmeny(Intezmeny value)
|
||||
{
|
||||
m_IntezmenyId = value != null ? value.ID : -1;
|
||||
m_Intezmeny = value;
|
||||
FieldModified("IntezmenyId", value != null ? (object)value.ID : DBNull.Value);
|
||||
}
|
||||
|
||||
protected internal void SetIntezmeny(Intezmeny value)
|
||||
{
|
||||
m_Intezmeny = value;
|
||||
if (value != null)
|
||||
{
|
||||
m_IntezmenyId = value.ID;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_IntezmenyId = -1;
|
||||
}
|
||||
}
|
||||
|
||||
protected Intezmeny m_Intezmeny = null;
|
||||
|
||||
IIntezmeny ITanuloMulasztas.Intezmeny
|
||||
{
|
||||
get { return Intezmeny; }
|
||||
set { Intezmeny = value as Intezmeny; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Nincs definiálva megjegyzés.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Az UML modellben szereplő TanuloMulasztas és Intezmeny entitások közötti asszociáció megvalósítása.
|
||||
/// </remarks>
|
||||
[EntityProperty("Intezmeny", EntityPropertyBaseType.Entity, typeof(Intezmeny), EntityCopyMethod.ShallowCopy)]
|
||||
public virtual Intezmeny Intezmeny
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((m_Intezmeny == null) && (m_IntezmenyId != -1))
|
||||
{
|
||||
SDA.Kreta.Entities.Intezmeny partner = SDA.Kreta.Entities.Intezmeny.GiveAnInstance();
|
||||
partner.LoadByID(m_IntezmenyId);
|
||||
|
||||
this.SetIntezmeny(partner);
|
||||
}
|
||||
// természetesen null-t adunk vissza, ha nem tudtunk felhozni semmit
|
||||
return m_Intezmeny;
|
||||
}
|
||||
set
|
||||
{
|
||||
CheckModifyable();
|
||||
if (value != null)
|
||||
{
|
||||
if ((m_Intezmeny == null) || (value.ID != m_Intezmeny.ID))
|
||||
{
|
||||
if (value.State != EntityState.Initialized)
|
||||
{
|
||||
throw new EntityStateException(value.State);
|
||||
}
|
||||
if ((this.State != EntityState.New))
|
||||
{
|
||||
// Lista van a másik oldalon, úgyhogy a lista DA-ját használjuk
|
||||
SDA.Kreta.Entities.Intezmeny_TanuloMulasztas_DA da = new Intezmeny_TanuloMulasztas_DA(value);
|
||||
da.AddItem(this);
|
||||
this.SetIntezmeny(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.SetIntezmeny(value);
|
||||
}
|
||||
FieldModified("IntezmenyId", value.ID);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// ki kell törölni a kapcsolatot az adatbázisban
|
||||
this.SetIntezmeny(null);
|
||||
UpdateAssociations();
|
||||
FieldModified("IntezmenyId", DBNull.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region TanuloMulasztas (*) -> Tanev (1)
|
||||
|
||||
protected internal int m_TanevId = -1;
|
||||
|
||||
/// <summary>
|
||||
/// A(z) Tanev asszociáció végpontjának ID-ja.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// - Insert() előtt célszerű kitölteni
|
||||
/// - Update() nincs rá hatással: ezt a mezőt nem frissíti
|
||||
/// - LoadByID() felhozza ezt a mezőt
|
||||
/// </remarks>
|
||||
public virtual int TanevId
|
||||
{
|
||||
get
|
||||
{
|
||||
return InternalTanevId;
|
||||
}
|
||||
set
|
||||
{
|
||||
InternalTanevId = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ez egy külön bejárat a DA számára
|
||||
/// <summary>
|
||||
internal int InternalTanevId
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_Tanev != null)
|
||||
{
|
||||
return m_Tanev.ID;
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_TanevId;// XXX az meg nem teljesen OK
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
CheckModifyable();
|
||||
if (m_TanevId != value)
|
||||
{
|
||||
m_TanevId = value;
|
||||
m_Tanev = null;
|
||||
FieldModified("TanevId", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ez egy külön bejárat a DA számára
|
||||
/// <summary>
|
||||
internal void ModifyTanev(Tanev value)
|
||||
{
|
||||
m_TanevId = value != null ? value.ID : -1;
|
||||
m_Tanev = value;
|
||||
FieldModified("TanevId", value != null ? (object)value.ID : DBNull.Value);
|
||||
}
|
||||
|
||||
protected internal void SetTanev(Tanev value)
|
||||
{
|
||||
m_Tanev = value;
|
||||
if (value != null)
|
||||
{
|
||||
m_TanevId = value.ID;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_TanevId = -1;
|
||||
}
|
||||
}
|
||||
|
||||
protected Tanev m_Tanev = null;
|
||||
|
||||
ITanev ITanuloMulasztas.Tanev
|
||||
{
|
||||
get { return Tanev; }
|
||||
set { Tanev = value as Tanev; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Nincs definiálva megjegyzés.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Az UML modellben szereplő TanuloMulasztas és Tanev entitások közötti asszociáció megvalósítása.
|
||||
/// </remarks>
|
||||
[EntityProperty("Tanev", EntityPropertyBaseType.Entity, typeof(Tanev), EntityCopyMethod.ShallowCopy)]
|
||||
public virtual Tanev Tanev
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((m_Tanev == null) && (m_TanevId != -1))
|
||||
{
|
||||
SDA.Kreta.Entities.Tanev partner = SDA.Kreta.Entities.Tanev.GiveAnInstance();
|
||||
partner.LoadByID(m_TanevId);
|
||||
|
||||
this.SetTanev(partner);
|
||||
}
|
||||
// természetesen null-t adunk vissza, ha nem tudtunk felhozni semmit
|
||||
return m_Tanev;
|
||||
}
|
||||
set
|
||||
{
|
||||
CheckModifyable();
|
||||
if (value != null)
|
||||
{
|
||||
if ((m_Tanev == null) || (value.ID != m_Tanev.ID))
|
||||
{
|
||||
if (value.State != EntityState.Initialized)
|
||||
{
|
||||
throw new EntityStateException(value.State);
|
||||
}
|
||||
if ((this.State != EntityState.New))
|
||||
{
|
||||
// Lista van a másik oldalon, úgyhogy a lista DA-ját használjuk
|
||||
SDA.Kreta.Entities.Tanev_TanuloMulasztas_DA da = new Tanev_TanuloMulasztas_DA(value);
|
||||
da.AddItem(this);
|
||||
this.SetTanev(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.SetTanev(value);
|
||||
}
|
||||
FieldModified("TanevId", value.ID);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// ki kell törölni a kapcsolatot az adatbázisban
|
||||
this.SetTanev(null);
|
||||
UpdateAssociations();
|
||||
FieldModified("TanevId", DBNull.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region TanuloMulasztas (1) -> TanuloMulasztasLattamozas (*)
|
||||
protected IAssociatedEntityCollection<TanuloMulasztasLattamozas> m_TanuloMulasztasLattamozas = null;
|
||||
|
||||
IReadOnlyList<ITanuloMulasztasLattamozas> ITanuloMulasztas.TanuloMulasztasLattamozas => TanuloMulasztasLattamozas.Cast<ITanuloMulasztasLattamozas>().ToList();
|
||||
|
||||
/// <summary>
|
||||
/// Nincs definiálva megjegyzés.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Az UML modellben szereplő TanuloMulasztas és TanuloMulasztasLattamozas entitások közötti asszociáció megvalósítása.
|
||||
/// </remarks>
|
||||
[EntityProperty("TanuloMulasztasLattamozas", EntityPropertyBaseType.EntityCollection, typeof(IAssociatedEntityCollection<TanuloMulasztasLattamozas>), EntityCopyMethod.DeepCopy, "TanuloMulasztasId")]
|
||||
public virtual IAssociatedEntityCollection<TanuloMulasztasLattamozas> TanuloMulasztasLattamozas
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_TanuloMulasztasLattamozas == null)
|
||||
{
|
||||
m_TanuloMulasztasLattamozas = new AssociatedEntityCollection<TanuloMulasztas, TanuloMulasztasLattamozas>(
|
||||
new TanuloMulasztas_TanuloMulasztasLattamozas_DA(this)
|
||||
);
|
||||
m_TanuloMulasztasLattamozas.Load();
|
||||
}
|
||||
return m_TanuloMulasztasLattamozas;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue