diff --git a/Utilities/CodeGeneration/EdFi.Ods.CodeGen.Tests/Approval/5.2.0/DataStandard_520_ApprovalTests.Verify.Standard_Std_5.2.0_Models_Entities_Entities.generated.approved.cs b/Utilities/CodeGeneration/EdFi.Ods.CodeGen.Tests/Approval/5.2.0/DataStandard_520_ApprovalTests.Verify.Standard_Std_5.2.0_Models_Entities_Entities.generated.approved.cs
index 1564bd109..8a62647e4 100644
--- a/Utilities/CodeGeneration/EdFi.Ods.CodeGen.Tests/Approval/5.2.0/DataStandard_520_ApprovalTests.Verify.Standard_Std_5.2.0_Models_Entities_Entities.generated.approved.cs
+++ b/Utilities/CodeGeneration/EdFi.Ods.CodeGen.Tests/Approval/5.2.0/DataStandard_520_ApprovalTests.Verify.Standard_Std_5.2.0_Models_Entities_Entities.generated.approved.cs
@@ -16,75 +16,99 @@
using EdFi.Ods.Common.Infrastructure.Extensibility;
using EdFi.Ods.Common;
using EdFi.Ods.Common.Extensions;
+using EdFi.Ods.Common.Serialization;
using EdFi.Ods.Entities.Common.EdFi;
using Newtonsoft.Json;
+using MessagePack;
+using KeyAttribute = MessagePack.KeyAttribute;
-// Aggregate: AbsenceEventCategoryDescriptor
+// Aggregate: Descriptor
-namespace EdFi.Ods.Entities.NHibernate.AbsenceEventCategoryDescriptorAggregate.EdFi
+namespace EdFi.Ods.Entities.NHibernate.DescriptorAggregate.EdFi
{
// disable warnings for inheritance from classes marked Obsolete within this generated code only
#pragma warning disable 612, 618
///
- /// A class which represents the edfi.AbsenceEventCategoryDescriptor table of the AbsenceEventCategoryDescriptor aggregate in the ODS database.
+ /// A class which represents the edfi.Descriptor table of the Descriptor aggregate in the ODS database.
///
[Schema("edfi")]
[ExcludeFromCodeCoverage]
- public class AbsenceEventCategoryDescriptor : DescriptorAggregate.EdFi.Descriptor,
- Entities.Common.EdFi.IAbsenceEventCategoryDescriptor, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IEdFiDescriptor
+ [MessagePackObject]
+ public abstract class Descriptor : AggregateRootWithCompositeKey,
+ Entities.Common.EdFi.IDescriptor, IHasPrimaryKeyValues, IHasAlternateKeyValues, IHasLookupColumnPropertyMap
{
+ public virtual void SuspendReferenceAssignmentCheck() { }
+
+ public Descriptor()
+ {
+ }
+// restore warnings for inheritance from classes marked Obsolete
+#pragma warning restore 612, 618
// =============================================================
// Primary Key
// -------------------------------------------------------------
- [DomainSignature]
- public virtual int AbsenceEventCategoryDescriptorId
- {
- get { return base.DescriptorId; }
- set { base.DescriptorId = value; }
- }
-
+ [Key(6)]
+ public virtual int DescriptorId { get; set; }
// -------------------------------------------------------------
// =============================================================
// Inherited Properties
// -------------------------------------------------------------
- string IDescriptor.CodeValue
- {
- get { return CodeValue; }
- set { CodeValue = value; }
- }
- string IDescriptor.Description
- {
- get { return Description; }
- set { Description = value; }
- }
- DateTime? IDescriptor.EffectiveBeginDate
- {
- get { return EffectiveBeginDate; }
- set { EffectiveBeginDate = value; }
- }
- DateTime? IDescriptor.EffectiveEndDate
- {
- get { return EffectiveEndDate; }
- set { EffectiveEndDate = value; }
- }
- string IDescriptor.Namespace
- {
- get { return Namespace; }
- set { Namespace = value; }
- }
- string IDescriptor.ShortDescription
- {
- get { return ShortDescription; }
- set { ShortDescription = value; }
- }
// -------------------------------------------------------------
// =============================================================
// Properties
// -------------------------------------------------------------
+ [Key(7)]
+ public virtual string CodeValue { get; set; }
+ [Key(8)]
+ public virtual string Description { get; set; }
+ [Key(9)]
+ public virtual DateTime? EffectiveBeginDate
+ {
+ get { return _effectiveBeginDate; }
+ set
+ {
+ //This is only stored as a Date in the DB and NHibernate will retrieve it using the default (local) DateTime.Kind. We must ensure it is set consistently for any equality/change evaluation.
+ if(value == null)
+ {
+ _effectiveBeginDate = null;
+ } else
+ {
+ var given = (DateTime) value;
+ _effectiveBeginDate = new DateTime(given.Year, given.Month, given.Day);
+ }
+ }
+ }
+
+ private DateTime? _effectiveBeginDate;
+
+ [Key(10)]
+ public virtual DateTime? EffectiveEndDate
+ {
+ get { return _effectiveEndDate; }
+ set
+ {
+ //This is only stored as a Date in the DB and NHibernate will retrieve it using the default (local) DateTime.Kind. We must ensure it is set consistently for any equality/change evaluation.
+ if(value == null)
+ {
+ _effectiveEndDate = null;
+ } else
+ {
+ var given = (DateTime) value;
+ _effectiveEndDate = new DateTime(given.Year, given.Month, given.Day);
+ }
+ }
+ }
+
+ private DateTime? _effectiveEndDate;
+
+ [Key(11)]
+ public virtual string Namespace { get; set; }
+ [Key(12)]
+ public virtual string ShortDescription { get; set; }
// -------------------------------------------------------------
// =============================================================
@@ -124,11 +148,20 @@ OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
var keyValues = new OrderedDictionary();
// Add current key values
- keyValues.Add("AbsenceEventCategoryDescriptorId", AbsenceEventCategoryDescriptorId);
+ keyValues.Add("DescriptorId", DescriptorId);
return keyValues;
}
+ // Provide alternate key information
+ (OrderedDictionary keyValues, bool isDefinedOnBaseType) IHasAlternateKeyValues.GetAlternateKeyValues()
+ {
+ // Initialize a new dictionary to hold the key values
+ var keyValues = new OrderedDictionary();
+ keyValues.Add("Namespace", Namespace);
+ keyValues.Add("CodeValue", CodeValue);
+ return (keyValues, true);
+ }
#region Overrides for Equals() and GetHashCode()
public override bool Equals(object obj)
{
@@ -186,115 +219,37 @@ public override int GetHashCode()
return hashCode.ToHashCode();
}
#endregion
- bool ISynchronizable.Synchronize(object target)
- {
- return this.SynchronizeTo((Entities.Common.EdFi.IAbsenceEventCategoryDescriptor)target);
- }
-
- void IMappable.Map(object target)
- {
- this.MapTo((Entities.Common.EdFi.IAbsenceEventCategoryDescriptor) target, null);
- }
-
}
}
-// Aggregate: AcademicHonorCategoryDescriptor
+// Aggregate: EducationOrganization
-namespace EdFi.Ods.Entities.NHibernate.AcademicHonorCategoryDescriptorAggregate.EdFi
+namespace EdFi.Ods.Entities.NHibernate.EducationOrganizationAggregate.EdFi
{
-// disable warnings for inheritance from classes marked Obsolete within this generated code only
-#pragma warning disable 612, 618
-
///
- /// A class which represents the edfi.AcademicHonorCategoryDescriptor table of the AcademicHonorCategoryDescriptor aggregate in the ODS database.
+ /// Represents a read-only reference to the entity.
///
- [Schema("edfi")]
- [ExcludeFromCodeCoverage]
- public class AcademicHonorCategoryDescriptor : DescriptorAggregate.EdFi.Descriptor,
- Entities.Common.EdFi.IAcademicHonorCategoryDescriptor, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IEdFiDescriptor
+ [MessagePackObject]
+ public class EducationOrganizationReferenceData : IHasPrimaryKeyValues
{
-
// =============================================================
// Primary Key
// -------------------------------------------------------------
- [DomainSignature]
- public virtual int AcademicHonorCategoryDescriptorId
- {
- get { return base.DescriptorId; }
- set { base.DescriptorId = value; }
- }
-
- // -------------------------------------------------------------
-
- // =============================================================
- // Inherited Properties
- // -------------------------------------------------------------
- string IDescriptor.CodeValue
- {
- get { return CodeValue; }
- set { CodeValue = value; }
- }
- string IDescriptor.Description
- {
- get { return Description; }
- set { Description = value; }
- }
- DateTime? IDescriptor.EffectiveBeginDate
- {
- get { return EffectiveBeginDate; }
- set { EffectiveBeginDate = value; }
- }
- DateTime? IDescriptor.EffectiveEndDate
- {
- get { return EffectiveEndDate; }
- set { EffectiveEndDate = value; }
- }
- string IDescriptor.Namespace
- {
- get { return Namespace; }
- set { Namespace = value; }
- }
- string IDescriptor.ShortDescription
- {
- get { return ShortDescription; }
- set { ShortDescription = value; }
- }
- // -------------------------------------------------------------
-
- // =============================================================
- // Properties
- // -------------------------------------------------------------
- // -------------------------------------------------------------
-
- // =============================================================
- // One-to-one relationships
- // -------------------------------------------------------------
- // -------------------------------------------------------------
-
- // =============================================================
- // Extensions
- // -------------------------------------------------------------
- // -------------------------------------------------------------
-
- // =============================================================
- // Reference Data
- // -------------------------------------------------------------
- // -------------------------------------------------------------
-
- //=============================================================
- // Collections
- // -------------------------------------------------------------
+ [Key(0)]
+ public virtual long EducationOrganizationId { get; set; }
// -------------------------------------------------------------
- // Provide lookup property map
- private static readonly Dictionary _idPropertyByLookupProperty = new Dictionary(StringComparer.InvariantCultureIgnoreCase)
- {
- };
+ ///
+ /// The id of the referenced entity (used as the resource identifier in the API).
+ ///
+ [Key(1)]
+ public virtual Guid? Id { get; set; }
- Dictionary IHasLookupColumnPropertyMap.IdPropertyByLookupProperty
- {
- get { return _idPropertyByLookupProperty; }
- }
+ ///
+ /// Gets and sets the discriminator value which identifies the concrete sub-type of the referenced entity
+ /// when that entity has been derived; otherwise null.
+ ///
+ [Key(2)]
+ public virtual string Discriminator { get; set; }
// Provide primary key information
OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
@@ -303,7 +258,7 @@ OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
var keyValues = new OrderedDictionary();
// Add current key values
- keyValues.Add("AcademicHonorCategoryDescriptorId", AcademicHonorCategoryDescriptorId);
+ keyValues.Add("EducationOrganizationId", EducationOrganizationId);
return keyValues;
}
@@ -324,18 +279,8 @@ public override bool Equals(object obj)
foreach (DictionaryEntry entry in theseKeys)
{
- if (entry.Value is string)
- {
- if (!GeneratedArtifactStaticDependencies.DatabaseEngineSpecificStringComparer.Equals((string) entry.Value, (string) thoseKeys[entry.Key]))
- {
- return false;
- }
- }
- else
- {
- if (!entry.Value.Equals(thoseKeys[entry.Key]))
- return false;
- }
+ if (!entry.Value.Equals(thoseKeys[entry.Key]))
+ return false;
}
return true;
@@ -352,97 +297,97 @@ public override int GetHashCode()
foreach (DictionaryEntry entry in keyValues)
{
- if (entry.Value is string)
- {
- hashCode.Add(entry.Value as string, GeneratedArtifactStaticDependencies.DatabaseEngineSpecificStringComparer);
- }
- else
- {
- hashCode.Add(entry.Value);
- }
+ hashCode.Add(entry.Value);
}
return hashCode.ToHashCode();
}
#endregion
- bool ISynchronizable.Synchronize(object target)
- {
- return this.SynchronizeTo((Entities.Common.EdFi.IAcademicHonorCategoryDescriptor)target);
- }
-
- void IMappable.Map(object target)
- {
- this.MapTo((Entities.Common.EdFi.IAcademicHonorCategoryDescriptor) target, null);
- }
-
}
-}
-// Aggregate: AcademicSubjectDescriptor
-namespace EdFi.Ods.Entities.NHibernate.AcademicSubjectDescriptorAggregate.EdFi
-{
// disable warnings for inheritance from classes marked Obsolete within this generated code only
#pragma warning disable 612, 618
///
- /// A class which represents the edfi.AcademicSubjectDescriptor table of the AcademicSubjectDescriptor aggregate in the ODS database.
+ /// A class which represents the edfi.EducationOrganization table of the EducationOrganization aggregate in the ODS database.
///
[Schema("edfi")]
[ExcludeFromCodeCoverage]
- public class AcademicSubjectDescriptor : DescriptorAggregate.EdFi.Descriptor,
- Entities.Common.EdFi.IAcademicSubjectDescriptor, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IEdFiDescriptor
+ [MessagePackObject]
+ public abstract class EducationOrganization : AggregateRootWithCompositeKey,
+ Entities.Common.EdFi.IEducationOrganization, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap
{
+ public virtual void SuspendReferenceAssignmentCheck() { }
+
+ public EducationOrganization()
+ {
+ EducationOrganizationAddresses = new HashSet();
+ EducationOrganizationCategories = new HashSet();
+ EducationOrganizationIdentificationCodes = new HashSet();
+ EducationOrganizationIndicators = new HashSet();
+ EducationOrganizationInstitutionTelephones = new HashSet();
+ EducationOrganizationInternationalAddresses = new HashSet();
+ }
+// restore warnings for inheritance from classes marked Obsolete
+#pragma warning restore 612, 618
// =============================================================
// Primary Key
// -------------------------------------------------------------
- [DomainSignature]
- public virtual int AcademicSubjectDescriptorId
- {
- get { return base.DescriptorId; }
- set { base.DescriptorId = value; }
- }
-
+ [Key(6)]
+ public virtual long EducationOrganizationId { get; set; }
// -------------------------------------------------------------
// =============================================================
// Inherited Properties
// -------------------------------------------------------------
- string IDescriptor.CodeValue
- {
- get { return CodeValue; }
- set { CodeValue = value; }
- }
- string IDescriptor.Description
- {
- get { return Description; }
- set { Description = value; }
- }
- DateTime? IDescriptor.EffectiveBeginDate
- {
- get { return EffectiveBeginDate; }
- set { EffectiveBeginDate = value; }
- }
- DateTime? IDescriptor.EffectiveEndDate
- {
- get { return EffectiveEndDate; }
- set { EffectiveEndDate = value; }
- }
- string IDescriptor.Namespace
- {
- get { return Namespace; }
- set { Namespace = value; }
- }
- string IDescriptor.ShortDescription
- {
- get { return ShortDescription; }
- set { ShortDescription = value; }
- }
// -------------------------------------------------------------
// =============================================================
// Properties
// -------------------------------------------------------------
+ [Key(7)]
+ public virtual string NameOfInstitution { get; set; }
+ [Key(8)]
+ public virtual int? OperationalStatusDescriptorId
+ {
+ get
+ {
+ if (_operationalStatusDescriptorId == default(int?))
+ _operationalStatusDescriptorId = string.IsNullOrWhiteSpace(_operationalStatusDescriptor) ? default(int?) : GeneratedArtifactStaticDependencies.DescriptorResolver.GetDescriptorId("OperationalStatusDescriptor", _operationalStatusDescriptor);
+
+ return _operationalStatusDescriptorId;
+ }
+ set
+ {
+ _operationalStatusDescriptorId = value;
+ _operationalStatusDescriptor = null;
+ }
+ }
+
+ private int? _operationalStatusDescriptorId;
+ private string _operationalStatusDescriptor;
+
+ [IgnoreMember]
+ public virtual string OperationalStatusDescriptor
+ {
+ get
+ {
+ if (_operationalStatusDescriptor == null)
+ _operationalStatusDescriptor = _operationalStatusDescriptorId == null ? null : GeneratedArtifactStaticDependencies.DescriptorResolver.GetUri("OperationalStatusDescriptor", _operationalStatusDescriptorId.Value);
+
+ return _operationalStatusDescriptor;
+ }
+ set
+ {
+ _operationalStatusDescriptor = value;
+ _operationalStatusDescriptorId = default(int?);
+ }
+ }
+ [Key(9)]
+ public virtual string ShortNameOfInstitution { get; set; }
+ [Key(10)]
+ public virtual string WebSite { get; set; }
// -------------------------------------------------------------
// =============================================================
@@ -463,125 +408,342 @@ string IDescriptor.ShortDescription
//=============================================================
// Collections
// -------------------------------------------------------------
- // -------------------------------------------------------------
- // Provide lookup property map
- private static readonly Dictionary _idPropertyByLookupProperty = new Dictionary(StringComparer.InvariantCultureIgnoreCase)
+ private ICollection _educationOrganizationAddresses;
+ private ICollection _educationOrganizationAddressesCovariant;
+ [Key(11)]
+ [MessagePackFormatter(typeof(PersistentCollectionFormatter))]
+ public virtual ICollection EducationOrganizationAddresses
+ {
+ get
{
- };
+ // -------------------------------------------------------------
+ // On-demand deserialization logic to attach reverse reference of children
+ // due to ServiceStack's lack of [OnDeserialized] attribute support.
+ // Back-reference is required by NHibernate for persistence.
+ // -------------------------------------------------------------
+ if (_educationOrganizationAddresses is DeserializedPersistentGenericSet set)
+ {
+ set.Reattach(this, "EducationOrganizationAddresses");
+ }
+
+ foreach (var item in _educationOrganizationAddresses)
+ if (item.EducationOrganization == null)
+ item.EducationOrganization = this;
+ // -------------------------------------------------------------
- Dictionary IHasLookupColumnPropertyMap.IdPropertyByLookupProperty
- {
- get { return _idPropertyByLookupProperty; }
+ return _educationOrganizationAddresses;
+ }
+ set
+ {
+ _educationOrganizationAddresses = value;
+ _educationOrganizationAddressesCovariant = new CovariantCollectionAdapter(value);
+ }
}
- // Provide primary key information
- OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
+ // Covariant version, visible only on the interface
+ ICollection Entities.Common.EdFi.IEducationOrganization.EducationOrganizationAddresses
{
- // Initialize a new dictionary to hold the key values
- var keyValues = new OrderedDictionary();
-
- // Add current key values
- keyValues.Add("AcademicSubjectDescriptorId", AcademicSubjectDescriptorId);
+ get
+ {
+ // -------------------------------------------------------------
+ // Back-reference is required by NHibernate for persistence.
+ // -------------------------------------------------------------
+ foreach (var item in _educationOrganizationAddresses)
+ if (item.EducationOrganization == null)
+ item.EducationOrganization = this;
+ // -------------------------------------------------------------
- return keyValues;
+ return _educationOrganizationAddressesCovariant;
+ }
+ set
+ {
+ EducationOrganizationAddresses = new HashSet(value.Cast());
+ }
}
- #region Overrides for Equals() and GetHashCode()
- public override bool Equals(object obj)
+
+ private ICollection _educationOrganizationCategories;
+ private ICollection _educationOrganizationCategoriesCovariant;
+ [Key(12)]
+ [MessagePackFormatter(typeof(PersistentCollectionFormatter))]
+ public virtual ICollection EducationOrganizationCategories
{
- var compareTo = obj as IHasPrimaryKeyValues;
+ get
+ {
+ // -------------------------------------------------------------
+ // On-demand deserialization logic to attach reverse reference of children
+ // due to ServiceStack's lack of [OnDeserialized] attribute support.
+ // Back-reference is required by NHibernate for persistence.
+ // -------------------------------------------------------------
+ if (_educationOrganizationCategories is DeserializedPersistentGenericSet set)
+ {
+ set.Reattach(this, "EducationOrganizationCategories");
+ }
+
+ foreach (var item in _educationOrganizationCategories)
+ if (item.EducationOrganization == null)
+ item.EducationOrganization = this;
+ // -------------------------------------------------------------
- if (ReferenceEquals(this, compareTo))
- return true;
+ return _educationOrganizationCategories;
+ }
+ set
+ {
+ _educationOrganizationCategories = value;
+ _educationOrganizationCategoriesCovariant = new CovariantCollectionAdapter(value);
+ }
+ }
- if (compareTo == null)
- return false;
+ // Covariant version, visible only on the interface
+ ICollection Entities.Common.EdFi.IEducationOrganization.EducationOrganizationCategories
+ {
+ get
+ {
+ // -------------------------------------------------------------
+ // Back-reference is required by NHibernate for persistence.
+ // -------------------------------------------------------------
+ foreach (var item in _educationOrganizationCategories)
+ if (item.EducationOrganization == null)
+ item.EducationOrganization = this;
+ // -------------------------------------------------------------
- var theseKeys = (this as IHasPrimaryKeyValues).GetPrimaryKeyValues();
- var thoseKeys = compareTo.GetPrimaryKeyValues();
+ return _educationOrganizationCategoriesCovariant;
+ }
+ set
+ {
+ EducationOrganizationCategories = new HashSet(value.Cast());
+ }
+ }
- foreach (DictionaryEntry entry in theseKeys)
+
+ private ICollection _educationOrganizationIdentificationCodes;
+ private ICollection _educationOrganizationIdentificationCodesCovariant;
+ [Key(13)]
+ [MessagePackFormatter(typeof(PersistentCollectionFormatter))]
+ public virtual ICollection EducationOrganizationIdentificationCodes
+ {
+ get
{
- if (entry.Value is string)
- {
- if (!GeneratedArtifactStaticDependencies.DatabaseEngineSpecificStringComparer.Equals((string) entry.Value, (string) thoseKeys[entry.Key]))
- {
- return false;
- }
- }
- else
+ // -------------------------------------------------------------
+ // On-demand deserialization logic to attach reverse reference of children
+ // due to ServiceStack's lack of [OnDeserialized] attribute support.
+ // Back-reference is required by NHibernate for persistence.
+ // -------------------------------------------------------------
+ if (_educationOrganizationIdentificationCodes is DeserializedPersistentGenericSet set)
{
- if (!entry.Value.Equals(thoseKeys[entry.Key]))
- return false;
+ set.Reattach(this, "EducationOrganizationIdentificationCodes");
}
- }
+
+ foreach (var item in _educationOrganizationIdentificationCodes)
+ if (item.EducationOrganization == null)
+ item.EducationOrganization = this;
+ // -------------------------------------------------------------
- return true;
+ return _educationOrganizationIdentificationCodes;
+ }
+ set
+ {
+ _educationOrganizationIdentificationCodes = value;
+ _educationOrganizationIdentificationCodesCovariant = new CovariantCollectionAdapter(value);
+ }
}
- public override int GetHashCode()
+ // Covariant version, visible only on the interface
+ ICollection Entities.Common.EdFi.IEducationOrganization.EducationOrganizationIdentificationCodes
{
- var keyValues = (this as IHasPrimaryKeyValues).GetPrimaryKeyValues();
+ get
+ {
+ // -------------------------------------------------------------
+ // Back-reference is required by NHibernate for persistence.
+ // -------------------------------------------------------------
+ foreach (var item in _educationOrganizationIdentificationCodes)
+ if (item.EducationOrganization == null)
+ item.EducationOrganization = this;
+ // -------------------------------------------------------------
- if (keyValues.Count == 0)
- return base.GetHashCode();
+ return _educationOrganizationIdentificationCodesCovariant;
+ }
+ set
+ {
+ EducationOrganizationIdentificationCodes = new HashSet(value.Cast());
+ }
+ }
- var hashCode = new HashCode();
- foreach (DictionaryEntry entry in keyValues)
+ private ICollection _educationOrganizationIndicators;
+ private ICollection _educationOrganizationIndicatorsCovariant;
+ [Key(14)]
+ [MessagePackFormatter(typeof(PersistentCollectionFormatter))]
+ public virtual ICollection EducationOrganizationIndicators
+ {
+ get
{
- if (entry.Value is string)
+ // -------------------------------------------------------------
+ // On-demand deserialization logic to attach reverse reference of children
+ // due to ServiceStack's lack of [OnDeserialized] attribute support.
+ // Back-reference is required by NHibernate for persistence.
+ // -------------------------------------------------------------
+ if (_educationOrganizationIndicators is DeserializedPersistentGenericSet set)
{
- hashCode.Add(entry.Value as string, GeneratedArtifactStaticDependencies.DatabaseEngineSpecificStringComparer);
+ set.Reattach(this, "EducationOrganizationIndicators");
}
- else
+
+ foreach (var item in _educationOrganizationIndicators)
+ if (item.EducationOrganization == null)
+ item.EducationOrganization = this;
+ // -------------------------------------------------------------
+
+ return _educationOrganizationIndicators;
+ }
+ set
+ {
+ _educationOrganizationIndicators = value;
+ _educationOrganizationIndicatorsCovariant = new CovariantCollectionAdapter(value);
+ }
+ }
+
+ // Covariant version, visible only on the interface
+ ICollection Entities.Common.EdFi.IEducationOrganization.EducationOrganizationIndicators
+ {
+ get
+ {
+ // -------------------------------------------------------------
+ // Back-reference is required by NHibernate for persistence.
+ // -------------------------------------------------------------
+ foreach (var item in _educationOrganizationIndicators)
+ if (item.EducationOrganization == null)
+ item.EducationOrganization = this;
+ // -------------------------------------------------------------
+
+ return _educationOrganizationIndicatorsCovariant;
+ }
+ set
+ {
+ EducationOrganizationIndicators = new HashSet(value.Cast());
+ }
+ }
+
+
+ private ICollection _educationOrganizationInstitutionTelephones;
+ private ICollection _educationOrganizationInstitutionTelephonesCovariant;
+ [Key(15)]
+ [MessagePackFormatter(typeof(PersistentCollectionFormatter))]
+ public virtual ICollection EducationOrganizationInstitutionTelephones
+ {
+ get
+ {
+ // -------------------------------------------------------------
+ // On-demand deserialization logic to attach reverse reference of children
+ // due to ServiceStack's lack of [OnDeserialized] attribute support.
+ // Back-reference is required by NHibernate for persistence.
+ // -------------------------------------------------------------
+ if (_educationOrganizationInstitutionTelephones is DeserializedPersistentGenericSet set)
{
- hashCode.Add(entry.Value);
+ set.Reattach(this, "EducationOrganizationInstitutionTelephones");
}
- }
+
+ foreach (var item in _educationOrganizationInstitutionTelephones)
+ if (item.EducationOrganization == null)
+ item.EducationOrganization = this;
+ // -------------------------------------------------------------
- return hashCode.ToHashCode();
+ return _educationOrganizationInstitutionTelephones;
+ }
+ set
+ {
+ _educationOrganizationInstitutionTelephones = value;
+ _educationOrganizationInstitutionTelephonesCovariant = new CovariantCollectionAdapter(value);
+ }
}
- #endregion
- bool ISynchronizable.Synchronize(object target)
+
+ // Covariant version, visible only on the interface
+ ICollection Entities.Common.EdFi.IEducationOrganization.EducationOrganizationInstitutionTelephones
{
- return this.SynchronizeTo((Entities.Common.EdFi.IAcademicSubjectDescriptor)target);
+ get
+ {
+ // -------------------------------------------------------------
+ // Back-reference is required by NHibernate for persistence.
+ // -------------------------------------------------------------
+ foreach (var item in _educationOrganizationInstitutionTelephones)
+ if (item.EducationOrganization == null)
+ item.EducationOrganization = this;
+ // -------------------------------------------------------------
+
+ return _educationOrganizationInstitutionTelephonesCovariant;
+ }
+ set
+ {
+ EducationOrganizationInstitutionTelephones = new HashSet(value.Cast());
+ }
}
- void IMappable.Map(object target)
+
+ private ICollection _educationOrganizationInternationalAddresses;
+ private ICollection _educationOrganizationInternationalAddressesCovariant;
+ [Key(16)]
+ [MessagePackFormatter(typeof(PersistentCollectionFormatter))]
+ public virtual ICollection EducationOrganizationInternationalAddresses
{
- this.MapTo((Entities.Common.EdFi.IAcademicSubjectDescriptor) target, null);
+ get
+ {
+ // -------------------------------------------------------------
+ // On-demand deserialization logic to attach reverse reference of children
+ // due to ServiceStack's lack of [OnDeserialized] attribute support.
+ // Back-reference is required by NHibernate for persistence.
+ // -------------------------------------------------------------
+ if (_educationOrganizationInternationalAddresses is DeserializedPersistentGenericSet set)
+ {
+ set.Reattach(this, "EducationOrganizationInternationalAddresses");
+ }
+
+ foreach (var item in _educationOrganizationInternationalAddresses)
+ if (item.EducationOrganization == null)
+ item.EducationOrganization = this;
+ // -------------------------------------------------------------
+
+ return _educationOrganizationInternationalAddresses;
+ }
+ set
+ {
+ _educationOrganizationInternationalAddresses = value;
+ _educationOrganizationInternationalAddressesCovariant = new CovariantCollectionAdapter(value);
+ }
}
- }
-}
-// Aggregate: AcademicWeek
+ // Covariant version, visible only on the interface
+ ICollection Entities.Common.EdFi.IEducationOrganization.EducationOrganizationInternationalAddresses
+ {
+ get
+ {
+ // -------------------------------------------------------------
+ // Back-reference is required by NHibernate for persistence.
+ // -------------------------------------------------------------
+ foreach (var item in _educationOrganizationInternationalAddresses)
+ if (item.EducationOrganization == null)
+ item.EducationOrganization = this;
+ // -------------------------------------------------------------
+
+ return _educationOrganizationInternationalAddressesCovariant;
+ }
+ set
+ {
+ EducationOrganizationInternationalAddresses = new HashSet(value.Cast());
+ }
+ }
-namespace EdFi.Ods.Entities.NHibernate.AcademicWeekAggregate.EdFi
-{
- ///
- /// Represents a read-only reference to the entity.
- ///
- public class AcademicWeekReferenceData : IHasPrimaryKeyValues
- {
- // =============================================================
- // Primary Key
- // -------------------------------------------------------------
- public virtual long SchoolId { get; set; }
- public virtual string WeekIdentifier { get; set; }
// -------------------------------------------------------------
- ///
- /// The id of the referenced entity (used as the resource identifier in the API).
- ///
- public virtual Guid? Id { get; set; }
+ // Provide lookup property map
+ private static readonly Dictionary _idPropertyByLookupProperty = new Dictionary(StringComparer.InvariantCultureIgnoreCase)
+ {
+ { "OperationalStatusDescriptor", new LookupColumnDetails { PropertyName = "OperationalStatusDescriptorId", LookupTypeName = "OperationalStatusDescriptor"} },
+ };
- ///
- /// Gets and sets the discriminator value which identifies the concrete sub-type of the referenced entity
- /// when that entity has been derived; otherwise null.
- ///
- public virtual string Discriminator { get; set; }
+ Dictionary IHasLookupColumnPropertyMap.IdPropertyByLookupProperty
+ {
+ get { return _idPropertyByLookupProperty; }
+ }
// Provide primary key information
OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
@@ -590,8 +752,7 @@ OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
var keyValues = new OrderedDictionary();
// Add current key values
- keyValues.Add("SchoolId", SchoolId);
- keyValues.Add("WeekIdentifier", WeekIdentifier);
+ keyValues.Add("EducationOrganizationId", EducationOrganizationId);
return keyValues;
}
@@ -612,8 +773,18 @@ public override bool Equals(object obj)
foreach (DictionaryEntry entry in theseKeys)
{
- if (!entry.Value.Equals(thoseKeys[entry.Key]))
- return false;
+ if (entry.Value is string)
+ {
+ if (!GeneratedArtifactStaticDependencies.DatabaseEngineSpecificStringComparer.Equals((string) entry.Value, (string) thoseKeys[entry.Key]))
+ {
+ return false;
+ }
+ }
+ else
+ {
+ if (!entry.Value.Equals(thoseKeys[entry.Key]))
+ return false;
+ }
}
return true;
@@ -630,31 +801,39 @@ public override int GetHashCode()
foreach (DictionaryEntry entry in keyValues)
{
- hashCode.Add(entry.Value);
+ if (entry.Value is string)
+ {
+ hashCode.Add(entry.Value as string, GeneratedArtifactStaticDependencies.DatabaseEngineSpecificStringComparer);
+ }
+ else
+ {
+ hashCode.Add(entry.Value);
+ }
}
return hashCode.ToHashCode();
}
#endregion
}
-
// disable warnings for inheritance from classes marked Obsolete within this generated code only
#pragma warning disable 612, 618
///
- /// A class which represents the edfi.AcademicWeek table of the AcademicWeek aggregate in the ODS database.
+ /// A class which represents the edfi.EducationOrganizationAddress table of the EducationOrganization aggregate in the ODS database.
///
[Schema("edfi")]
[ExcludeFromCodeCoverage]
- public class AcademicWeek : AggregateRootWithCompositeKey,
- Entities.Common.EdFi.IAcademicWeek, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IHasExtensions
+ [MessagePackObject]
+ public class EducationOrganizationAddress : EntityWithCompositeKey, IChildEntity,
+ Entities.Common.EdFi.IEducationOrganizationAddress, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IHasExtensions
{
public virtual void SuspendReferenceAssignmentCheck() { }
- public AcademicWeek()
+ public EducationOrganizationAddress()
{
- Extensions = EntityExtensionsFactory.Instance == null ? new Dictionary() : new Dictionary(EntityExtensionsFactory.Instance.CreateRequiredEntityExtensions(this));
- AggregateExtensions = EntityExtensionsFactory.Instance == null ? new Dictionary() : new Dictionary(EntityExtensionsFactory.Instance.CreateAggregateExtensions());
+ EducationOrganizationAddressPeriods = new HashSet();
+ Extensions = GeneratedArtifactStaticDependencies.EntityExtensionsFactory == null ? new Dictionary() : new Dictionary(GeneratedArtifactStaticDependencies.EntityExtensionsFactory.CreateRequiredEntityExtensions(this));
+ AggregateExtensions = GeneratedArtifactStaticDependencies.EntityExtensionsFactory == null ? new Dictionary() : new Dictionary(GeneratedArtifactStaticDependencies.EntityExtensionsFactory.CreateAggregateExtensions());
}
// restore warnings for inheritance from classes marked Obsolete
#pragma warning restore 612, 618
@@ -662,10 +841,98 @@ public AcademicWeek()
// =============================================================
// Primary Key
// -------------------------------------------------------------
+ [DomainSignature, IgnoreMember]
+ public virtual EducationOrganization EducationOrganization { get; set; }
+
+ Entities.Common.EdFi.IEducationOrganization IEducationOrganizationAddress.EducationOrganization
+ {
+ get { return EducationOrganization; }
+ set { EducationOrganization = (EducationOrganization) value; }
+ }
+
[DomainSignature]
- public virtual long SchoolId { get; set; }
+ [Key(1)]
+ public virtual int AddressTypeDescriptorId
+ {
+ get
+ {
+ if (_addressTypeDescriptorId == default(int))
+ _addressTypeDescriptorId = GeneratedArtifactStaticDependencies.DescriptorResolver.GetDescriptorId("AddressTypeDescriptor", _addressTypeDescriptor);
+
+ return _addressTypeDescriptorId;
+ }
+ set
+ {
+ _addressTypeDescriptorId = value;
+ _addressTypeDescriptor = null;
+ }
+ }
+
+ private int _addressTypeDescriptorId;
+ private string _addressTypeDescriptor;
+
+ [IgnoreMember]
+ public virtual string AddressTypeDescriptor
+ {
+ get
+ {
+ if (_addressTypeDescriptor == null)
+ _addressTypeDescriptor = GeneratedArtifactStaticDependencies.DescriptorResolver.GetUri("AddressTypeDescriptor", _addressTypeDescriptorId);
+
+ return _addressTypeDescriptor;
+ }
+ set
+ {
+ _addressTypeDescriptor = value;
+ _addressTypeDescriptorId = default(int);
+ }
+ }
[DomainSignature]
- public virtual string WeekIdentifier { get; set; }
+ [Key(2)]
+ public virtual string City { get; set; }
+ [DomainSignature]
+ [Key(3)]
+ public virtual string PostalCode { get; set; }
+ [DomainSignature]
+ [Key(4)]
+ public virtual int StateAbbreviationDescriptorId
+ {
+ get
+ {
+ if (_stateAbbreviationDescriptorId == default(int))
+ _stateAbbreviationDescriptorId = GeneratedArtifactStaticDependencies.DescriptorResolver.GetDescriptorId("StateAbbreviationDescriptor", _stateAbbreviationDescriptor);
+
+ return _stateAbbreviationDescriptorId;
+ }
+ set
+ {
+ _stateAbbreviationDescriptorId = value;
+ _stateAbbreviationDescriptor = null;
+ }
+ }
+
+ private int _stateAbbreviationDescriptorId;
+ private string _stateAbbreviationDescriptor;
+
+ [IgnoreMember]
+ public virtual string StateAbbreviationDescriptor
+ {
+ get
+ {
+ if (_stateAbbreviationDescriptor == null)
+ _stateAbbreviationDescriptor = GeneratedArtifactStaticDependencies.DescriptorResolver.GetUri("StateAbbreviationDescriptor", _stateAbbreviationDescriptorId);
+
+ return _stateAbbreviationDescriptor;
+ }
+ set
+ {
+ _stateAbbreviationDescriptor = value;
+ _stateAbbreviationDescriptorId = default(int);
+ }
+ }
+ [DomainSignature]
+ [Key(5)]
+ public virtual string StreetNumberName { get; set; }
// -------------------------------------------------------------
// =============================================================
@@ -676,25 +943,58 @@ public AcademicWeek()
// =============================================================
// Properties
// -------------------------------------------------------------
- public virtual DateTime BeginDate
+ [Key(6)]
+ public virtual string ApartmentRoomSuiteNumber { get; set; }
+ [Key(7)]
+ public virtual string BuildingSiteNumber { get; set; }
+ [Key(8)]
+ public virtual string CongressionalDistrict { get; set; }
+ [Key(9)]
+ public virtual string CountyFIPSCode { get; set; }
+ [Key(10)]
+ public virtual bool? DoNotPublishIndicator { get; set; }
+ [Key(11)]
+ public virtual string Latitude { get; set; }
+ [Key(12)]
+ public virtual int? LocaleDescriptorId
{
- get { return _beginDate; }
- //This is only stored as a Date in the DB and NHibernate will retrieve it using the default (local) DateTime.Kind. We must ensure it is set consistently for any equality/change evaluation.
- set { _beginDate = new DateTime(value.Year, value.Month, value.Day); }
+ get
+ {
+ if (_localeDescriptorId == default(int?))
+ _localeDescriptorId = string.IsNullOrWhiteSpace(_localeDescriptor) ? default(int?) : GeneratedArtifactStaticDependencies.DescriptorResolver.GetDescriptorId("LocaleDescriptor", _localeDescriptor);
+
+ return _localeDescriptorId;
+ }
+ set
+ {
+ _localeDescriptorId = value;
+ _localeDescriptor = null;
+ }
}
- private DateTime _beginDate;
-
- public virtual DateTime EndDate
+ private int? _localeDescriptorId;
+ private string _localeDescriptor;
+
+ [IgnoreMember]
+ public virtual string LocaleDescriptor
{
- get { return _endDate; }
- //This is only stored as a Date in the DB and NHibernate will retrieve it using the default (local) DateTime.Kind. We must ensure it is set consistently for any equality/change evaluation.
- set { _endDate = new DateTime(value.Year, value.Month, value.Day); }
+ get
+ {
+ if (_localeDescriptor == null)
+ _localeDescriptor = _localeDescriptorId == null ? null : GeneratedArtifactStaticDependencies.DescriptorResolver.GetUri("LocaleDescriptor", _localeDescriptorId.Value);
+
+ return _localeDescriptor;
+ }
+ set
+ {
+ _localeDescriptor = value;
+ _localeDescriptorId = default(int?);
+ }
}
-
- private DateTime _endDate;
-
- public virtual int TotalInstructionalDays { get; set; }
+ [Key(13)]
+ public virtual string Longitude { get; set; }
+ [Key(14)]
+ public virtual string NameOfCounty { get; set; }
// -------------------------------------------------------------
// =============================================================
@@ -707,14 +1007,27 @@ public virtual DateTime EndDate
// -------------------------------------------------------------
private IDictionary _extensions;
+ [MessagePackFormatter(typeof(EntityExtensionsMessagePackFormatter), "EducationOrganization", "EducationOrganizationAddress")]
+ [Key(15)]
public IDictionary Extensions
{
- get => _extensions;
+ get
+ {
+ foreach (var key in _extensions.Keys)
+ {
+ if (_extensions[key] is IDeserializedPersistentGenericCollection collection)
+ {
+ collection.ReattachExtension(this, (string) key);
+ }
+ }
+
+ return _extensions;
+ }
set
{
// If the _extensions is null, this is being assigned from the constructor
// for the first time and no special handling is required
- if (_extensions != null)
+ if (_extensions != null && value != null)
{
// For extensions that have already been initialized by the extensions factory,
// we need to copy any "implicit" extension object entries over to the incoming
@@ -733,33 +1046,119 @@ public IDictionary Extensions
}
}
- public IDictionary AggregateExtensions { get; set; }
+ private IDictionary _aggregateExtensions;
+
+ [MessagePackFormatter(typeof(AggregateExtensionsMessagePackFormatter), "EducationOrganization", "EducationOrganizationAddress")]
+ [Key(16)]
+ public IDictionary AggregateExtensions
+ {
+ get
+ {
+ foreach (var key in _aggregateExtensions.Keys)
+ {
+ if (_aggregateExtensions[key] is IDeserializedPersistentGenericCollection collection)
+ {
+ collection.ReattachAggregateExtension(this, (string) key);
+ }
+ }
+
+ return _aggregateExtensions;
+ }
+ set
+ {
+ // If the _aggregateExtensions is null, this is being assigned from the constructor
+ // for the first time and no special handling is required
+ if (_aggregateExtensions != null && value != null)
+ {
+ // For aggregate extensions that have already been initialized by the extensions factory,
+ // we need to copy any "implicit" aggregate extension object entries over to the incoming
+ // value dictionary being assigned by NHibernate (or deserialization) because it won't have them,
+ // but they must be there for correct handling of extensions for the API.
+ foreach (var key in _aggregateExtensions.Keys)
+ {
+ if (!value.Contains(key))
+ {
+ value[key] = _aggregateExtensions[key];
+ }
+ }
+ }
+
+ _aggregateExtensions = value;
+ }
+ }
+
// -------------------------------------------------------------
// =============================================================
// Reference Data
// -------------------------------------------------------------
- public virtual NHibernate.EducationOrganizationAggregate.EdFi.EducationOrganizationReferenceData SchoolReferenceData { get; set; }
-
- ///
- /// Read-only property that allows the School resource identifier value to be mapped to the resource reference.
- ///
- Guid? Entities.Common.EdFi.IAcademicWeek.SchoolResourceId
- {
- get { return SchoolReferenceData?.Id; }
- set { }
- }
-
// -------------------------------------------------------------
//=============================================================
// Collections
// -------------------------------------------------------------
+
+ private ICollection _educationOrganizationAddressPeriods;
+ private ICollection _educationOrganizationAddressPeriodsCovariant;
+ [Key(17)]
+ [MessagePackFormatter(typeof(PersistentCollectionFormatter))]
+ public virtual ICollection EducationOrganizationAddressPeriods
+ {
+ get
+ {
+ // -------------------------------------------------------------
+ // On-demand deserialization logic to attach reverse reference of children
+ // due to ServiceStack's lack of [OnDeserialized] attribute support.
+ // Back-reference is required by NHibernate for persistence.
+ // -------------------------------------------------------------
+ if (_educationOrganizationAddressPeriods is DeserializedPersistentGenericSet set)
+ {
+ set.Reattach(this, "EducationOrganizationAddressPeriods");
+ }
+
+ foreach (var item in _educationOrganizationAddressPeriods)
+ if (item.EducationOrganizationAddress == null)
+ item.EducationOrganizationAddress = this;
+ // -------------------------------------------------------------
+
+ return _educationOrganizationAddressPeriods;
+ }
+ set
+ {
+ _educationOrganizationAddressPeriods = value;
+ _educationOrganizationAddressPeriodsCovariant = new CovariantCollectionAdapter(value);
+ }
+ }
+
+ // Covariant version, visible only on the interface
+ ICollection Entities.Common.EdFi.IEducationOrganizationAddress.EducationOrganizationAddressPeriods
+ {
+ get
+ {
+ // -------------------------------------------------------------
+ // Back-reference is required by NHibernate for persistence.
+ // -------------------------------------------------------------
+ foreach (var item in _educationOrganizationAddressPeriods)
+ if (item.EducationOrganizationAddress == null)
+ item.EducationOrganizationAddress = this;
+ // -------------------------------------------------------------
+
+ return _educationOrganizationAddressPeriodsCovariant;
+ }
+ set
+ {
+ EducationOrganizationAddressPeriods = new HashSet(value.Cast());
+ }
+ }
+
// -------------------------------------------------------------
// Provide lookup property map
private static readonly Dictionary _idPropertyByLookupProperty = new Dictionary(StringComparer.InvariantCultureIgnoreCase)
{
+ { "AddressTypeDescriptor", new LookupColumnDetails { PropertyName = "AddressTypeDescriptorId", LookupTypeName = "AddressTypeDescriptor"} },
+ { "LocaleDescriptor", new LookupColumnDetails { PropertyName = "LocaleDescriptorId", LookupTypeName = "LocaleDescriptor"} },
+ { "StateAbbreviationDescriptor", new LookupColumnDetails { PropertyName = "StateAbbreviationDescriptorId", LookupTypeName = "StateAbbreviationDescriptor"} },
};
Dictionary IHasLookupColumnPropertyMap.IdPropertyByLookupProperty
@@ -770,12 +1169,15 @@ Dictionary IHasLookupColumnPropertyMap.IdPropertyBy
// Provide primary key information
OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
{
- // Initialize a new dictionary to hold the key values
- var keyValues = new OrderedDictionary();
+ // Get parent key values
+ var keyValues = (EducationOrganization as IHasPrimaryKeyValues)?.GetPrimaryKeyValues() ?? new OrderedDictionary();
// Add current key values
- keyValues.Add("SchoolId", SchoolId);
- keyValues.Add("WeekIdentifier", WeekIdentifier);
+ keyValues.Add("AddressTypeDescriptorId", AddressTypeDescriptorId);
+ keyValues.Add("City", City);
+ keyValues.Add("PostalCode", PostalCode);
+ keyValues.Add("StateAbbreviationDescriptorId", StateAbbreviationDescriptorId);
+ keyValues.Add("StreetNumberName", StreetNumberName);
return keyValues;
}
@@ -839,82 +1241,94 @@ public override int GetHashCode()
#endregion
bool ISynchronizable.Synchronize(object target)
{
- return this.SynchronizeTo((Entities.Common.EdFi.IAcademicWeek)target);
+ return this.SynchronizeTo((Entities.Common.EdFi.IEducationOrganizationAddress)target);
}
void IMappable.Map(object target)
{
- this.MapTo((Entities.Common.EdFi.IAcademicWeek) target, null);
+ this.MapTo((Entities.Common.EdFi.IEducationOrganizationAddress) target, null);
}
+ void IChildEntity.SetParent(object value)
+ {
+ EducationOrganization = (EducationOrganization) value;
+ }
}
-}
-// Aggregate: AccommodationDescriptor
-
-namespace EdFi.Ods.Entities.NHibernate.AccommodationDescriptorAggregate.EdFi
-{
// disable warnings for inheritance from classes marked Obsolete within this generated code only
#pragma warning disable 612, 618
///
- /// A class which represents the edfi.AccommodationDescriptor table of the AccommodationDescriptor aggregate in the ODS database.
+ /// A class which represents the edfi.EducationOrganizationAddressPeriod table of the EducationOrganization aggregate in the ODS database.
///
[Schema("edfi")]
[ExcludeFromCodeCoverage]
- public class AccommodationDescriptor : DescriptorAggregate.EdFi.Descriptor,
- Entities.Common.EdFi.IAccommodationDescriptor, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IEdFiDescriptor
+ [MessagePackObject]
+ public class EducationOrganizationAddressPeriod : EntityWithCompositeKey, IChildEntity,
+ Entities.Common.EdFi.IEducationOrganizationAddressPeriod, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IHasExtensions
{
+ public virtual void SuspendReferenceAssignmentCheck() { }
+
+ public EducationOrganizationAddressPeriod()
+ {
+ Extensions = GeneratedArtifactStaticDependencies.EntityExtensionsFactory == null ? new Dictionary() : new Dictionary(GeneratedArtifactStaticDependencies.EntityExtensionsFactory.CreateRequiredEntityExtensions(this));
+ AggregateExtensions = GeneratedArtifactStaticDependencies.EntityExtensionsFactory == null ? new Dictionary() : new Dictionary(GeneratedArtifactStaticDependencies.EntityExtensionsFactory.CreateAggregateExtensions());
+ }
+// restore warnings for inheritance from classes marked Obsolete
+#pragma warning restore 612, 618
// =============================================================
// Primary Key
// -------------------------------------------------------------
+ [DomainSignature, IgnoreMember]
+ public virtual EducationOrganizationAddress EducationOrganizationAddress { get; set; }
+
+ Entities.Common.EdFi.IEducationOrganizationAddress IEducationOrganizationAddressPeriod.EducationOrganizationAddress
+ {
+ get { return EducationOrganizationAddress; }
+ set { EducationOrganizationAddress = (EducationOrganizationAddress) value; }
+ }
+
[DomainSignature]
- public virtual int AccommodationDescriptorId
+ [Key(1)]
+ public virtual DateTime BeginDate
{
- get { return base.DescriptorId; }
- set { base.DescriptorId = value; }
+ get { return _beginDate; }
+ //This is only stored as a Date in the DB and NHibernate will retrieve it using the default (local) DateTime.Kind. We must ensure it is set consistently for any equality/change evaluation.
+ set { _beginDate = new DateTime(value.Year, value.Month, value.Day); }
}
+
+ private DateTime _beginDate;
// -------------------------------------------------------------
// =============================================================
// Inherited Properties
// -------------------------------------------------------------
- string IDescriptor.CodeValue
- {
- get { return CodeValue; }
- set { CodeValue = value; }
- }
- string IDescriptor.Description
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // Properties
+ // -------------------------------------------------------------
+ [Key(2)]
+ public virtual DateTime? EndDate
{
- get { return Description; }
- set { Description = value; }
- }
- DateTime? IDescriptor.EffectiveBeginDate
- {
- get { return EffectiveBeginDate; }
- set { EffectiveBeginDate = value; }
- }
- DateTime? IDescriptor.EffectiveEndDate
- {
- get { return EffectiveEndDate; }
- set { EffectiveEndDate = value; }
- }
- string IDescriptor.Namespace
- {
- get { return Namespace; }
- set { Namespace = value; }
- }
- string IDescriptor.ShortDescription
- {
- get { return ShortDescription; }
- set { ShortDescription = value; }
+ get { return _endDate; }
+ set
+ {
+ //This is only stored as a Date in the DB and NHibernate will retrieve it using the default (local) DateTime.Kind. We must ensure it is set consistently for any equality/change evaluation.
+ if(value == null)
+ {
+ _endDate = null;
+ } else
+ {
+ var given = (DateTime) value;
+ _endDate = new DateTime(given.Year, given.Month, given.Day);
+ }
+ }
}
- // -------------------------------------------------------------
- // =============================================================
- // Properties
- // -------------------------------------------------------------
+ private DateTime? _endDate;
+
// -------------------------------------------------------------
// =============================================================
@@ -925,6 +1339,88 @@ string IDescriptor.ShortDescription
// =============================================================
// Extensions
// -------------------------------------------------------------
+ private IDictionary _extensions;
+
+ [MessagePackFormatter(typeof(EntityExtensionsMessagePackFormatter), "EducationOrganization", "EducationOrganizationAddressPeriod")]
+ [Key(3)]
+ public IDictionary Extensions
+ {
+ get
+ {
+ foreach (var key in _extensions.Keys)
+ {
+ if (_extensions[key] is IDeserializedPersistentGenericCollection collection)
+ {
+ collection.ReattachExtension(this, (string) key);
+ }
+ }
+
+ return _extensions;
+ }
+ set
+ {
+ // If the _extensions is null, this is being assigned from the constructor
+ // for the first time and no special handling is required
+ if (_extensions != null && value != null)
+ {
+ // For extensions that have already been initialized by the extensions factory,
+ // we need to copy any "implicit" extension object entries over to the incoming
+ // value dictionary being assigned by NHibernate because it won't have them,
+ // but they must be there for correct handling of extensions for the API.
+ foreach (var key in _extensions.Keys)
+ {
+ if (!value.Contains(key))
+ {
+ value[key] = _extensions[key];
+ }
+ }
+ }
+
+ _extensions = value;
+ }
+ }
+
+ private IDictionary _aggregateExtensions;
+
+ [MessagePackFormatter(typeof(AggregateExtensionsMessagePackFormatter), "EducationOrganization", "EducationOrganizationAddressPeriod")]
+ [Key(4)]
+ public IDictionary AggregateExtensions
+ {
+ get
+ {
+ foreach (var key in _aggregateExtensions.Keys)
+ {
+ if (_aggregateExtensions[key] is IDeserializedPersistentGenericCollection collection)
+ {
+ collection.ReattachAggregateExtension(this, (string) key);
+ }
+ }
+
+ return _aggregateExtensions;
+ }
+ set
+ {
+ // If the _aggregateExtensions is null, this is being assigned from the constructor
+ // for the first time and no special handling is required
+ if (_aggregateExtensions != null && value != null)
+ {
+ // For aggregate extensions that have already been initialized by the extensions factory,
+ // we need to copy any "implicit" aggregate extension object entries over to the incoming
+ // value dictionary being assigned by NHibernate (or deserialization) because it won't have them,
+ // but they must be there for correct handling of extensions for the API.
+ foreach (var key in _aggregateExtensions.Keys)
+ {
+ if (!value.Contains(key))
+ {
+ value[key] = _aggregateExtensions[key];
+ }
+ }
+ }
+
+ _aggregateExtensions = value;
+ }
+ }
+
// -------------------------------------------------------------
// =============================================================
@@ -940,6 +1436,8 @@ string IDescriptor.ShortDescription
// Provide lookup property map
private static readonly Dictionary _idPropertyByLookupProperty = new Dictionary(StringComparer.InvariantCultureIgnoreCase)
{
+ { "AddressTypeDescriptor", new LookupColumnDetails { PropertyName = "AddressTypeDescriptorId", LookupTypeName = "AddressTypeDescriptor"} },
+ { "StateAbbreviationDescriptor", new LookupColumnDetails { PropertyName = "StateAbbreviationDescriptorId", LookupTypeName = "StateAbbreviationDescriptor"} },
};
Dictionary IHasLookupColumnPropertyMap.IdPropertyByLookupProperty
@@ -950,11 +1448,11 @@ Dictionary IHasLookupColumnPropertyMap.IdPropertyBy
// Provide primary key information
OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
{
- // Initialize a new dictionary to hold the key values
- var keyValues = new OrderedDictionary();
+ // Get parent key values
+ var keyValues = (EducationOrganizationAddress as IHasPrimaryKeyValues)?.GetPrimaryKeyValues() ?? new OrderedDictionary();
// Add current key values
- keyValues.Add("AccommodationDescriptorId", AccommodationDescriptorId);
+ keyValues.Add("BeginDate", BeginDate);
return keyValues;
}
@@ -1018,117 +1516,37 @@ public override int GetHashCode()
#endregion
bool ISynchronizable.Synchronize(object target)
{
- return this.SynchronizeTo((Entities.Common.EdFi.IAccommodationDescriptor)target);
+ return this.SynchronizeTo((Entities.Common.EdFi.IEducationOrganizationAddressPeriod)target);
}
void IMappable.Map(object target)
{
- this.MapTo((Entities.Common.EdFi.IAccommodationDescriptor) target, null);
- }
-
- }
-}
-// Aggregate: AccountabilityRating
-
-namespace EdFi.Ods.Entities.NHibernate.AccountabilityRatingAggregate.EdFi
-{
- ///
- /// Represents a read-only reference to the entity.
- ///
- public class AccountabilityRatingReferenceData : IHasPrimaryKeyValues
- {
- // =============================================================
- // Primary Key
- // -------------------------------------------------------------
- public virtual long EducationOrganizationId { get; set; }
- public virtual string RatingTitle { get; set; }
- public virtual short SchoolYear { get; set; }
- // -------------------------------------------------------------
-
- ///
- /// The id of the referenced entity (used as the resource identifier in the API).
- ///
- public virtual Guid? Id { get; set; }
-
- ///
- /// Gets and sets the discriminator value which identifies the concrete sub-type of the referenced entity
- /// when that entity has been derived; otherwise null.
- ///
- public virtual string Discriminator { get; set; }
-
- // Provide primary key information
- OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
- {
- // Initialize a new dictionary to hold the key values
- var keyValues = new OrderedDictionary();
-
- // Add current key values
- keyValues.Add("EducationOrganizationId", EducationOrganizationId);
- keyValues.Add("RatingTitle", RatingTitle);
- keyValues.Add("SchoolYear", SchoolYear);
-
- return keyValues;
- }
-
- #region Overrides for Equals() and GetHashCode()
- public override bool Equals(object obj)
- {
- var compareTo = obj as IHasPrimaryKeyValues;
-
- if (ReferenceEquals(this, compareTo))
- return true;
-
- if (compareTo == null)
- return false;
-
- var theseKeys = (this as IHasPrimaryKeyValues).GetPrimaryKeyValues();
- var thoseKeys = compareTo.GetPrimaryKeyValues();
-
- foreach (DictionaryEntry entry in theseKeys)
- {
- if (!entry.Value.Equals(thoseKeys[entry.Key]))
- return false;
- }
-
- return true;
+ this.MapTo((Entities.Common.EdFi.IEducationOrganizationAddressPeriod) target, null);
}
- public override int GetHashCode()
+ void IChildEntity.SetParent(object value)
{
- var keyValues = (this as IHasPrimaryKeyValues).GetPrimaryKeyValues();
-
- if (keyValues.Count == 0)
- return base.GetHashCode();
-
- var hashCode = new HashCode();
-
- foreach (DictionaryEntry entry in keyValues)
- {
- hashCode.Add(entry.Value);
- }
-
- return hashCode.ToHashCode();
+ EducationOrganizationAddress = (EducationOrganizationAddress) value;
}
- #endregion
}
-
// disable warnings for inheritance from classes marked Obsolete within this generated code only
#pragma warning disable 612, 618
///
- /// A class which represents the edfi.AccountabilityRating table of the AccountabilityRating aggregate in the ODS database.
+ /// A class which represents the edfi.EducationOrganizationCategory table of the EducationOrganization aggregate in the ODS database.
///
[Schema("edfi")]
[ExcludeFromCodeCoverage]
- public class AccountabilityRating : AggregateRootWithCompositeKey,
- Entities.Common.EdFi.IAccountabilityRating, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IHasExtensions
+ [MessagePackObject]
+ public class EducationOrganizationCategory : EntityWithCompositeKey, IChildEntity,
+ Entities.Common.EdFi.IEducationOrganizationCategory, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IHasExtensions
{
public virtual void SuspendReferenceAssignmentCheck() { }
- public AccountabilityRating()
+ public EducationOrganizationCategory()
{
- Extensions = EntityExtensionsFactory.Instance == null ? new Dictionary() : new Dictionary(EntityExtensionsFactory.Instance.CreateRequiredEntityExtensions(this));
- AggregateExtensions = EntityExtensionsFactory.Instance == null ? new Dictionary() : new Dictionary(EntityExtensionsFactory.Instance.CreateAggregateExtensions());
+ Extensions = GeneratedArtifactStaticDependencies.EntityExtensionsFactory == null ? new Dictionary() : new Dictionary(GeneratedArtifactStaticDependencies.EntityExtensionsFactory.CreateRequiredEntityExtensions(this));
+ AggregateExtensions = GeneratedArtifactStaticDependencies.EntityExtensionsFactory == null ? new Dictionary() : new Dictionary(GeneratedArtifactStaticDependencies.EntityExtensionsFactory.CreateAggregateExtensions());
}
// restore warnings for inheritance from classes marked Obsolete
#pragma warning restore 612, 618
@@ -1136,12 +1554,52 @@ public AccountabilityRating()
// =============================================================
// Primary Key
// -------------------------------------------------------------
+ [DomainSignature, IgnoreMember]
+ public virtual EducationOrganization EducationOrganization { get; set; }
+
+ Entities.Common.EdFi.IEducationOrganization IEducationOrganizationCategory.EducationOrganization
+ {
+ get { return EducationOrganization; }
+ set { EducationOrganization = (EducationOrganization) value; }
+ }
+
[DomainSignature]
- public virtual long EducationOrganizationId { get; set; }
- [DomainSignature]
- public virtual string RatingTitle { get; set; }
- [DomainSignature]
- public virtual short SchoolYear { get; set; }
+ [Key(1)]
+ public virtual int EducationOrganizationCategoryDescriptorId
+ {
+ get
+ {
+ if (_educationOrganizationCategoryDescriptorId == default(int))
+ _educationOrganizationCategoryDescriptorId = GeneratedArtifactStaticDependencies.DescriptorResolver.GetDescriptorId("EducationOrganizationCategoryDescriptor", _educationOrganizationCategoryDescriptor);
+
+ return _educationOrganizationCategoryDescriptorId;
+ }
+ set
+ {
+ _educationOrganizationCategoryDescriptorId = value;
+ _educationOrganizationCategoryDescriptor = null;
+ }
+ }
+
+ private int _educationOrganizationCategoryDescriptorId;
+ private string _educationOrganizationCategoryDescriptor;
+
+ [IgnoreMember]
+ public virtual string EducationOrganizationCategoryDescriptor
+ {
+ get
+ {
+ if (_educationOrganizationCategoryDescriptor == null)
+ _educationOrganizationCategoryDescriptor = GeneratedArtifactStaticDependencies.DescriptorResolver.GetUri("EducationOrganizationCategoryDescriptor", _educationOrganizationCategoryDescriptorId);
+
+ return _educationOrganizationCategoryDescriptor;
+ }
+ set
+ {
+ _educationOrganizationCategoryDescriptor = value;
+ _educationOrganizationCategoryDescriptorId = default(int);
+ }
+ }
// -------------------------------------------------------------
// =============================================================
@@ -1152,28 +1610,6 @@ public AccountabilityRating()
// =============================================================
// Properties
// -------------------------------------------------------------
- public virtual string Rating { get; set; }
- public virtual DateTime? RatingDate
- {
- get { return _ratingDate; }
- set
- {
- //This is only stored as a Date in the DB and NHibernate will retrieve it using the default (local) DateTime.Kind. We must ensure it is set consistently for any equality/change evaluation.
- if(value == null)
- {
- _ratingDate = null;
- } else
- {
- var given = (DateTime) value;
- _ratingDate = new DateTime(given.Year, given.Month, given.Day);
- }
- }
- }
-
- private DateTime? _ratingDate;
-
- public virtual string RatingOrganization { get; set; }
- public virtual string RatingProgram { get; set; }
// -------------------------------------------------------------
// =============================================================
@@ -1186,14 +1622,27 @@ public virtual DateTime? RatingDate
// -------------------------------------------------------------
private IDictionary _extensions;
+ [MessagePackFormatter(typeof(EntityExtensionsMessagePackFormatter), "EducationOrganization", "EducationOrganizationCategory")]
+ [Key(2)]
public IDictionary Extensions
{
- get => _extensions;
+ get
+ {
+ foreach (var key in _extensions.Keys)
+ {
+ if (_extensions[key] is IDeserializedPersistentGenericCollection collection)
+ {
+ collection.ReattachExtension(this, (string) key);
+ }
+ }
+
+ return _extensions;
+ }
set
{
// If the _extensions is null, this is being assigned from the constructor
// for the first time and no special handling is required
- if (_extensions != null)
+ if (_extensions != null && value != null)
{
// For extensions that have already been initialized by the extensions factory,
// we need to copy any "implicit" extension object entries over to the incoming
@@ -1212,43 +1661,52 @@ public IDictionary Extensions
}
}
- public IDictionary AggregateExtensions { get; set; }
- // -------------------------------------------------------------
+ private IDictionary _aggregateExtensions;
- // =============================================================
- // Reference Data
- // -------------------------------------------------------------
- public virtual NHibernate.EducationOrganizationAggregate.EdFi.EducationOrganizationReferenceData EducationOrganizationReferenceData { get; set; }
+ [MessagePackFormatter(typeof(AggregateExtensionsMessagePackFormatter), "EducationOrganization", "EducationOrganizationCategory")]
+ [Key(3)]
+ public IDictionary AggregateExtensions
+ {
+ get
+ {
+ foreach (var key in _aggregateExtensions.Keys)
+ {
+ if (_aggregateExtensions[key] is IDeserializedPersistentGenericCollection collection)
+ {
+ collection.ReattachAggregateExtension(this, (string) key);
+ }
+ }
- ///
- /// Read-only property that allows the EducationOrganization discriminator value to be mapped to the resource reference.
- ///
- string Entities.Common.EdFi.IAccountabilityRating.EducationOrganizationDiscriminator
- {
- get { return EducationOrganizationReferenceData?.Discriminator; }
- set { }
- }
+ return _aggregateExtensions;
+ }
+ set
+ {
+ // If the _aggregateExtensions is null, this is being assigned from the constructor
+ // for the first time and no special handling is required
+ if (_aggregateExtensions != null && value != null)
+ {
+ // For aggregate extensions that have already been initialized by the extensions factory,
+ // we need to copy any "implicit" aggregate extension object entries over to the incoming
+ // value dictionary being assigned by NHibernate (or deserialization) because it won't have them,
+ // but they must be there for correct handling of extensions for the API.
+ foreach (var key in _aggregateExtensions.Keys)
+ {
+ if (!value.Contains(key))
+ {
+ value[key] = _aggregateExtensions[key];
+ }
+ }
+ }
- ///
- /// Read-only property that allows the EducationOrganization resource identifier value to be mapped to the resource reference.
- ///
- Guid? Entities.Common.EdFi.IAccountabilityRating.EducationOrganizationResourceId
- {
- get { return EducationOrganizationReferenceData?.Id; }
- set { }
+ _aggregateExtensions = value;
+ }
}
- public virtual NHibernate.SchoolYearTypeAggregate.EdFi.SchoolYearTypeReferenceData SchoolYearTypeReferenceData { get; set; }
-
- ///
- /// Read-only property that allows the SchoolYearType resource identifier value to be mapped to the resource reference.
- ///
- Guid? Entities.Common.EdFi.IAccountabilityRating.SchoolYearTypeResourceId
- {
- get { return SchoolYearTypeReferenceData?.Id; }
- set { }
- }
+ // -------------------------------------------------------------
+ // =============================================================
+ // Reference Data
+ // -------------------------------------------------------------
// -------------------------------------------------------------
//=============================================================
@@ -1259,6 +1717,7 @@ string Entities.Common.EdFi.IAccountabilityRating.EducationOrganizationDiscrimin
// Provide lookup property map
private static readonly Dictionary _idPropertyByLookupProperty = new Dictionary(StringComparer.InvariantCultureIgnoreCase)
{
+ { "EducationOrganizationCategoryDescriptor", new LookupColumnDetails { PropertyName = "EducationOrganizationCategoryDescriptorId", LookupTypeName = "EducationOrganizationCategoryDescriptor"} },
};
Dictionary IHasLookupColumnPropertyMap.IdPropertyByLookupProperty
@@ -1269,13 +1728,11 @@ Dictionary IHasLookupColumnPropertyMap.IdPropertyBy
// Provide primary key information
OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
{
- // Initialize a new dictionary to hold the key values
- var keyValues = new OrderedDictionary();
+ // Get parent key values
+ var keyValues = (EducationOrganization as IHasPrimaryKeyValues)?.GetPrimaryKeyValues() ?? new OrderedDictionary();
// Add current key values
- keyValues.Add("EducationOrganizationId", EducationOrganizationId);
- keyValues.Add("RatingTitle", RatingTitle);
- keyValues.Add("SchoolYear", SchoolYear);
+ keyValues.Add("EducationOrganizationCategoryDescriptorId", EducationOrganizationCategoryDescriptorId);
return keyValues;
}
@@ -1339,82 +1796,102 @@ public override int GetHashCode()
#endregion
bool ISynchronizable.Synchronize(object target)
{
- return this.SynchronizeTo((Entities.Common.EdFi.IAccountabilityRating)target);
+ return this.SynchronizeTo((Entities.Common.EdFi.IEducationOrganizationCategory)target);
}
void IMappable.Map(object target)
{
- this.MapTo((Entities.Common.EdFi.IAccountabilityRating) target, null);
+ this.MapTo((Entities.Common.EdFi.IEducationOrganizationCategory) target, null);
}
+ void IChildEntity.SetParent(object value)
+ {
+ EducationOrganization = (EducationOrganization) value;
+ }
}
-}
-// Aggregate: AccountTypeDescriptor
-
-namespace EdFi.Ods.Entities.NHibernate.AccountTypeDescriptorAggregate.EdFi
-{
// disable warnings for inheritance from classes marked Obsolete within this generated code only
#pragma warning disable 612, 618
///
- /// A class which represents the edfi.AccountTypeDescriptor table of the AccountTypeDescriptor aggregate in the ODS database.
+ /// A class which represents the edfi.EducationOrganizationIdentificationCode table of the EducationOrganization aggregate in the ODS database.
///
[Schema("edfi")]
[ExcludeFromCodeCoverage]
- public class AccountTypeDescriptor : DescriptorAggregate.EdFi.Descriptor,
- Entities.Common.EdFi.IAccountTypeDescriptor, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IEdFiDescriptor
+ [MessagePackObject]
+ public class EducationOrganizationIdentificationCode : EntityWithCompositeKey, IChildEntity,
+ Entities.Common.EdFi.IEducationOrganizationIdentificationCode, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IHasExtensions
{
+ public virtual void SuspendReferenceAssignmentCheck() { }
- // =============================================================
- // Primary Key
- // -------------------------------------------------------------
- [DomainSignature]
- public virtual int AccountTypeDescriptorId
+ public EducationOrganizationIdentificationCode()
{
- get { return base.DescriptorId; }
- set { base.DescriptorId = value; }
+ Extensions = GeneratedArtifactStaticDependencies.EntityExtensionsFactory == null ? new Dictionary() : new Dictionary(GeneratedArtifactStaticDependencies.EntityExtensionsFactory.CreateRequiredEntityExtensions(this));
+ AggregateExtensions = GeneratedArtifactStaticDependencies.EntityExtensionsFactory == null ? new Dictionary() : new Dictionary(GeneratedArtifactStaticDependencies.EntityExtensionsFactory.CreateAggregateExtensions());
}
-
- // -------------------------------------------------------------
+// restore warnings for inheritance from classes marked Obsolete
+#pragma warning restore 612, 618
// =============================================================
- // Inherited Properties
+ // Primary Key
// -------------------------------------------------------------
- string IDescriptor.CodeValue
- {
- get { return CodeValue; }
- set { CodeValue = value; }
- }
- string IDescriptor.Description
- {
- get { return Description; }
- set { Description = value; }
- }
- DateTime? IDescriptor.EffectiveBeginDate
- {
- get { return EffectiveBeginDate; }
- set { EffectiveBeginDate = value; }
- }
- DateTime? IDescriptor.EffectiveEndDate
+ [DomainSignature, IgnoreMember]
+ public virtual EducationOrganization EducationOrganization { get; set; }
+
+ Entities.Common.EdFi.IEducationOrganization IEducationOrganizationIdentificationCode.EducationOrganization
{
- get { return EffectiveEndDate; }
- set { EffectiveEndDate = value; }
+ get { return EducationOrganization; }
+ set { EducationOrganization = (EducationOrganization) value; }
}
- string IDescriptor.Namespace
+
+ [DomainSignature]
+ [Key(1)]
+ public virtual int EducationOrganizationIdentificationSystemDescriptorId
{
- get { return Namespace; }
- set { Namespace = value; }
+ get
+ {
+ if (_educationOrganizationIdentificationSystemDescriptorId == default(int))
+ _educationOrganizationIdentificationSystemDescriptorId = GeneratedArtifactStaticDependencies.DescriptorResolver.GetDescriptorId("EducationOrganizationIdentificationSystemDescriptor", _educationOrganizationIdentificationSystemDescriptor);
+
+ return _educationOrganizationIdentificationSystemDescriptorId;
+ }
+ set
+ {
+ _educationOrganizationIdentificationSystemDescriptorId = value;
+ _educationOrganizationIdentificationSystemDescriptor = null;
+ }
}
- string IDescriptor.ShortDescription
+
+ private int _educationOrganizationIdentificationSystemDescriptorId;
+ private string _educationOrganizationIdentificationSystemDescriptor;
+
+ [IgnoreMember]
+ public virtual string EducationOrganizationIdentificationSystemDescriptor
{
- get { return ShortDescription; }
- set { ShortDescription = value; }
+ get
+ {
+ if (_educationOrganizationIdentificationSystemDescriptor == null)
+ _educationOrganizationIdentificationSystemDescriptor = GeneratedArtifactStaticDependencies.DescriptorResolver.GetUri("EducationOrganizationIdentificationSystemDescriptor", _educationOrganizationIdentificationSystemDescriptorId);
+
+ return _educationOrganizationIdentificationSystemDescriptor;
+ }
+ set
+ {
+ _educationOrganizationIdentificationSystemDescriptor = value;
+ _educationOrganizationIdentificationSystemDescriptorId = default(int);
+ }
}
// -------------------------------------------------------------
+ // =============================================================
+ // Inherited Properties
+ // -------------------------------------------------------------
+ // -------------------------------------------------------------
+
// =============================================================
// Properties
// -------------------------------------------------------------
+ [Key(2)]
+ public virtual string IdentificationCode { get; set; }
// -------------------------------------------------------------
// =============================================================
@@ -1425,6 +1902,88 @@ string IDescriptor.ShortDescription
// =============================================================
// Extensions
// -------------------------------------------------------------
+ private IDictionary _extensions;
+
+ [MessagePackFormatter(typeof(EntityExtensionsMessagePackFormatter), "EducationOrganization", "EducationOrganizationIdentificationCode")]
+ [Key(3)]
+ public IDictionary Extensions
+ {
+ get
+ {
+ foreach (var key in _extensions.Keys)
+ {
+ if (_extensions[key] is IDeserializedPersistentGenericCollection collection)
+ {
+ collection.ReattachExtension(this, (string) key);
+ }
+ }
+
+ return _extensions;
+ }
+ set
+ {
+ // If the _extensions is null, this is being assigned from the constructor
+ // for the first time and no special handling is required
+ if (_extensions != null && value != null)
+ {
+ // For extensions that have already been initialized by the extensions factory,
+ // we need to copy any "implicit" extension object entries over to the incoming
+ // value dictionary being assigned by NHibernate because it won't have them,
+ // but they must be there for correct handling of extensions for the API.
+ foreach (var key in _extensions.Keys)
+ {
+ if (!value.Contains(key))
+ {
+ value[key] = _extensions[key];
+ }
+ }
+ }
+
+ _extensions = value;
+ }
+ }
+
+ private IDictionary _aggregateExtensions;
+
+ [MessagePackFormatter(typeof(AggregateExtensionsMessagePackFormatter), "EducationOrganization", "EducationOrganizationIdentificationCode")]
+ [Key(4)]
+ public IDictionary AggregateExtensions
+ {
+ get
+ {
+ foreach (var key in _aggregateExtensions.Keys)
+ {
+ if (_aggregateExtensions[key] is IDeserializedPersistentGenericCollection collection)
+ {
+ collection.ReattachAggregateExtension(this, (string) key);
+ }
+ }
+
+ return _aggregateExtensions;
+ }
+ set
+ {
+ // If the _aggregateExtensions is null, this is being assigned from the constructor
+ // for the first time and no special handling is required
+ if (_aggregateExtensions != null && value != null)
+ {
+ // For aggregate extensions that have already been initialized by the extensions factory,
+ // we need to copy any "implicit" aggregate extension object entries over to the incoming
+ // value dictionary being assigned by NHibernate (or deserialization) because it won't have them,
+ // but they must be there for correct handling of extensions for the API.
+ foreach (var key in _aggregateExtensions.Keys)
+ {
+ if (!value.Contains(key))
+ {
+ value[key] = _aggregateExtensions[key];
+ }
+ }
+ }
+
+ _aggregateExtensions = value;
+ }
+ }
+
// -------------------------------------------------------------
// =============================================================
@@ -1440,6 +1999,7 @@ string IDescriptor.ShortDescription
// Provide lookup property map
private static readonly Dictionary _idPropertyByLookupProperty = new Dictionary(StringComparer.InvariantCultureIgnoreCase)
{
+ { "EducationOrganizationIdentificationSystemDescriptor", new LookupColumnDetails { PropertyName = "EducationOrganizationIdentificationSystemDescriptorId", LookupTypeName = "EducationOrganizationIdentificationSystemDescriptor"} },
};
Dictionary IHasLookupColumnPropertyMap.IdPropertyByLookupProperty
@@ -1450,11 +2010,11 @@ Dictionary IHasLookupColumnPropertyMap.IdPropertyBy
// Provide primary key information
OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
{
- // Initialize a new dictionary to hold the key values
- var keyValues = new OrderedDictionary();
+ // Get parent key values
+ var keyValues = (EducationOrganization as IHasPrimaryKeyValues)?.GetPrimaryKeyValues() ?? new OrderedDictionary();
// Add current key values
- keyValues.Add("AccountTypeDescriptorId", AccountTypeDescriptorId);
+ keyValues.Add("EducationOrganizationIdentificationSystemDescriptorId", EducationOrganizationIdentificationSystemDescriptorId);
return keyValues;
}
@@ -1518,82 +2078,177 @@ public override int GetHashCode()
#endregion
bool ISynchronizable.Synchronize(object target)
{
- return this.SynchronizeTo((Entities.Common.EdFi.IAccountTypeDescriptor)target);
+ return this.SynchronizeTo((Entities.Common.EdFi.IEducationOrganizationIdentificationCode)target);
}
void IMappable.Map(object target)
{
- this.MapTo((Entities.Common.EdFi.IAccountTypeDescriptor) target, null);
+ this.MapTo((Entities.Common.EdFi.IEducationOrganizationIdentificationCode) target, null);
}
+ void IChildEntity.SetParent(object value)
+ {
+ EducationOrganization = (EducationOrganization) value;
+ }
}
-}
-// Aggregate: AchievementCategoryDescriptor
-
-namespace EdFi.Ods.Entities.NHibernate.AchievementCategoryDescriptorAggregate.EdFi
-{
// disable warnings for inheritance from classes marked Obsolete within this generated code only
#pragma warning disable 612, 618
///
- /// A class which represents the edfi.AchievementCategoryDescriptor table of the AchievementCategoryDescriptor aggregate in the ODS database.
+ /// A class which represents the edfi.EducationOrganizationIndicator table of the EducationOrganization aggregate in the ODS database.
///
[Schema("edfi")]
[ExcludeFromCodeCoverage]
- public class AchievementCategoryDescriptor : DescriptorAggregate.EdFi.Descriptor,
- Entities.Common.EdFi.IAchievementCategoryDescriptor, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IEdFiDescriptor
+ [MessagePackObject]
+ public class EducationOrganizationIndicator : EntityWithCompositeKey, IChildEntity,
+ Entities.Common.EdFi.IEducationOrganizationIndicator, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IHasExtensions
{
+ public virtual void SuspendReferenceAssignmentCheck() { }
+
+ public EducationOrganizationIndicator()
+ {
+ EducationOrganizationIndicatorPeriods = new HashSet();
+ Extensions = GeneratedArtifactStaticDependencies.EntityExtensionsFactory == null ? new Dictionary() : new Dictionary(GeneratedArtifactStaticDependencies.EntityExtensionsFactory.CreateRequiredEntityExtensions(this));
+ AggregateExtensions = GeneratedArtifactStaticDependencies.EntityExtensionsFactory == null ? new Dictionary() : new Dictionary(GeneratedArtifactStaticDependencies.EntityExtensionsFactory.CreateAggregateExtensions());
+ }
+// restore warnings for inheritance from classes marked Obsolete
+#pragma warning restore 612, 618
// =============================================================
// Primary Key
// -------------------------------------------------------------
+ [DomainSignature, IgnoreMember]
+ public virtual EducationOrganization EducationOrganization { get; set; }
+
+ Entities.Common.EdFi.IEducationOrganization IEducationOrganizationIndicator.EducationOrganization
+ {
+ get { return EducationOrganization; }
+ set { EducationOrganization = (EducationOrganization) value; }
+ }
+
[DomainSignature]
- public virtual int AchievementCategoryDescriptorId
+ [Key(1)]
+ public virtual int IndicatorDescriptorId
{
- get { return base.DescriptorId; }
- set { base.DescriptorId = value; }
+ get
+ {
+ if (_indicatorDescriptorId == default(int))
+ _indicatorDescriptorId = GeneratedArtifactStaticDependencies.DescriptorResolver.GetDescriptorId("IndicatorDescriptor", _indicatorDescriptor);
+
+ return _indicatorDescriptorId;
+ }
+ set
+ {
+ _indicatorDescriptorId = value;
+ _indicatorDescriptor = null;
+ }
+ }
+
+ private int _indicatorDescriptorId;
+ private string _indicatorDescriptor;
+
+ [IgnoreMember]
+ public virtual string IndicatorDescriptor
+ {
+ get
+ {
+ if (_indicatorDescriptor == null)
+ _indicatorDescriptor = GeneratedArtifactStaticDependencies.DescriptorResolver.GetUri("IndicatorDescriptor", _indicatorDescriptorId);
+
+ return _indicatorDescriptor;
+ }
+ set
+ {
+ _indicatorDescriptor = value;
+ _indicatorDescriptorId = default(int);
+ }
}
-
// -------------------------------------------------------------
// =============================================================
// Inherited Properties
// -------------------------------------------------------------
- string IDescriptor.CodeValue
- {
- get { return CodeValue; }
- set { CodeValue = value; }
- }
- string IDescriptor.Description
- {
- get { return Description; }
- set { Description = value; }
- }
- DateTime? IDescriptor.EffectiveBeginDate
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // Properties
+ // -------------------------------------------------------------
+ [Key(2)]
+ public virtual string DesignatedBy { get; set; }
+ [Key(3)]
+ public virtual int? IndicatorGroupDescriptorId
{
- get { return EffectiveBeginDate; }
- set { EffectiveBeginDate = value; }
+ get
+ {
+ if (_indicatorGroupDescriptorId == default(int?))
+ _indicatorGroupDescriptorId = string.IsNullOrWhiteSpace(_indicatorGroupDescriptor) ? default(int?) : GeneratedArtifactStaticDependencies.DescriptorResolver.GetDescriptorId("IndicatorGroupDescriptor", _indicatorGroupDescriptor);
+
+ return _indicatorGroupDescriptorId;
+ }
+ set
+ {
+ _indicatorGroupDescriptorId = value;
+ _indicatorGroupDescriptor = null;
+ }
}
- DateTime? IDescriptor.EffectiveEndDate
+
+ private int? _indicatorGroupDescriptorId;
+ private string _indicatorGroupDescriptor;
+
+ [IgnoreMember]
+ public virtual string IndicatorGroupDescriptor
{
- get { return EffectiveEndDate; }
- set { EffectiveEndDate = value; }
+ get
+ {
+ if (_indicatorGroupDescriptor == null)
+ _indicatorGroupDescriptor = _indicatorGroupDescriptorId == null ? null : GeneratedArtifactStaticDependencies.DescriptorResolver.GetUri("IndicatorGroupDescriptor", _indicatorGroupDescriptorId.Value);
+
+ return _indicatorGroupDescriptor;
+ }
+ set
+ {
+ _indicatorGroupDescriptor = value;
+ _indicatorGroupDescriptorId = default(int?);
+ }
}
- string IDescriptor.Namespace
+ [Key(4)]
+ public virtual int? IndicatorLevelDescriptorId
{
- get { return Namespace; }
- set { Namespace = value; }
+ get
+ {
+ if (_indicatorLevelDescriptorId == default(int?))
+ _indicatorLevelDescriptorId = string.IsNullOrWhiteSpace(_indicatorLevelDescriptor) ? default(int?) : GeneratedArtifactStaticDependencies.DescriptorResolver.GetDescriptorId("IndicatorLevelDescriptor", _indicatorLevelDescriptor);
+
+ return _indicatorLevelDescriptorId;
+ }
+ set
+ {
+ _indicatorLevelDescriptorId = value;
+ _indicatorLevelDescriptor = null;
+ }
}
- string IDescriptor.ShortDescription
+
+ private int? _indicatorLevelDescriptorId;
+ private string _indicatorLevelDescriptor;
+
+ [IgnoreMember]
+ public virtual string IndicatorLevelDescriptor
{
- get { return ShortDescription; }
- set { ShortDescription = value; }
+ get
+ {
+ if (_indicatorLevelDescriptor == null)
+ _indicatorLevelDescriptor = _indicatorLevelDescriptorId == null ? null : GeneratedArtifactStaticDependencies.DescriptorResolver.GetUri("IndicatorLevelDescriptor", _indicatorLevelDescriptorId.Value);
+
+ return _indicatorLevelDescriptor;
+ }
+ set
+ {
+ _indicatorLevelDescriptor = value;
+ _indicatorLevelDescriptorId = default(int?);
+ }
}
- // -------------------------------------------------------------
-
- // =============================================================
- // Properties
- // -------------------------------------------------------------
+ [Key(5)]
+ public virtual string IndicatorValue { get; set; }
// -------------------------------------------------------------
// =============================================================
@@ -1604,6 +2259,88 @@ string IDescriptor.ShortDescription
// =============================================================
// Extensions
// -------------------------------------------------------------
+ private IDictionary _extensions;
+
+ [MessagePackFormatter(typeof(EntityExtensionsMessagePackFormatter), "EducationOrganization", "EducationOrganizationIndicator")]
+ [Key(6)]
+ public IDictionary Extensions
+ {
+ get
+ {
+ foreach (var key in _extensions.Keys)
+ {
+ if (_extensions[key] is IDeserializedPersistentGenericCollection collection)
+ {
+ collection.ReattachExtension(this, (string) key);
+ }
+ }
+
+ return _extensions;
+ }
+ set
+ {
+ // If the _extensions is null, this is being assigned from the constructor
+ // for the first time and no special handling is required
+ if (_extensions != null && value != null)
+ {
+ // For extensions that have already been initialized by the extensions factory,
+ // we need to copy any "implicit" extension object entries over to the incoming
+ // value dictionary being assigned by NHibernate because it won't have them,
+ // but they must be there for correct handling of extensions for the API.
+ foreach (var key in _extensions.Keys)
+ {
+ if (!value.Contains(key))
+ {
+ value[key] = _extensions[key];
+ }
+ }
+ }
+
+ _extensions = value;
+ }
+ }
+
+ private IDictionary _aggregateExtensions;
+
+ [MessagePackFormatter(typeof(AggregateExtensionsMessagePackFormatter), "EducationOrganization", "EducationOrganizationIndicator")]
+ [Key(7)]
+ public IDictionary AggregateExtensions
+ {
+ get
+ {
+ foreach (var key in _aggregateExtensions.Keys)
+ {
+ if (_aggregateExtensions[key] is IDeserializedPersistentGenericCollection collection)
+ {
+ collection.ReattachAggregateExtension(this, (string) key);
+ }
+ }
+
+ return _aggregateExtensions;
+ }
+ set
+ {
+ // If the _aggregateExtensions is null, this is being assigned from the constructor
+ // for the first time and no special handling is required
+ if (_aggregateExtensions != null && value != null)
+ {
+ // For aggregate extensions that have already been initialized by the extensions factory,
+ // we need to copy any "implicit" aggregate extension object entries over to the incoming
+ // value dictionary being assigned by NHibernate (or deserialization) because it won't have them,
+ // but they must be there for correct handling of extensions for the API.
+ foreach (var key in _aggregateExtensions.Keys)
+ {
+ if (!value.Contains(key))
+ {
+ value[key] = _aggregateExtensions[key];
+ }
+ }
+ }
+
+ _aggregateExtensions = value;
+ }
+ }
+
// -------------------------------------------------------------
// =============================================================
@@ -1614,11 +2351,68 @@ string IDescriptor.ShortDescription
//=============================================================
// Collections
// -------------------------------------------------------------
+
+ private ICollection _educationOrganizationIndicatorPeriods;
+ private ICollection _educationOrganizationIndicatorPeriodsCovariant;
+ [Key(8)]
+ [MessagePackFormatter(typeof(PersistentCollectionFormatter))]
+ public virtual ICollection EducationOrganizationIndicatorPeriods
+ {
+ get
+ {
+ // -------------------------------------------------------------
+ // On-demand deserialization logic to attach reverse reference of children
+ // due to ServiceStack's lack of [OnDeserialized] attribute support.
+ // Back-reference is required by NHibernate for persistence.
+ // -------------------------------------------------------------
+ if (_educationOrganizationIndicatorPeriods is DeserializedPersistentGenericSet set)
+ {
+ set.Reattach(this, "EducationOrganizationIndicatorPeriods");
+ }
+
+ foreach (var item in _educationOrganizationIndicatorPeriods)
+ if (item.EducationOrganizationIndicator == null)
+ item.EducationOrganizationIndicator = this;
+ // -------------------------------------------------------------
+
+ return _educationOrganizationIndicatorPeriods;
+ }
+ set
+ {
+ _educationOrganizationIndicatorPeriods = value;
+ _educationOrganizationIndicatorPeriodsCovariant = new CovariantCollectionAdapter(value);
+ }
+ }
+
+ // Covariant version, visible only on the interface
+ ICollection Entities.Common.EdFi.IEducationOrganizationIndicator.EducationOrganizationIndicatorPeriods
+ {
+ get
+ {
+ // -------------------------------------------------------------
+ // Back-reference is required by NHibernate for persistence.
+ // -------------------------------------------------------------
+ foreach (var item in _educationOrganizationIndicatorPeriods)
+ if (item.EducationOrganizationIndicator == null)
+ item.EducationOrganizationIndicator = this;
+ // -------------------------------------------------------------
+
+ return _educationOrganizationIndicatorPeriodsCovariant;
+ }
+ set
+ {
+ EducationOrganizationIndicatorPeriods = new HashSet(value.Cast());
+ }
+ }
+
// -------------------------------------------------------------
// Provide lookup property map
private static readonly Dictionary _idPropertyByLookupProperty = new Dictionary(StringComparer.InvariantCultureIgnoreCase)
{
+ { "IndicatorDescriptor", new LookupColumnDetails { PropertyName = "IndicatorDescriptorId", LookupTypeName = "IndicatorDescriptor"} },
+ { "IndicatorGroupDescriptor", new LookupColumnDetails { PropertyName = "IndicatorGroupDescriptorId", LookupTypeName = "IndicatorGroupDescriptor"} },
+ { "IndicatorLevelDescriptor", new LookupColumnDetails { PropertyName = "IndicatorLevelDescriptorId", LookupTypeName = "IndicatorLevelDescriptor"} },
};
Dictionary IHasLookupColumnPropertyMap.IdPropertyByLookupProperty
@@ -1629,11 +2423,11 @@ Dictionary IHasLookupColumnPropertyMap.IdPropertyBy
// Provide primary key information
OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
{
- // Initialize a new dictionary to hold the key values
- var keyValues = new OrderedDictionary();
+ // Get parent key values
+ var keyValues = (EducationOrganization as IHasPrimaryKeyValues)?.GetPrimaryKeyValues() ?? new OrderedDictionary();
// Add current key values
- keyValues.Add("AchievementCategoryDescriptorId", AchievementCategoryDescriptorId);
+ keyValues.Add("IndicatorDescriptorId", IndicatorDescriptorId);
return keyValues;
}
@@ -1697,82 +2491,94 @@ public override int GetHashCode()
#endregion
bool ISynchronizable.Synchronize(object target)
{
- return this.SynchronizeTo((Entities.Common.EdFi.IAchievementCategoryDescriptor)target);
+ return this.SynchronizeTo((Entities.Common.EdFi.IEducationOrganizationIndicator)target);
}
void IMappable.Map(object target)
{
- this.MapTo((Entities.Common.EdFi.IAchievementCategoryDescriptor) target, null);
+ this.MapTo((Entities.Common.EdFi.IEducationOrganizationIndicator) target, null);
}
+ void IChildEntity.SetParent(object value)
+ {
+ EducationOrganization = (EducationOrganization) value;
+ }
}
-}
-// Aggregate: AdditionalCreditTypeDescriptor
-
-namespace EdFi.Ods.Entities.NHibernate.AdditionalCreditTypeDescriptorAggregate.EdFi
-{
// disable warnings for inheritance from classes marked Obsolete within this generated code only
#pragma warning disable 612, 618
///
- /// A class which represents the edfi.AdditionalCreditTypeDescriptor table of the AdditionalCreditTypeDescriptor aggregate in the ODS database.
+ /// A class which represents the edfi.EducationOrganizationIndicatorPeriod table of the EducationOrganization aggregate in the ODS database.
///
[Schema("edfi")]
[ExcludeFromCodeCoverage]
- public class AdditionalCreditTypeDescriptor : DescriptorAggregate.EdFi.Descriptor,
- Entities.Common.EdFi.IAdditionalCreditTypeDescriptor, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IEdFiDescriptor
+ [MessagePackObject]
+ public class EducationOrganizationIndicatorPeriod : EntityWithCompositeKey, IChildEntity,
+ Entities.Common.EdFi.IEducationOrganizationIndicatorPeriod, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IHasExtensions
{
+ public virtual void SuspendReferenceAssignmentCheck() { }
+
+ public EducationOrganizationIndicatorPeriod()
+ {
+ Extensions = GeneratedArtifactStaticDependencies.EntityExtensionsFactory == null ? new Dictionary() : new Dictionary(GeneratedArtifactStaticDependencies.EntityExtensionsFactory.CreateRequiredEntityExtensions(this));
+ AggregateExtensions = GeneratedArtifactStaticDependencies.EntityExtensionsFactory == null ? new Dictionary() : new Dictionary(GeneratedArtifactStaticDependencies.EntityExtensionsFactory.CreateAggregateExtensions());
+ }
+// restore warnings for inheritance from classes marked Obsolete
+#pragma warning restore 612, 618
// =============================================================
// Primary Key
// -------------------------------------------------------------
+ [DomainSignature, IgnoreMember]
+ public virtual EducationOrganizationIndicator EducationOrganizationIndicator { get; set; }
+
+ Entities.Common.EdFi.IEducationOrganizationIndicator IEducationOrganizationIndicatorPeriod.EducationOrganizationIndicator
+ {
+ get { return EducationOrganizationIndicator; }
+ set { EducationOrganizationIndicator = (EducationOrganizationIndicator) value; }
+ }
+
[DomainSignature]
- public virtual int AdditionalCreditTypeDescriptorId
+ [Key(1)]
+ public virtual DateTime BeginDate
{
- get { return base.DescriptorId; }
- set { base.DescriptorId = value; }
+ get { return _beginDate; }
+ //This is only stored as a Date in the DB and NHibernate will retrieve it using the default (local) DateTime.Kind. We must ensure it is set consistently for any equality/change evaluation.
+ set { _beginDate = new DateTime(value.Year, value.Month, value.Day); }
}
+
+ private DateTime _beginDate;
// -------------------------------------------------------------
// =============================================================
// Inherited Properties
// -------------------------------------------------------------
- string IDescriptor.CodeValue
- {
- get { return CodeValue; }
- set { CodeValue = value; }
- }
- string IDescriptor.Description
- {
- get { return Description; }
- set { Description = value; }
- }
- DateTime? IDescriptor.EffectiveBeginDate
- {
- get { return EffectiveBeginDate; }
- set { EffectiveBeginDate = value; }
- }
- DateTime? IDescriptor.EffectiveEndDate
- {
- get { return EffectiveEndDate; }
- set { EffectiveEndDate = value; }
- }
- string IDescriptor.Namespace
- {
- get { return Namespace; }
- set { Namespace = value; }
- }
- string IDescriptor.ShortDescription
- {
- get { return ShortDescription; }
- set { ShortDescription = value; }
- }
// -------------------------------------------------------------
// =============================================================
// Properties
// -------------------------------------------------------------
+ [Key(2)]
+ public virtual DateTime? EndDate
+ {
+ get { return _endDate; }
+ set
+ {
+ //This is only stored as a Date in the DB and NHibernate will retrieve it using the default (local) DateTime.Kind. We must ensure it is set consistently for any equality/change evaluation.
+ if(value == null)
+ {
+ _endDate = null;
+ } else
+ {
+ var given = (DateTime) value;
+ _endDate = new DateTime(given.Year, given.Month, given.Day);
+ }
+ }
+ }
+
+ private DateTime? _endDate;
+
// -------------------------------------------------------------
// =============================================================
@@ -1783,6 +2589,88 @@ string IDescriptor.ShortDescription
// =============================================================
// Extensions
// -------------------------------------------------------------
+ private IDictionary _extensions;
+
+ [MessagePackFormatter(typeof(EntityExtensionsMessagePackFormatter), "EducationOrganization", "EducationOrganizationIndicatorPeriod")]
+ [Key(3)]
+ public IDictionary Extensions
+ {
+ get
+ {
+ foreach (var key in _extensions.Keys)
+ {
+ if (_extensions[key] is IDeserializedPersistentGenericCollection collection)
+ {
+ collection.ReattachExtension(this, (string) key);
+ }
+ }
+
+ return _extensions;
+ }
+ set
+ {
+ // If the _extensions is null, this is being assigned from the constructor
+ // for the first time and no special handling is required
+ if (_extensions != null && value != null)
+ {
+ // For extensions that have already been initialized by the extensions factory,
+ // we need to copy any "implicit" extension object entries over to the incoming
+ // value dictionary being assigned by NHibernate because it won't have them,
+ // but they must be there for correct handling of extensions for the API.
+ foreach (var key in _extensions.Keys)
+ {
+ if (!value.Contains(key))
+ {
+ value[key] = _extensions[key];
+ }
+ }
+ }
+
+ _extensions = value;
+ }
+ }
+
+ private IDictionary _aggregateExtensions;
+
+ [MessagePackFormatter(typeof(AggregateExtensionsMessagePackFormatter), "EducationOrganization", "EducationOrganizationIndicatorPeriod")]
+ [Key(4)]
+ public IDictionary AggregateExtensions
+ {
+ get
+ {
+ foreach (var key in _aggregateExtensions.Keys)
+ {
+ if (_aggregateExtensions[key] is IDeserializedPersistentGenericCollection collection)
+ {
+ collection.ReattachAggregateExtension(this, (string) key);
+ }
+ }
+
+ return _aggregateExtensions;
+ }
+ set
+ {
+ // If the _aggregateExtensions is null, this is being assigned from the constructor
+ // for the first time and no special handling is required
+ if (_aggregateExtensions != null && value != null)
+ {
+ // For aggregate extensions that have already been initialized by the extensions factory,
+ // we need to copy any "implicit" aggregate extension object entries over to the incoming
+ // value dictionary being assigned by NHibernate (or deserialization) because it won't have them,
+ // but they must be there for correct handling of extensions for the API.
+ foreach (var key in _aggregateExtensions.Keys)
+ {
+ if (!value.Contains(key))
+ {
+ value[key] = _aggregateExtensions[key];
+ }
+ }
+ }
+
+ _aggregateExtensions = value;
+ }
+ }
+
// -------------------------------------------------------------
// =============================================================
@@ -1798,6 +2686,7 @@ string IDescriptor.ShortDescription
// Provide lookup property map
private static readonly Dictionary _idPropertyByLookupProperty = new Dictionary(StringComparer.InvariantCultureIgnoreCase)
{
+ { "IndicatorDescriptor", new LookupColumnDetails { PropertyName = "IndicatorDescriptorId", LookupTypeName = "IndicatorDescriptor"} },
};
Dictionary IHasLookupColumnPropertyMap.IdPropertyByLookupProperty
@@ -1808,11 +2697,11 @@ Dictionary IHasLookupColumnPropertyMap.IdPropertyBy
// Provide primary key information
OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
{
- // Initialize a new dictionary to hold the key values
- var keyValues = new OrderedDictionary();
+ // Get parent key values
+ var keyValues = (EducationOrganizationIndicator as IHasPrimaryKeyValues)?.GetPrimaryKeyValues() ?? new OrderedDictionary();
// Add current key values
- keyValues.Add("AdditionalCreditTypeDescriptorId", AdditionalCreditTypeDescriptorId);
+ keyValues.Add("BeginDate", BeginDate);
return keyValues;
}
@@ -1876,92 +2765,194 @@ public override int GetHashCode()
#endregion
bool ISynchronizable.Synchronize(object target)
{
- return this.SynchronizeTo((Entities.Common.EdFi.IAdditionalCreditTypeDescriptor)target);
+ return this.SynchronizeTo((Entities.Common.EdFi.IEducationOrganizationIndicatorPeriod)target);
}
void IMappable.Map(object target)
{
- this.MapTo((Entities.Common.EdFi.IAdditionalCreditTypeDescriptor) target, null);
+ this.MapTo((Entities.Common.EdFi.IEducationOrganizationIndicatorPeriod) target, null);
}
+ void IChildEntity.SetParent(object value)
+ {
+ EducationOrganizationIndicator = (EducationOrganizationIndicator) value;
+ }
}
-}
-// Aggregate: AddressTypeDescriptor
-
-namespace EdFi.Ods.Entities.NHibernate.AddressTypeDescriptorAggregate.EdFi
-{
// disable warnings for inheritance from classes marked Obsolete within this generated code only
#pragma warning disable 612, 618
///
- /// A class which represents the edfi.AddressTypeDescriptor table of the AddressTypeDescriptor aggregate in the ODS database.
+ /// A class which represents the edfi.EducationOrganizationInstitutionTelephone table of the EducationOrganization aggregate in the ODS database.
///
[Schema("edfi")]
[ExcludeFromCodeCoverage]
- public class AddressTypeDescriptor : DescriptorAggregate.EdFi.Descriptor,
- Entities.Common.EdFi.IAddressTypeDescriptor, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IEdFiDescriptor
+ [MessagePackObject]
+ public class EducationOrganizationInstitutionTelephone : EntityWithCompositeKey, IChildEntity,
+ Entities.Common.EdFi.IEducationOrganizationInstitutionTelephone, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IHasExtensions
{
+ public virtual void SuspendReferenceAssignmentCheck() { }
- // =============================================================
- // Primary Key
- // -------------------------------------------------------------
- [DomainSignature]
- public virtual int AddressTypeDescriptorId
+ public EducationOrganizationInstitutionTelephone()
{
- get { return base.DescriptorId; }
- set { base.DescriptorId = value; }
+ Extensions = GeneratedArtifactStaticDependencies.EntityExtensionsFactory == null ? new Dictionary() : new Dictionary(GeneratedArtifactStaticDependencies.EntityExtensionsFactory.CreateRequiredEntityExtensions(this));
+ AggregateExtensions = GeneratedArtifactStaticDependencies.EntityExtensionsFactory == null ? new Dictionary() : new Dictionary(GeneratedArtifactStaticDependencies.EntityExtensionsFactory.CreateAggregateExtensions());
}
-
- // -------------------------------------------------------------
+// restore warnings for inheritance from classes marked Obsolete
+#pragma warning restore 612, 618
// =============================================================
- // Inherited Properties
+ // Primary Key
// -------------------------------------------------------------
- string IDescriptor.CodeValue
- {
- get { return CodeValue; }
- set { CodeValue = value; }
- }
- string IDescriptor.Description
- {
- get { return Description; }
- set { Description = value; }
- }
- DateTime? IDescriptor.EffectiveBeginDate
- {
- get { return EffectiveBeginDate; }
- set { EffectiveBeginDate = value; }
- }
- DateTime? IDescriptor.EffectiveEndDate
- {
- get { return EffectiveEndDate; }
- set { EffectiveEndDate = value; }
- }
- string IDescriptor.Namespace
+ [DomainSignature, IgnoreMember]
+ public virtual EducationOrganization EducationOrganization { get; set; }
+
+ Entities.Common.EdFi.IEducationOrganization IEducationOrganizationInstitutionTelephone.EducationOrganization
{
- get { return Namespace; }
- set { Namespace = value; }
+ get { return EducationOrganization; }
+ set { EducationOrganization = (EducationOrganization) value; }
}
- string IDescriptor.ShortDescription
+
+ [DomainSignature]
+ [Key(1)]
+ public virtual int InstitutionTelephoneNumberTypeDescriptorId
{
- get { return ShortDescription; }
- set { ShortDescription = value; }
+ get
+ {
+ if (_institutionTelephoneNumberTypeDescriptorId == default(int))
+ _institutionTelephoneNumberTypeDescriptorId = GeneratedArtifactStaticDependencies.DescriptorResolver.GetDescriptorId("InstitutionTelephoneNumberTypeDescriptor", _institutionTelephoneNumberTypeDescriptor);
+
+ return _institutionTelephoneNumberTypeDescriptorId;
+ }
+ set
+ {
+ _institutionTelephoneNumberTypeDescriptorId = value;
+ _institutionTelephoneNumberTypeDescriptor = null;
+ }
}
- // -------------------------------------------------------------
- // =============================================================
- // Properties
- // -------------------------------------------------------------
- // -------------------------------------------------------------
+ private int _institutionTelephoneNumberTypeDescriptorId;
+ private string _institutionTelephoneNumberTypeDescriptor;
- // =============================================================
- // One-to-one relationships
+ [IgnoreMember]
+ public virtual string InstitutionTelephoneNumberTypeDescriptor
+ {
+ get
+ {
+ if (_institutionTelephoneNumberTypeDescriptor == null)
+ _institutionTelephoneNumberTypeDescriptor = GeneratedArtifactStaticDependencies.DescriptorResolver.GetUri("InstitutionTelephoneNumberTypeDescriptor", _institutionTelephoneNumberTypeDescriptorId);
+
+ return _institutionTelephoneNumberTypeDescriptor;
+ }
+ set
+ {
+ _institutionTelephoneNumberTypeDescriptor = value;
+ _institutionTelephoneNumberTypeDescriptorId = default(int);
+ }
+ }
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // Inherited Properties
+ // -------------------------------------------------------------
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // Properties
+ // -------------------------------------------------------------
+ [Key(2)]
+ public virtual string TelephoneNumber { get; set; }
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // One-to-one relationships
// -------------------------------------------------------------
// -------------------------------------------------------------
// =============================================================
// Extensions
// -------------------------------------------------------------
+ private IDictionary _extensions;
+
+ [MessagePackFormatter(typeof(EntityExtensionsMessagePackFormatter), "EducationOrganization", "EducationOrganizationInstitutionTelephone")]
+ [Key(3)]
+ public IDictionary Extensions
+ {
+ get
+ {
+ foreach (var key in _extensions.Keys)
+ {
+ if (_extensions[key] is IDeserializedPersistentGenericCollection collection)
+ {
+ collection.ReattachExtension(this, (string) key);
+ }
+ }
+
+ return _extensions;
+ }
+ set
+ {
+ // If the _extensions is null, this is being assigned from the constructor
+ // for the first time and no special handling is required
+ if (_extensions != null && value != null)
+ {
+ // For extensions that have already been initialized by the extensions factory,
+ // we need to copy any "implicit" extension object entries over to the incoming
+ // value dictionary being assigned by NHibernate because it won't have them,
+ // but they must be there for correct handling of extensions for the API.
+ foreach (var key in _extensions.Keys)
+ {
+ if (!value.Contains(key))
+ {
+ value[key] = _extensions[key];
+ }
+ }
+ }
+
+ _extensions = value;
+ }
+ }
+
+ private IDictionary _aggregateExtensions;
+
+ [MessagePackFormatter(typeof(AggregateExtensionsMessagePackFormatter), "EducationOrganization", "EducationOrganizationInstitutionTelephone")]
+ [Key(4)]
+ public IDictionary AggregateExtensions
+ {
+ get
+ {
+ foreach (var key in _aggregateExtensions.Keys)
+ {
+ if (_aggregateExtensions[key] is IDeserializedPersistentGenericCollection collection)
+ {
+ collection.ReattachAggregateExtension(this, (string) key);
+ }
+ }
+
+ return _aggregateExtensions;
+ }
+ set
+ {
+ // If the _aggregateExtensions is null, this is being assigned from the constructor
+ // for the first time and no special handling is required
+ if (_aggregateExtensions != null && value != null)
+ {
+ // For aggregate extensions that have already been initialized by the extensions factory,
+ // we need to copy any "implicit" aggregate extension object entries over to the incoming
+ // value dictionary being assigned by NHibernate (or deserialization) because it won't have them,
+ // but they must be there for correct handling of extensions for the API.
+ foreach (var key in _aggregateExtensions.Keys)
+ {
+ if (!value.Contains(key))
+ {
+ value[key] = _aggregateExtensions[key];
+ }
+ }
+ }
+
+ _aggregateExtensions = value;
+ }
+ }
+
// -------------------------------------------------------------
// =============================================================
@@ -1977,6 +2968,7 @@ string IDescriptor.ShortDescription
// Provide lookup property map
private static readonly Dictionary _idPropertyByLookupProperty = new Dictionary(StringComparer.InvariantCultureIgnoreCase)
{
+ { "InstitutionTelephoneNumberTypeDescriptor", new LookupColumnDetails { PropertyName = "InstitutionTelephoneNumberTypeDescriptorId", LookupTypeName = "InstitutionTelephoneNumberTypeDescriptor"} },
};
Dictionary IHasLookupColumnPropertyMap.IdPropertyByLookupProperty
@@ -1987,11 +2979,11 @@ Dictionary IHasLookupColumnPropertyMap.IdPropertyBy
// Provide primary key information
OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
{
- // Initialize a new dictionary to hold the key values
- var keyValues = new OrderedDictionary();
+ // Get parent key values
+ var keyValues = (EducationOrganization as IHasPrimaryKeyValues)?.GetPrimaryKeyValues() ?? new OrderedDictionary();
// Add current key values
- keyValues.Add("AddressTypeDescriptorId", AddressTypeDescriptorId);
+ keyValues.Add("InstitutionTelephoneNumberTypeDescriptorId", InstitutionTelephoneNumberTypeDescriptorId);
return keyValues;
}
@@ -2055,82 +3047,188 @@ public override int GetHashCode()
#endregion
bool ISynchronizable.Synchronize(object target)
{
- return this.SynchronizeTo((Entities.Common.EdFi.IAddressTypeDescriptor)target);
+ return this.SynchronizeTo((Entities.Common.EdFi.IEducationOrganizationInstitutionTelephone)target);
}
void IMappable.Map(object target)
{
- this.MapTo((Entities.Common.EdFi.IAddressTypeDescriptor) target, null);
+ this.MapTo((Entities.Common.EdFi.IEducationOrganizationInstitutionTelephone) target, null);
}
+ void IChildEntity.SetParent(object value)
+ {
+ EducationOrganization = (EducationOrganization) value;
+ }
}
-}
-// Aggregate: AdministrationEnvironmentDescriptor
-
-namespace EdFi.Ods.Entities.NHibernate.AdministrationEnvironmentDescriptorAggregate.EdFi
-{
// disable warnings for inheritance from classes marked Obsolete within this generated code only
#pragma warning disable 612, 618
///
- /// A class which represents the edfi.AdministrationEnvironmentDescriptor table of the AdministrationEnvironmentDescriptor aggregate in the ODS database.
+ /// A class which represents the edfi.EducationOrganizationInternationalAddress table of the EducationOrganization aggregate in the ODS database.
///
[Schema("edfi")]
[ExcludeFromCodeCoverage]
- public class AdministrationEnvironmentDescriptor : DescriptorAggregate.EdFi.Descriptor,
- Entities.Common.EdFi.IAdministrationEnvironmentDescriptor, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IEdFiDescriptor
+ [MessagePackObject]
+ public class EducationOrganizationInternationalAddress : EntityWithCompositeKey, IChildEntity,
+ Entities.Common.EdFi.IEducationOrganizationInternationalAddress, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IHasExtensions
{
+ public virtual void SuspendReferenceAssignmentCheck() { }
+
+ public EducationOrganizationInternationalAddress()
+ {
+ Extensions = GeneratedArtifactStaticDependencies.EntityExtensionsFactory == null ? new Dictionary() : new Dictionary(GeneratedArtifactStaticDependencies.EntityExtensionsFactory.CreateRequiredEntityExtensions(this));
+ AggregateExtensions = GeneratedArtifactStaticDependencies.EntityExtensionsFactory == null ? new Dictionary() : new Dictionary(GeneratedArtifactStaticDependencies.EntityExtensionsFactory.CreateAggregateExtensions());
+ }
+// restore warnings for inheritance from classes marked Obsolete
+#pragma warning restore 612, 618
// =============================================================
// Primary Key
// -------------------------------------------------------------
+ [DomainSignature, IgnoreMember]
+ public virtual EducationOrganization EducationOrganization { get; set; }
+
+ Entities.Common.EdFi.IEducationOrganization IEducationOrganizationInternationalAddress.EducationOrganization
+ {
+ get { return EducationOrganization; }
+ set { EducationOrganization = (EducationOrganization) value; }
+ }
+
[DomainSignature]
- public virtual int AdministrationEnvironmentDescriptorId
+ [Key(1)]
+ public virtual int AddressTypeDescriptorId
{
- get { return base.DescriptorId; }
- set { base.DescriptorId = value; }
+ get
+ {
+ if (_addressTypeDescriptorId == default(int))
+ _addressTypeDescriptorId = GeneratedArtifactStaticDependencies.DescriptorResolver.GetDescriptorId("AddressTypeDescriptor", _addressTypeDescriptor);
+
+ return _addressTypeDescriptorId;
+ }
+ set
+ {
+ _addressTypeDescriptorId = value;
+ _addressTypeDescriptor = null;
+ }
+ }
+
+ private int _addressTypeDescriptorId;
+ private string _addressTypeDescriptor;
+
+ [IgnoreMember]
+ public virtual string AddressTypeDescriptor
+ {
+ get
+ {
+ if (_addressTypeDescriptor == null)
+ _addressTypeDescriptor = GeneratedArtifactStaticDependencies.DescriptorResolver.GetUri("AddressTypeDescriptor", _addressTypeDescriptorId);
+
+ return _addressTypeDescriptor;
+ }
+ set
+ {
+ _addressTypeDescriptor = value;
+ _addressTypeDescriptorId = default(int);
+ }
}
-
// -------------------------------------------------------------
// =============================================================
// Inherited Properties
// -------------------------------------------------------------
- string IDescriptor.CodeValue
- {
- get { return CodeValue; }
- set { CodeValue = value; }
- }
- string IDescriptor.Description
- {
- get { return Description; }
- set { Description = value; }
- }
- DateTime? IDescriptor.EffectiveBeginDate
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // Properties
+ // -------------------------------------------------------------
+ [Key(2)]
+ public virtual string AddressLine1 { get; set; }
+ [Key(3)]
+ public virtual string AddressLine2 { get; set; }
+ [Key(4)]
+ public virtual string AddressLine3 { get; set; }
+ [Key(5)]
+ public virtual string AddressLine4 { get; set; }
+ [Key(6)]
+ public virtual DateTime? BeginDate
{
- get { return EffectiveBeginDate; }
- set { EffectiveBeginDate = value; }
+ get { return _beginDate; }
+ set
+ {
+ //This is only stored as a Date in the DB and NHibernate will retrieve it using the default (local) DateTime.Kind. We must ensure it is set consistently for any equality/change evaluation.
+ if(value == null)
+ {
+ _beginDate = null;
+ } else
+ {
+ var given = (DateTime) value;
+ _beginDate = new DateTime(given.Year, given.Month, given.Day);
+ }
+ }
}
- DateTime? IDescriptor.EffectiveEndDate
+
+ private DateTime? _beginDate;
+
+ [Key(7)]
+ public virtual int CountryDescriptorId
{
- get { return EffectiveEndDate; }
- set { EffectiveEndDate = value; }
+ get
+ {
+ if (_countryDescriptorId == default(int))
+ _countryDescriptorId = GeneratedArtifactStaticDependencies.DescriptorResolver.GetDescriptorId("CountryDescriptor", _countryDescriptor);
+
+ return _countryDescriptorId;
+ }
+ set
+ {
+ _countryDescriptorId = value;
+ _countryDescriptor = null;
+ }
}
- string IDescriptor.Namespace
+
+ private int _countryDescriptorId;
+ private string _countryDescriptor;
+
+ [IgnoreMember]
+ public virtual string CountryDescriptor
{
- get { return Namespace; }
- set { Namespace = value; }
+ get
+ {
+ if (_countryDescriptor == null)
+ _countryDescriptor = GeneratedArtifactStaticDependencies.DescriptorResolver.GetUri("CountryDescriptor", _countryDescriptorId);
+
+ return _countryDescriptor;
+ }
+ set
+ {
+ _countryDescriptor = value;
+ _countryDescriptorId = default(int);
+ }
}
- string IDescriptor.ShortDescription
+ [Key(8)]
+ public virtual DateTime? EndDate
{
- get { return ShortDescription; }
- set { ShortDescription = value; }
+ get { return _endDate; }
+ set
+ {
+ //This is only stored as a Date in the DB and NHibernate will retrieve it using the default (local) DateTime.Kind. We must ensure it is set consistently for any equality/change evaluation.
+ if(value == null)
+ {
+ _endDate = null;
+ } else
+ {
+ var given = (DateTime) value;
+ _endDate = new DateTime(given.Year, given.Month, given.Day);
+ }
+ }
}
- // -------------------------------------------------------------
- // =============================================================
- // Properties
- // -------------------------------------------------------------
+ private DateTime? _endDate;
+
+ [Key(9)]
+ public virtual string Latitude { get; set; }
+ [Key(10)]
+ public virtual string Longitude { get; set; }
// -------------------------------------------------------------
// =============================================================
@@ -2141,6 +3239,88 @@ string IDescriptor.ShortDescription
// =============================================================
// Extensions
// -------------------------------------------------------------
+ private IDictionary _extensions;
+
+ [MessagePackFormatter(typeof(EntityExtensionsMessagePackFormatter), "EducationOrganization", "EducationOrganizationInternationalAddress")]
+ [Key(11)]
+ public IDictionary Extensions
+ {
+ get
+ {
+ foreach (var key in _extensions.Keys)
+ {
+ if (_extensions[key] is IDeserializedPersistentGenericCollection collection)
+ {
+ collection.ReattachExtension(this, (string) key);
+ }
+ }
+
+ return _extensions;
+ }
+ set
+ {
+ // If the _extensions is null, this is being assigned from the constructor
+ // for the first time and no special handling is required
+ if (_extensions != null && value != null)
+ {
+ // For extensions that have already been initialized by the extensions factory,
+ // we need to copy any "implicit" extension object entries over to the incoming
+ // value dictionary being assigned by NHibernate because it won't have them,
+ // but they must be there for correct handling of extensions for the API.
+ foreach (var key in _extensions.Keys)
+ {
+ if (!value.Contains(key))
+ {
+ value[key] = _extensions[key];
+ }
+ }
+ }
+
+ _extensions = value;
+ }
+ }
+
+ private IDictionary _aggregateExtensions;
+
+ [MessagePackFormatter(typeof(AggregateExtensionsMessagePackFormatter), "EducationOrganization", "EducationOrganizationInternationalAddress")]
+ [Key(12)]
+ public IDictionary AggregateExtensions
+ {
+ get
+ {
+ foreach (var key in _aggregateExtensions.Keys)
+ {
+ if (_aggregateExtensions[key] is IDeserializedPersistentGenericCollection collection)
+ {
+ collection.ReattachAggregateExtension(this, (string) key);
+ }
+ }
+
+ return _aggregateExtensions;
+ }
+ set
+ {
+ // If the _aggregateExtensions is null, this is being assigned from the constructor
+ // for the first time and no special handling is required
+ if (_aggregateExtensions != null && value != null)
+ {
+ // For aggregate extensions that have already been initialized by the extensions factory,
+ // we need to copy any "implicit" aggregate extension object entries over to the incoming
+ // value dictionary being assigned by NHibernate (or deserialization) because it won't have them,
+ // but they must be there for correct handling of extensions for the API.
+ foreach (var key in _aggregateExtensions.Keys)
+ {
+ if (!value.Contains(key))
+ {
+ value[key] = _aggregateExtensions[key];
+ }
+ }
+ }
+
+ _aggregateExtensions = value;
+ }
+ }
+
// -------------------------------------------------------------
// =============================================================
@@ -2156,6 +3336,8 @@ string IDescriptor.ShortDescription
// Provide lookup property map
private static readonly Dictionary _idPropertyByLookupProperty = new Dictionary(StringComparer.InvariantCultureIgnoreCase)
{
+ { "AddressTypeDescriptor", new LookupColumnDetails { PropertyName = "AddressTypeDescriptorId", LookupTypeName = "AddressTypeDescriptor"} },
+ { "CountryDescriptor", new LookupColumnDetails { PropertyName = "CountryDescriptorId", LookupTypeName = "CountryDescriptor"} },
};
Dictionary IHasLookupColumnPropertyMap.IdPropertyByLookupProperty
@@ -2166,11 +3348,11 @@ Dictionary IHasLookupColumnPropertyMap.IdPropertyBy
// Provide primary key information
OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
{
- // Initialize a new dictionary to hold the key values
- var keyValues = new OrderedDictionary();
+ // Get parent key values
+ var keyValues = (EducationOrganization as IHasPrimaryKeyValues)?.GetPrimaryKeyValues() ?? new OrderedDictionary();
// Add current key values
- keyValues.Add("AdministrationEnvironmentDescriptorId", AdministrationEnvironmentDescriptorId);
+ keyValues.Add("AddressTypeDescriptorId", AddressTypeDescriptorId);
return keyValues;
}
@@ -2234,82 +3416,663 @@ public override int GetHashCode()
#endregion
bool ISynchronizable.Synchronize(object target)
{
- return this.SynchronizeTo((Entities.Common.EdFi.IAdministrationEnvironmentDescriptor)target);
+ return this.SynchronizeTo((Entities.Common.EdFi.IEducationOrganizationInternationalAddress)target);
}
void IMappable.Map(object target)
{
- this.MapTo((Entities.Common.EdFi.IAdministrationEnvironmentDescriptor) target, null);
+ this.MapTo((Entities.Common.EdFi.IEducationOrganizationInternationalAddress) target, null);
}
+ void IChildEntity.SetParent(object value)
+ {
+ EducationOrganization = (EducationOrganization) value;
+ }
}
}
-// Aggregate: AdministrativeFundingControlDescriptor
+// Aggregate: GeneralStudentProgramAssociation
-namespace EdFi.Ods.Entities.NHibernate.AdministrativeFundingControlDescriptorAggregate.EdFi
+namespace EdFi.Ods.Entities.NHibernate.GeneralStudentProgramAssociationAggregate.EdFi
{
+ ///
+ /// Represents a read-only reference to the entity.
+ ///
+ [MessagePackObject]
+ public class GeneralStudentProgramAssociationReferenceData : IHasPrimaryKeyValues
+ {
+ // =============================================================
+ // Primary Key
+ // -------------------------------------------------------------
+ [Key(0)]
+ public virtual DateTime BeginDate { get; set; }
+ [Key(1)]
+ public virtual long EducationOrganizationId { get; set; }
+ [Key(2)]
+ public virtual long ProgramEducationOrganizationId { get; set; }
+ [Key(3)]
+ public virtual string ProgramName { get; set; }
+ [Key(4)]
+ public virtual int ProgramTypeDescriptorId { get; set; }
+ [Key(5)]
+ public virtual int StudentUSI { get; set; }
+ // -------------------------------------------------------------
+
+ ///
+ /// The id of the referenced entity (used as the resource identifier in the API).
+ ///
+ [Key(6)]
+ public virtual Guid? Id { get; set; }
+
+ ///
+ /// Gets and sets the discriminator value which identifies the concrete sub-type of the referenced entity
+ /// when that entity has been derived; otherwise null.
+ ///
+ [Key(7)]
+ public virtual string Discriminator { get; set; }
+
+ // Provide primary key information
+ OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
+ {
+ // Initialize a new dictionary to hold the key values
+ var keyValues = new OrderedDictionary();
+
+ // Add current key values
+ keyValues.Add("BeginDate", BeginDate);
+ keyValues.Add("EducationOrganizationId", EducationOrganizationId);
+ keyValues.Add("ProgramEducationOrganizationId", ProgramEducationOrganizationId);
+ keyValues.Add("ProgramName", ProgramName);
+ keyValues.Add("ProgramTypeDescriptorId", ProgramTypeDescriptorId);
+ keyValues.Add("StudentUSI", StudentUSI);
+
+ return keyValues;
+ }
+
+ #region Overrides for Equals() and GetHashCode()
+ public override bool Equals(object obj)
+ {
+ var compareTo = obj as IHasPrimaryKeyValues;
+
+ if (ReferenceEquals(this, compareTo))
+ return true;
+
+ if (compareTo == null)
+ return false;
+
+ var theseKeys = (this as IHasPrimaryKeyValues).GetPrimaryKeyValues();
+ var thoseKeys = compareTo.GetPrimaryKeyValues();
+
+ foreach (DictionaryEntry entry in theseKeys)
+ {
+ if (!entry.Value.Equals(thoseKeys[entry.Key]))
+ return false;
+ }
+
+ return true;
+ }
+
+ public override int GetHashCode()
+ {
+ var keyValues = (this as IHasPrimaryKeyValues).GetPrimaryKeyValues();
+
+ if (keyValues.Count == 0)
+ return base.GetHashCode();
+
+ var hashCode = new HashCode();
+
+ foreach (DictionaryEntry entry in keyValues)
+ {
+ hashCode.Add(entry.Value);
+ }
+
+ return hashCode.ToHashCode();
+ }
+ #endregion
+ }
+
// disable warnings for inheritance from classes marked Obsolete within this generated code only
#pragma warning disable 612, 618
///
- /// A class which represents the edfi.AdministrativeFundingControlDescriptor table of the AdministrativeFundingControlDescriptor aggregate in the ODS database.
+ /// A class which represents the edfi.GeneralStudentProgramAssociation table of the GeneralStudentProgramAssociation aggregate in the ODS database.
///
[Schema("edfi")]
[ExcludeFromCodeCoverage]
- public class AdministrativeFundingControlDescriptor : DescriptorAggregate.EdFi.Descriptor,
- Entities.Common.EdFi.IAdministrativeFundingControlDescriptor, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IEdFiDescriptor
+ [MessagePackObject]
+ public class GeneralStudentProgramAssociation : AggregateRootWithCompositeKey,
+ Entities.Common.EdFi.IGeneralStudentProgramAssociation, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap
{
+ public virtual void SuspendReferenceAssignmentCheck() { }
+
+ public GeneralStudentProgramAssociation()
+ {
+ GeneralStudentProgramAssociationProgramParticipationStatuses = new HashSet();
+ }
+// restore warnings for inheritance from classes marked Obsolete
+#pragma warning restore 612, 618
// =============================================================
// Primary Key
// -------------------------------------------------------------
- [DomainSignature]
- public virtual int AdministrativeFundingControlDescriptorId
+ [Key(6)]
+ public virtual DateTime BeginDate
{
- get { return base.DescriptorId; }
- set { base.DescriptorId = value; }
+ get { return _beginDate; }
+ //This is only stored as a Date in the DB and NHibernate will retrieve it using the default (local) DateTime.Kind. We must ensure it is set consistently for any equality/change evaluation.
+ set { _beginDate = new DateTime(value.Year, value.Month, value.Day); }
}
+
+ private DateTime _beginDate;
+ [Key(7)]
+ public virtual long EducationOrganizationId { get; set; }
+ [Key(8)]
+ public virtual long ProgramEducationOrganizationId { get; set; }
+ [Key(9)]
+ public virtual string ProgramName { get; set; }
+ [Key(10)]
+ public virtual int ProgramTypeDescriptorId
+ {
+ get
+ {
+ if (_programTypeDescriptorId == default(int))
+ _programTypeDescriptorId = GeneratedArtifactStaticDependencies.DescriptorResolver.GetDescriptorId("ProgramTypeDescriptor", _programTypeDescriptor);
+
+ return _programTypeDescriptorId;
+ }
+ set
+ {
+ _programTypeDescriptorId = value;
+ _programTypeDescriptor = null;
+ }
+ }
+
+ private int _programTypeDescriptorId;
+ private string _programTypeDescriptor;
+
+ [IgnoreMember]
+ public virtual string ProgramTypeDescriptor
+ {
+ get
+ {
+ if (_programTypeDescriptor == null)
+ _programTypeDescriptor = GeneratedArtifactStaticDependencies.DescriptorResolver.GetUri("ProgramTypeDescriptor", _programTypeDescriptorId);
+
+ return _programTypeDescriptor;
+ }
+ set
+ {
+ _programTypeDescriptor = value;
+ _programTypeDescriptorId = default(int);
+ }
+ }
+ [Key(11)]
+ public virtual int StudentUSI
+ {
+ get
+ {
+ if (_studentUSI == default(int) && _studentUniqueId != null)
+ {
+ if (GeneratedArtifactStaticDependencies.UsiLookupsByUniqueIdContextProvider.Get().UsiByUniqueIdByPersonType.TryGetValue("Student", out var usiByUniqueId)
+ && usiByUniqueId.TryGetValue(_studentUniqueId, out var usi))
+ {
+ _studentUSI = usi;
+ }
+ }
+
+ return _studentUSI;
+ }
+ set
+ {
+ _studentUSI = value;
+ GeneratedArtifactStaticDependencies.UniqueIdLookupsByUsiContextProvider.Get().AddLookup("Student", value);
+ }
+ }
+
+ private int _studentUSI;
+ private string _studentUniqueId;
+
+ [IgnoreMember]
+ public virtual string StudentUniqueId
+ {
+ get
+ {
+ if (_studentUniqueId == null)
+ {
+ if (GeneratedArtifactStaticDependencies.UniqueIdLookupsByUsiContextProvider.Get().UniqueIdByUsiByPersonType.TryGetValue("Student", out var uniqueIdByUsi)
+ && uniqueIdByUsi.TryGetValue(_studentUSI, out var uniqueId))
+ {
+ _studentUniqueId = uniqueId;
+ }
+ }
+
+ return _studentUniqueId;
+ }
+ set
+ {
+ if (_studentUniqueId != value)
+ _studentUSI = default(int);
+
+ _studentUniqueId = value;
+ }
+ }
// -------------------------------------------------------------
// =============================================================
// Inherited Properties
// -------------------------------------------------------------
- string IDescriptor.CodeValue
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // Properties
+ // -------------------------------------------------------------
+ [Key(12)]
+ public virtual DateTime? EndDate
{
- get { return CodeValue; }
- set { CodeValue = value; }
+ get { return _endDate; }
+ set
+ {
+ //This is only stored as a Date in the DB and NHibernate will retrieve it using the default (local) DateTime.Kind. We must ensure it is set consistently for any equality/change evaluation.
+ if(value == null)
+ {
+ _endDate = null;
+ } else
+ {
+ var given = (DateTime) value;
+ _endDate = new DateTime(given.Year, given.Month, given.Day);
+ }
+ }
}
- string IDescriptor.Description
+
+ private DateTime? _endDate;
+
+ [Key(13)]
+ public virtual int? ReasonExitedDescriptorId
{
- get { return Description; }
- set { Description = value; }
+ get
+ {
+ if (_reasonExitedDescriptorId == default(int?))
+ _reasonExitedDescriptorId = string.IsNullOrWhiteSpace(_reasonExitedDescriptor) ? default(int?) : GeneratedArtifactStaticDependencies.DescriptorResolver.GetDescriptorId("ReasonExitedDescriptor", _reasonExitedDescriptor);
+
+ return _reasonExitedDescriptorId;
+ }
+ set
+ {
+ _reasonExitedDescriptorId = value;
+ _reasonExitedDescriptor = null;
+ }
}
- DateTime? IDescriptor.EffectiveBeginDate
+
+ private int? _reasonExitedDescriptorId;
+ private string _reasonExitedDescriptor;
+
+ [IgnoreMember]
+ public virtual string ReasonExitedDescriptor
{
- get { return EffectiveBeginDate; }
- set { EffectiveBeginDate = value; }
+ get
+ {
+ if (_reasonExitedDescriptor == null)
+ _reasonExitedDescriptor = _reasonExitedDescriptorId == null ? null : GeneratedArtifactStaticDependencies.DescriptorResolver.GetUri("ReasonExitedDescriptor", _reasonExitedDescriptorId.Value);
+
+ return _reasonExitedDescriptor;
+ }
+ set
+ {
+ _reasonExitedDescriptor = value;
+ _reasonExitedDescriptorId = default(int?);
+ }
}
- DateTime? IDescriptor.EffectiveEndDate
+ [Key(14)]
+ public virtual bool? ServedOutsideOfRegularSession { get; set; }
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // One-to-one relationships
+ // -------------------------------------------------------------
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // Extensions
+ // -------------------------------------------------------------
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // Reference Data
+ // -------------------------------------------------------------
+ [Key(15)]
+ public virtual NHibernate.EducationOrganizationAggregate.EdFi.EducationOrganizationReferenceData EducationOrganizationReferenceData { get; set; }
+
+ ///
+ /// Read-only property that allows the EducationOrganization discriminator value to be mapped to the resource reference.
+ ///
+ string Entities.Common.EdFi.IGeneralStudentProgramAssociation.EducationOrganizationDiscriminator
{
- get { return EffectiveEndDate; }
- set { EffectiveEndDate = value; }
+ get { return EducationOrganizationReferenceData?.Discriminator; }
+ set { }
}
- string IDescriptor.Namespace
+
+ ///
+ /// Read-only property that allows the EducationOrganization resource identifier value to be mapped to the resource reference.
+ ///
+ Guid? Entities.Common.EdFi.IGeneralStudentProgramAssociation.EducationOrganizationResourceId
{
- get { return Namespace; }
- set { Namespace = value; }
+ get { return EducationOrganizationReferenceData?.Id; }
+ set { }
}
- string IDescriptor.ShortDescription
+
+ [Key(16)]
+ public virtual NHibernate.ProgramAggregate.EdFi.ProgramReferenceData ProgramReferenceData { get; set; }
+
+ ///
+ /// Read-only property that allows the Program discriminator value to be mapped to the resource reference.
+ ///
+ string Entities.Common.EdFi.IGeneralStudentProgramAssociation.ProgramDiscriminator
{
- get { return ShortDescription; }
- set { ShortDescription = value; }
+ get { return ProgramReferenceData?.Discriminator; }
+ set { }
+ }
+
+ ///
+ /// Read-only property that allows the Program resource identifier value to be mapped to the resource reference.
+ ///
+ Guid? Entities.Common.EdFi.IGeneralStudentProgramAssociation.ProgramResourceId
+ {
+ get { return ProgramReferenceData?.Id; }
+ set { }
+ }
+
+ [Key(17)]
+ public virtual NHibernate.StudentAggregate.EdFi.StudentReferenceData StudentReferenceData { get; set; }
+
+ ///
+ /// Read-only property that allows the Student discriminator value to be mapped to the resource reference.
+ ///
+ string Entities.Common.EdFi.IGeneralStudentProgramAssociation.StudentDiscriminator
+ {
+ get { return StudentReferenceData?.Discriminator; }
+ set { }
+ }
+
+ ///
+ /// Read-only property that allows the Student resource identifier value to be mapped to the resource reference.
+ ///
+ Guid? Entities.Common.EdFi.IGeneralStudentProgramAssociation.StudentResourceId
+ {
+ get { return StudentReferenceData?.Id; }
+ set { }
+ }
+
+ // -------------------------------------------------------------
+
+ //=============================================================
+ // Collections
+ // -------------------------------------------------------------
+
+ private ICollection _generalStudentProgramAssociationProgramParticipationStatuses;
+ private ICollection _generalStudentProgramAssociationProgramParticipationStatusesCovariant;
+ [Key(18)]
+ [MessagePackFormatter(typeof(PersistentCollectionFormatter))]
+ public virtual ICollection GeneralStudentProgramAssociationProgramParticipationStatuses
+ {
+ get
+ {
+ // -------------------------------------------------------------
+ // On-demand deserialization logic to attach reverse reference of children
+ // due to ServiceStack's lack of [OnDeserialized] attribute support.
+ // Back-reference is required by NHibernate for persistence.
+ // -------------------------------------------------------------
+ if (_generalStudentProgramAssociationProgramParticipationStatuses is DeserializedPersistentGenericSet set)
+ {
+ set.Reattach(this, "GeneralStudentProgramAssociationProgramParticipationStatuses");
+ }
+
+ foreach (var item in _generalStudentProgramAssociationProgramParticipationStatuses)
+ if (item.GeneralStudentProgramAssociation == null)
+ item.GeneralStudentProgramAssociation = this;
+ // -------------------------------------------------------------
+
+ return _generalStudentProgramAssociationProgramParticipationStatuses;
+ }
+ set
+ {
+ _generalStudentProgramAssociationProgramParticipationStatuses = value;
+ _generalStudentProgramAssociationProgramParticipationStatusesCovariant = new CovariantCollectionAdapter(value);
+ }
+ }
+
+ // Covariant version, visible only on the interface
+ ICollection Entities.Common.EdFi.IGeneralStudentProgramAssociation.GeneralStudentProgramAssociationProgramParticipationStatuses
+ {
+ get
+ {
+ // -------------------------------------------------------------
+ // Back-reference is required by NHibernate for persistence.
+ // -------------------------------------------------------------
+ foreach (var item in _generalStudentProgramAssociationProgramParticipationStatuses)
+ if (item.GeneralStudentProgramAssociation == null)
+ item.GeneralStudentProgramAssociation = this;
+ // -------------------------------------------------------------
+
+ return _generalStudentProgramAssociationProgramParticipationStatusesCovariant;
+ }
+ set
+ {
+ GeneralStudentProgramAssociationProgramParticipationStatuses = new HashSet(value.Cast());
+ }
+ }
+
+ // -------------------------------------------------------------
+
+ // Provide lookup property map
+ private static readonly Dictionary _idPropertyByLookupProperty = new Dictionary(StringComparer.InvariantCultureIgnoreCase)
+ {
+ { "ProgramTypeDescriptor", new LookupColumnDetails { PropertyName = "ProgramTypeDescriptorId", LookupTypeName = "ProgramTypeDescriptor"} },
+ { "ReasonExitedDescriptor", new LookupColumnDetails { PropertyName = "ReasonExitedDescriptorId", LookupTypeName = "ReasonExitedDescriptor"} },
+ };
+
+ Dictionary IHasLookupColumnPropertyMap.IdPropertyByLookupProperty
+ {
+ get { return _idPropertyByLookupProperty; }
+ }
+
+ // Provide primary key information
+ OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
+ {
+ // Initialize a new dictionary to hold the key values
+ var keyValues = new OrderedDictionary();
+
+ // Add current key values
+ keyValues.Add("BeginDate", BeginDate);
+ keyValues.Add("EducationOrganizationId", EducationOrganizationId);
+ keyValues.Add("ProgramEducationOrganizationId", ProgramEducationOrganizationId);
+ keyValues.Add("ProgramName", ProgramName);
+ keyValues.Add("ProgramTypeDescriptorId", ProgramTypeDescriptorId);
+ keyValues.Add("StudentUSI", StudentUSI);
+
+ return keyValues;
+ }
+
+ #region Overrides for Equals() and GetHashCode()
+ public override bool Equals(object obj)
+ {
+ var compareTo = obj as IHasPrimaryKeyValues;
+
+ if (ReferenceEquals(this, compareTo))
+ return true;
+
+ if (compareTo == null)
+ return false;
+
+ var theseKeys = (this as IHasPrimaryKeyValues).GetPrimaryKeyValues();
+ var thoseKeys = compareTo.GetPrimaryKeyValues();
+
+ foreach (DictionaryEntry entry in theseKeys)
+ {
+ if (entry.Value is string)
+ {
+ if (!GeneratedArtifactStaticDependencies.DatabaseEngineSpecificStringComparer.Equals((string) entry.Value, (string) thoseKeys[entry.Key]))
+ {
+ return false;
+ }
+ }
+ else
+ {
+ if (!entry.Value.Equals(thoseKeys[entry.Key]))
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ public override int GetHashCode()
+ {
+ var keyValues = (this as IHasPrimaryKeyValues).GetPrimaryKeyValues();
+
+ if (keyValues.Count == 0)
+ return base.GetHashCode();
+
+ var hashCode = new HashCode();
+
+ foreach (DictionaryEntry entry in keyValues)
+ {
+ if (entry.Value is string)
+ {
+ hashCode.Add(entry.Value as string, GeneratedArtifactStaticDependencies.DatabaseEngineSpecificStringComparer);
+ }
+ else
+ {
+ hashCode.Add(entry.Value);
+ }
+ }
+
+ return hashCode.ToHashCode();
+ }
+ #endregion
+ bool ISynchronizable.Synchronize(object target)
+ {
+ return this.SynchronizeTo((Entities.Common.EdFi.IGeneralStudentProgramAssociation)target);
+ }
+
+ void IMappable.Map(object target)
+ {
+ this.MapTo((Entities.Common.EdFi.IGeneralStudentProgramAssociation) target, null);
+ }
+
+ }
+// disable warnings for inheritance from classes marked Obsolete within this generated code only
+#pragma warning disable 612, 618
+
+ ///
+ /// A class which represents the edfi.GeneralStudentProgramAssociationProgramParticipationStatus table of the GeneralStudentProgramAssociation aggregate in the ODS database.
+ ///
+ [Schema("edfi")]
+ [ExcludeFromCodeCoverage]
+ [MessagePackObject]
+ public class GeneralStudentProgramAssociationProgramParticipationStatus : EntityWithCompositeKey, IChildEntity,
+ Entities.Common.EdFi.IGeneralStudentProgramAssociationProgramParticipationStatus, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IHasExtensions
+ {
+ public virtual void SuspendReferenceAssignmentCheck() { }
+
+ public GeneralStudentProgramAssociationProgramParticipationStatus()
+ {
+ Extensions = GeneratedArtifactStaticDependencies.EntityExtensionsFactory == null ? new Dictionary() : new Dictionary(GeneratedArtifactStaticDependencies.EntityExtensionsFactory.CreateRequiredEntityExtensions(this));
+ AggregateExtensions = GeneratedArtifactStaticDependencies.EntityExtensionsFactory == null ? new Dictionary() : new Dictionary(GeneratedArtifactStaticDependencies.EntityExtensionsFactory.CreateAggregateExtensions());
+ }
+// restore warnings for inheritance from classes marked Obsolete
+#pragma warning restore 612, 618
+
+ // =============================================================
+ // Primary Key
+ // -------------------------------------------------------------
+ [DomainSignature, IgnoreMember]
+ public virtual GeneralStudentProgramAssociation GeneralStudentProgramAssociation { get; set; }
+
+ Entities.Common.EdFi.IGeneralStudentProgramAssociation IGeneralStudentProgramAssociationProgramParticipationStatus.GeneralStudentProgramAssociation
+ {
+ get { return GeneralStudentProgramAssociation; }
+ set { GeneralStudentProgramAssociation = (GeneralStudentProgramAssociation) value; }
+ }
+
+ [DomainSignature]
+ [Key(1)]
+ public virtual int ParticipationStatusDescriptorId
+ {
+ get
+ {
+ if (_participationStatusDescriptorId == default(int))
+ _participationStatusDescriptorId = GeneratedArtifactStaticDependencies.DescriptorResolver.GetDescriptorId("ParticipationStatusDescriptor", _participationStatusDescriptor);
+
+ return _participationStatusDescriptorId;
+ }
+ set
+ {
+ _participationStatusDescriptorId = value;
+ _participationStatusDescriptor = null;
+ }
+ }
+
+ private int _participationStatusDescriptorId;
+ private string _participationStatusDescriptor;
+
+ [IgnoreMember]
+ public virtual string ParticipationStatusDescriptor
+ {
+ get
+ {
+ if (_participationStatusDescriptor == null)
+ _participationStatusDescriptor = GeneratedArtifactStaticDependencies.DescriptorResolver.GetUri("ParticipationStatusDescriptor", _participationStatusDescriptorId);
+
+ return _participationStatusDescriptor;
+ }
+ set
+ {
+ _participationStatusDescriptor = value;
+ _participationStatusDescriptorId = default(int);
+ }
+ }
+ [DomainSignature]
+ [Key(2)]
+ public virtual DateTime StatusBeginDate
+ {
+ get { return _statusBeginDate; }
+ //This is only stored as a Date in the DB and NHibernate will retrieve it using the default (local) DateTime.Kind. We must ensure it is set consistently for any equality/change evaluation.
+ set { _statusBeginDate = new DateTime(value.Year, value.Month, value.Day); }
}
+
+ private DateTime _statusBeginDate;
+
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // Inherited Properties
+ // -------------------------------------------------------------
// -------------------------------------------------------------
// =============================================================
// Properties
// -------------------------------------------------------------
+ [Key(3)]
+ public virtual string DesignatedBy { get; set; }
+ [Key(4)]
+ public virtual DateTime? StatusEndDate
+ {
+ get { return _statusEndDate; }
+ set
+ {
+ //This is only stored as a Date in the DB and NHibernate will retrieve it using the default (local) DateTime.Kind. We must ensure it is set consistently for any equality/change evaluation.
+ if(value == null)
+ {
+ _statusEndDate = null;
+ } else
+ {
+ var given = (DateTime) value;
+ _statusEndDate = new DateTime(given.Year, given.Month, given.Day);
+ }
+ }
+ }
+
+ private DateTime? _statusEndDate;
+
// -------------------------------------------------------------
// =============================================================
@@ -2320,6 +4083,88 @@ string IDescriptor.ShortDescription
// =============================================================
// Extensions
// -------------------------------------------------------------
+ private IDictionary _extensions;
+
+ [MessagePackFormatter(typeof(EntityExtensionsMessagePackFormatter), "GeneralStudentProgramAssociation", "GeneralStudentProgramAssociationProgramParticipationStatus")]
+ [Key(5)]
+ public IDictionary Extensions
+ {
+ get
+ {
+ foreach (var key in _extensions.Keys)
+ {
+ if (_extensions[key] is IDeserializedPersistentGenericCollection collection)
+ {
+ collection.ReattachExtension(this, (string) key);
+ }
+ }
+
+ return _extensions;
+ }
+ set
+ {
+ // If the _extensions is null, this is being assigned from the constructor
+ // for the first time and no special handling is required
+ if (_extensions != null && value != null)
+ {
+ // For extensions that have already been initialized by the extensions factory,
+ // we need to copy any "implicit" extension object entries over to the incoming
+ // value dictionary being assigned by NHibernate because it won't have them,
+ // but they must be there for correct handling of extensions for the API.
+ foreach (var key in _extensions.Keys)
+ {
+ if (!value.Contains(key))
+ {
+ value[key] = _extensions[key];
+ }
+ }
+ }
+
+ _extensions = value;
+ }
+ }
+
+ private IDictionary _aggregateExtensions;
+
+ [MessagePackFormatter(typeof(AggregateExtensionsMessagePackFormatter), "GeneralStudentProgramAssociation", "GeneralStudentProgramAssociationProgramParticipationStatus")]
+ [Key(6)]
+ public IDictionary AggregateExtensions
+ {
+ get
+ {
+ foreach (var key in _aggregateExtensions.Keys)
+ {
+ if (_aggregateExtensions[key] is IDeserializedPersistentGenericCollection collection)
+ {
+ collection.ReattachAggregateExtension(this, (string) key);
+ }
+ }
+
+ return _aggregateExtensions;
+ }
+ set
+ {
+ // If the _aggregateExtensions is null, this is being assigned from the constructor
+ // for the first time and no special handling is required
+ if (_aggregateExtensions != null && value != null)
+ {
+ // For aggregate extensions that have already been initialized by the extensions factory,
+ // we need to copy any "implicit" aggregate extension object entries over to the incoming
+ // value dictionary being assigned by NHibernate (or deserialization) because it won't have them,
+ // but they must be there for correct handling of extensions for the API.
+ foreach (var key in _aggregateExtensions.Keys)
+ {
+ if (!value.Contains(key))
+ {
+ value[key] = _aggregateExtensions[key];
+ }
+ }
+ }
+
+ _aggregateExtensions = value;
+ }
+ }
+
// -------------------------------------------------------------
// =============================================================
@@ -2335,6 +4180,8 @@ string IDescriptor.ShortDescription
// Provide lookup property map
private static readonly Dictionary _idPropertyByLookupProperty = new Dictionary(StringComparer.InvariantCultureIgnoreCase)
{
+ { "ParticipationStatusDescriptor", new LookupColumnDetails { PropertyName = "ParticipationStatusDescriptorId", LookupTypeName = "ParticipationStatusDescriptor"} },
+ { "ProgramTypeDescriptor", new LookupColumnDetails { PropertyName = "ProgramTypeDescriptorId", LookupTypeName = "ProgramTypeDescriptor"} },
};
Dictionary IHasLookupColumnPropertyMap.IdPropertyByLookupProperty
@@ -2345,11 +4192,12 @@ Dictionary IHasLookupColumnPropertyMap.IdPropertyBy
// Provide primary key information
OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
{
- // Initialize a new dictionary to hold the key values
- var keyValues = new OrderedDictionary();
+ // Get parent key values
+ var keyValues = (GeneralStudentProgramAssociation as IHasPrimaryKeyValues)?.GetPrimaryKeyValues() ?? new OrderedDictionary();
// Add current key values
- keyValues.Add("AdministrativeFundingControlDescriptorId", AdministrativeFundingControlDescriptorId);
+ keyValues.Add("ParticipationStatusDescriptorId", ParticipationStatusDescriptorId);
+ keyValues.Add("StatusBeginDate", StatusBeginDate);
return keyValues;
}
@@ -2413,37 +4261,43 @@ public override int GetHashCode()
#endregion
bool ISynchronizable.Synchronize(object target)
{
- return this.SynchronizeTo((Entities.Common.EdFi.IAdministrativeFundingControlDescriptor)target);
+ return this.SynchronizeTo((Entities.Common.EdFi.IGeneralStudentProgramAssociationProgramParticipationStatus)target);
}
void IMappable.Map(object target)
{
- this.MapTo((Entities.Common.EdFi.IAdministrativeFundingControlDescriptor) target, null);
+ this.MapTo((Entities.Common.EdFi.IGeneralStudentProgramAssociationProgramParticipationStatus) target, null);
}
+ void IChildEntity.SetParent(object value)
+ {
+ GeneralStudentProgramAssociation = (GeneralStudentProgramAssociation) value;
+ }
}
}
-// Aggregate: AncestryEthnicOriginDescriptor
+// Aggregate: AbsenceEventCategoryDescriptor
-namespace EdFi.Ods.Entities.NHibernate.AncestryEthnicOriginDescriptorAggregate.EdFi
+namespace EdFi.Ods.Entities.NHibernate.AbsenceEventCategoryDescriptorAggregate.EdFi
{
// disable warnings for inheritance from classes marked Obsolete within this generated code only
#pragma warning disable 612, 618
///
- /// A class which represents the edfi.AncestryEthnicOriginDescriptor table of the AncestryEthnicOriginDescriptor aggregate in the ODS database.
+ /// A class which represents the edfi.AbsenceEventCategoryDescriptor table of the AbsenceEventCategoryDescriptor aggregate in the ODS database.
///
[Schema("edfi")]
[ExcludeFromCodeCoverage]
- public class AncestryEthnicOriginDescriptor : DescriptorAggregate.EdFi.Descriptor,
- Entities.Common.EdFi.IAncestryEthnicOriginDescriptor, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IEdFiDescriptor
+ [MessagePackObject]
+ public class AbsenceEventCategoryDescriptor : DescriptorAggregate.EdFi.Descriptor,
+ Entities.Common.EdFi.IAbsenceEventCategoryDescriptor, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IEdFiDescriptor
{
// =============================================================
// Primary Key
// -------------------------------------------------------------
[DomainSignature]
- public virtual int AncestryEthnicOriginDescriptorId
+ [IgnoreMember]
+ public virtual int AbsenceEventCategoryDescriptorId
{
get { return base.DescriptorId; }
set { base.DescriptorId = value; }
@@ -2528,7 +4382,7 @@ OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
var keyValues = new OrderedDictionary();
// Add current key values
- keyValues.Add("AncestryEthnicOriginDescriptorId", AncestryEthnicOriginDescriptorId);
+ keyValues.Add("AbsenceEventCategoryDescriptorId", AbsenceEventCategoryDescriptorId);
return keyValues;
}
@@ -2592,41 +4446,408 @@ public override int GetHashCode()
#endregion
bool ISynchronizable.Synchronize(object target)
{
- return this.SynchronizeTo((Entities.Common.EdFi.IAncestryEthnicOriginDescriptor)target);
+ return this.SynchronizeTo((Entities.Common.EdFi.IAbsenceEventCategoryDescriptor)target);
}
void IMappable.Map(object target)
{
- this.MapTo((Entities.Common.EdFi.IAncestryEthnicOriginDescriptor) target, null);
+ this.MapTo((Entities.Common.EdFi.IAbsenceEventCategoryDescriptor) target, null);
}
}
}
-// Aggregate: Assessment
+// Aggregate: AcademicHonorCategoryDescriptor
-namespace EdFi.Ods.Entities.NHibernate.AssessmentAggregate.EdFi
+namespace EdFi.Ods.Entities.NHibernate.AcademicHonorCategoryDescriptorAggregate.EdFi
{
- ///
- /// Represents a read-only reference to the entity.
+// disable warnings for inheritance from classes marked Obsolete within this generated code only
+#pragma warning disable 612, 618
+
+ ///
+ /// A class which represents the edfi.AcademicHonorCategoryDescriptor table of the AcademicHonorCategoryDescriptor aggregate in the ODS database.
///
- public class AssessmentReferenceData : IHasPrimaryKeyValues
+ [Schema("edfi")]
+ [ExcludeFromCodeCoverage]
+ [MessagePackObject]
+ public class AcademicHonorCategoryDescriptor : DescriptorAggregate.EdFi.Descriptor,
+ Entities.Common.EdFi.IAcademicHonorCategoryDescriptor, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IEdFiDescriptor
{
+
// =============================================================
// Primary Key
// -------------------------------------------------------------
- public virtual string AssessmentIdentifier { get; set; }
- public virtual string Namespace { get; set; }
+ [DomainSignature]
+ [IgnoreMember]
+ public virtual int AcademicHonorCategoryDescriptorId
+ {
+ get { return base.DescriptorId; }
+ set { base.DescriptorId = value; }
+ }
+
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // Inherited Properties
+ // -------------------------------------------------------------
+ string IDescriptor.CodeValue
+ {
+ get { return CodeValue; }
+ set { CodeValue = value; }
+ }
+ string IDescriptor.Description
+ {
+ get { return Description; }
+ set { Description = value; }
+ }
+ DateTime? IDescriptor.EffectiveBeginDate
+ {
+ get { return EffectiveBeginDate; }
+ set { EffectiveBeginDate = value; }
+ }
+ DateTime? IDescriptor.EffectiveEndDate
+ {
+ get { return EffectiveEndDate; }
+ set { EffectiveEndDate = value; }
+ }
+ string IDescriptor.Namespace
+ {
+ get { return Namespace; }
+ set { Namespace = value; }
+ }
+ string IDescriptor.ShortDescription
+ {
+ get { return ShortDescription; }
+ set { ShortDescription = value; }
+ }
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // Properties
+ // -------------------------------------------------------------
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // One-to-one relationships
+ // -------------------------------------------------------------
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // Extensions
+ // -------------------------------------------------------------
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // Reference Data
+ // -------------------------------------------------------------
+ // -------------------------------------------------------------
+
+ //=============================================================
+ // Collections
+ // -------------------------------------------------------------
+ // -------------------------------------------------------------
+
+ // Provide lookup property map
+ private static readonly Dictionary _idPropertyByLookupProperty = new Dictionary(StringComparer.InvariantCultureIgnoreCase)
+ {
+ };
+
+ Dictionary IHasLookupColumnPropertyMap.IdPropertyByLookupProperty
+ {
+ get { return _idPropertyByLookupProperty; }
+ }
+
+ // Provide primary key information
+ OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
+ {
+ // Initialize a new dictionary to hold the key values
+ var keyValues = new OrderedDictionary();
+
+ // Add current key values
+ keyValues.Add("AcademicHonorCategoryDescriptorId", AcademicHonorCategoryDescriptorId);
+
+ return keyValues;
+ }
+
+ #region Overrides for Equals() and GetHashCode()
+ public override bool Equals(object obj)
+ {
+ var compareTo = obj as IHasPrimaryKeyValues;
+
+ if (ReferenceEquals(this, compareTo))
+ return true;
+
+ if (compareTo == null)
+ return false;
+
+ var theseKeys = (this as IHasPrimaryKeyValues).GetPrimaryKeyValues();
+ var thoseKeys = compareTo.GetPrimaryKeyValues();
+
+ foreach (DictionaryEntry entry in theseKeys)
+ {
+ if (entry.Value is string)
+ {
+ if (!GeneratedArtifactStaticDependencies.DatabaseEngineSpecificStringComparer.Equals((string) entry.Value, (string) thoseKeys[entry.Key]))
+ {
+ return false;
+ }
+ }
+ else
+ {
+ if (!entry.Value.Equals(thoseKeys[entry.Key]))
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ public override int GetHashCode()
+ {
+ var keyValues = (this as IHasPrimaryKeyValues).GetPrimaryKeyValues();
+
+ if (keyValues.Count == 0)
+ return base.GetHashCode();
+
+ var hashCode = new HashCode();
+
+ foreach (DictionaryEntry entry in keyValues)
+ {
+ if (entry.Value is string)
+ {
+ hashCode.Add(entry.Value as string, GeneratedArtifactStaticDependencies.DatabaseEngineSpecificStringComparer);
+ }
+ else
+ {
+ hashCode.Add(entry.Value);
+ }
+ }
+
+ return hashCode.ToHashCode();
+ }
+ #endregion
+ bool ISynchronizable.Synchronize(object target)
+ {
+ return this.SynchronizeTo((Entities.Common.EdFi.IAcademicHonorCategoryDescriptor)target);
+ }
+
+ void IMappable.Map(object target)
+ {
+ this.MapTo((Entities.Common.EdFi.IAcademicHonorCategoryDescriptor) target, null);
+ }
+
+ }
+}
+// Aggregate: AcademicSubjectDescriptor
+
+namespace EdFi.Ods.Entities.NHibernate.AcademicSubjectDescriptorAggregate.EdFi
+{
+// disable warnings for inheritance from classes marked Obsolete within this generated code only
+#pragma warning disable 612, 618
+
+ ///
+ /// A class which represents the edfi.AcademicSubjectDescriptor table of the AcademicSubjectDescriptor aggregate in the ODS database.
+ ///
+ [Schema("edfi")]
+ [ExcludeFromCodeCoverage]
+ [MessagePackObject]
+ public class AcademicSubjectDescriptor : DescriptorAggregate.EdFi.Descriptor,
+ Entities.Common.EdFi.IAcademicSubjectDescriptor, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IEdFiDescriptor
+ {
+
+ // =============================================================
+ // Primary Key
+ // -------------------------------------------------------------
+ [DomainSignature]
+ [IgnoreMember]
+ public virtual int AcademicSubjectDescriptorId
+ {
+ get { return base.DescriptorId; }
+ set { base.DescriptorId = value; }
+ }
+
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // Inherited Properties
+ // -------------------------------------------------------------
+ string IDescriptor.CodeValue
+ {
+ get { return CodeValue; }
+ set { CodeValue = value; }
+ }
+ string IDescriptor.Description
+ {
+ get { return Description; }
+ set { Description = value; }
+ }
+ DateTime? IDescriptor.EffectiveBeginDate
+ {
+ get { return EffectiveBeginDate; }
+ set { EffectiveBeginDate = value; }
+ }
+ DateTime? IDescriptor.EffectiveEndDate
+ {
+ get { return EffectiveEndDate; }
+ set { EffectiveEndDate = value; }
+ }
+ string IDescriptor.Namespace
+ {
+ get { return Namespace; }
+ set { Namespace = value; }
+ }
+ string IDescriptor.ShortDescription
+ {
+ get { return ShortDescription; }
+ set { ShortDescription = value; }
+ }
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // Properties
+ // -------------------------------------------------------------
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // One-to-one relationships
+ // -------------------------------------------------------------
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // Extensions
+ // -------------------------------------------------------------
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // Reference Data
+ // -------------------------------------------------------------
+ // -------------------------------------------------------------
+
+ //=============================================================
+ // Collections
+ // -------------------------------------------------------------
+ // -------------------------------------------------------------
+
+ // Provide lookup property map
+ private static readonly Dictionary _idPropertyByLookupProperty = new Dictionary(StringComparer.InvariantCultureIgnoreCase)
+ {
+ };
+
+ Dictionary IHasLookupColumnPropertyMap.IdPropertyByLookupProperty
+ {
+ get { return _idPropertyByLookupProperty; }
+ }
+
+ // Provide primary key information
+ OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
+ {
+ // Initialize a new dictionary to hold the key values
+ var keyValues = new OrderedDictionary();
+
+ // Add current key values
+ keyValues.Add("AcademicSubjectDescriptorId", AcademicSubjectDescriptorId);
+
+ return keyValues;
+ }
+
+ #region Overrides for Equals() and GetHashCode()
+ public override bool Equals(object obj)
+ {
+ var compareTo = obj as IHasPrimaryKeyValues;
+
+ if (ReferenceEquals(this, compareTo))
+ return true;
+
+ if (compareTo == null)
+ return false;
+
+ var theseKeys = (this as IHasPrimaryKeyValues).GetPrimaryKeyValues();
+ var thoseKeys = compareTo.GetPrimaryKeyValues();
+
+ foreach (DictionaryEntry entry in theseKeys)
+ {
+ if (entry.Value is string)
+ {
+ if (!GeneratedArtifactStaticDependencies.DatabaseEngineSpecificStringComparer.Equals((string) entry.Value, (string) thoseKeys[entry.Key]))
+ {
+ return false;
+ }
+ }
+ else
+ {
+ if (!entry.Value.Equals(thoseKeys[entry.Key]))
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ public override int GetHashCode()
+ {
+ var keyValues = (this as IHasPrimaryKeyValues).GetPrimaryKeyValues();
+
+ if (keyValues.Count == 0)
+ return base.GetHashCode();
+
+ var hashCode = new HashCode();
+
+ foreach (DictionaryEntry entry in keyValues)
+ {
+ if (entry.Value is string)
+ {
+ hashCode.Add(entry.Value as string, GeneratedArtifactStaticDependencies.DatabaseEngineSpecificStringComparer);
+ }
+ else
+ {
+ hashCode.Add(entry.Value);
+ }
+ }
+
+ return hashCode.ToHashCode();
+ }
+ #endregion
+ bool ISynchronizable.Synchronize(object target)
+ {
+ return this.SynchronizeTo((Entities.Common.EdFi.IAcademicSubjectDescriptor)target);
+ }
+
+ void IMappable.Map(object target)
+ {
+ this.MapTo((Entities.Common.EdFi.IAcademicSubjectDescriptor) target, null);
+ }
+
+ }
+}
+// Aggregate: AcademicWeek
+
+namespace EdFi.Ods.Entities.NHibernate.AcademicWeekAggregate.EdFi
+{
+ ///
+ /// Represents a read-only reference to the entity.
+ ///
+ [MessagePackObject]
+ public class AcademicWeekReferenceData : IHasPrimaryKeyValues
+ {
+ // =============================================================
+ // Primary Key
+ // -------------------------------------------------------------
+ [Key(0)]
+ public virtual long SchoolId { get; set; }
+ [Key(1)]
+ public virtual string WeekIdentifier { get; set; }
// -------------------------------------------------------------
///
/// The id of the referenced entity (used as the resource identifier in the API).
///
+ [Key(2)]
public virtual Guid? Id { get; set; }
///
/// Gets and sets the discriminator value which identifies the concrete sub-type of the referenced entity
/// when that entity has been derived; otherwise null.
///
+ [Key(3)]
public virtual string Discriminator { get; set; }
// Provide primary key information
@@ -2636,8 +4857,8 @@ OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
var keyValues = new OrderedDictionary();
// Add current key values
- keyValues.Add("AssessmentIdentifier", AssessmentIdentifier);
- keyValues.Add("Namespace", Namespace);
+ keyValues.Add("SchoolId", SchoolId);
+ keyValues.Add("WeekIdentifier", WeekIdentifier);
return keyValues;
}
@@ -2688,30 +4909,20 @@ public override int GetHashCode()
#pragma warning disable 612, 618
///
- /// A class which represents the edfi.Assessment table of the Assessment aggregate in the ODS database.
+ /// A class which represents the edfi.AcademicWeek table of the AcademicWeek aggregate in the ODS database.
///
[Schema("edfi")]
[ExcludeFromCodeCoverage]
- public class Assessment : AggregateRootWithCompositeKey,
- Entities.Common.EdFi.IAssessment, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IHasExtensions
+ [MessagePackObject]
+ public class AcademicWeek : AggregateRootWithCompositeKey,
+ Entities.Common.EdFi.IAcademicWeek, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IHasExtensions
{
public virtual void SuspendReferenceAssignmentCheck() { }
- public Assessment()
+ public AcademicWeek()
{
- AssessmentContentStandardPersistentList = new HashSet();
- AssessmentAcademicSubjects = new HashSet();
- AssessmentAssessedGradeLevels = new HashSet();
- AssessmentIdentificationCodes = new HashSet();
- AssessmentLanguages = new HashSet();
- AssessmentPerformanceLevels = new HashSet();
- AssessmentPeriods = new HashSet();
- AssessmentPlatformTypes = new HashSet();
- AssessmentPrograms = new HashSet();
- AssessmentScores = new HashSet();
- AssessmentSections = new HashSet();
- Extensions = EntityExtensionsFactory.Instance == null ? new Dictionary() : new Dictionary(EntityExtensionsFactory.Instance.CreateRequiredEntityExtensions(this));
- AggregateExtensions = EntityExtensionsFactory.Instance == null ? new Dictionary() : new Dictionary(EntityExtensionsFactory.Instance.CreateAggregateExtensions());
+ Extensions = GeneratedArtifactStaticDependencies.EntityExtensionsFactory == null ? new Dictionary() : new Dictionary(GeneratedArtifactStaticDependencies.EntityExtensionsFactory.CreateRequiredEntityExtensions(this));
+ AggregateExtensions = GeneratedArtifactStaticDependencies.EntityExtensionsFactory == null ? new Dictionary() : new Dictionary(GeneratedArtifactStaticDependencies.EntityExtensionsFactory.CreateAggregateExtensions());
}
// restore warnings for inheritance from classes marked Obsolete
#pragma warning restore 612, 618
@@ -2720,9 +4931,11 @@ public Assessment()
// Primary Key
// -------------------------------------------------------------
[DomainSignature]
- public virtual string AssessmentIdentifier { get; set; }
+ [Key(6)]
+ public virtual long SchoolId { get; set; }
[DomainSignature]
- public virtual string Namespace { get; set; }
+ [Key(7)]
+ public virtual string WeekIdentifier { get; set; }
// -------------------------------------------------------------
// =============================================================
@@ -2733,130 +4946,582 @@ public Assessment()
// =============================================================
// Properties
// -------------------------------------------------------------
- public virtual bool? AdaptiveAssessment { get; set; }
- public virtual int? AssessmentCategoryDescriptorId
+ [Key(8)]
+ public virtual DateTime BeginDate
{
- get
+ get { return _beginDate; }
+ //This is only stored as a Date in the DB and NHibernate will retrieve it using the default (local) DateTime.Kind. We must ensure it is set consistently for any equality/change evaluation.
+ set { _beginDate = new DateTime(value.Year, value.Month, value.Day); }
+ }
+
+ private DateTime _beginDate;
+
+ [Key(9)]
+ public virtual DateTime EndDate
+ {
+ get { return _endDate; }
+ //This is only stored as a Date in the DB and NHibernate will retrieve it using the default (local) DateTime.Kind. We must ensure it is set consistently for any equality/change evaluation.
+ set { _endDate = new DateTime(value.Year, value.Month, value.Day); }
+ }
+
+ private DateTime _endDate;
+
+ [Key(10)]
+ public virtual int TotalInstructionalDays { get; set; }
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // One-to-one relationships
+ // -------------------------------------------------------------
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // Extensions
+ // -------------------------------------------------------------
+ private IDictionary _extensions;
+
+ [MessagePackFormatter(typeof(EntityExtensionsMessagePackFormatter), "AcademicWeek", "AcademicWeek")]
+ [Key(11)]
+ public IDictionary Extensions
+ {
+ get
{
- if (_assessmentCategoryDescriptorId == default(int?))
- _assessmentCategoryDescriptorId = string.IsNullOrWhiteSpace(_assessmentCategoryDescriptor) ? default(int?) : GeneratedArtifactStaticDependencies.DescriptorResolver.GetDescriptorId("AssessmentCategoryDescriptor", _assessmentCategoryDescriptor);
+ foreach (var key in _extensions.Keys)
+ {
+ if (_extensions[key] is IDeserializedPersistentGenericCollection collection)
+ {
+ collection.ReattachExtension(this, (string) key);
+ }
+ }
- return _assessmentCategoryDescriptorId;
- }
+ return _extensions;
+ }
set
{
- _assessmentCategoryDescriptorId = value;
- _assessmentCategoryDescriptor = null;
+ // If the _extensions is null, this is being assigned from the constructor
+ // for the first time and no special handling is required
+ if (_extensions != null && value != null)
+ {
+ // For extensions that have already been initialized by the extensions factory,
+ // we need to copy any "implicit" extension object entries over to the incoming
+ // value dictionary being assigned by NHibernate because it won't have them,
+ // but they must be there for correct handling of extensions for the API.
+ foreach (var key in _extensions.Keys)
+ {
+ if (!value.Contains(key))
+ {
+ value[key] = _extensions[key];
+ }
+ }
+ }
+
+ _extensions = value;
}
}
- private int? _assessmentCategoryDescriptorId;
- private string _assessmentCategoryDescriptor;
+ private IDictionary _aggregateExtensions;
- public virtual string AssessmentCategoryDescriptor
- {
+ [MessagePackFormatter(typeof(AggregateExtensionsMessagePackFormatter), "AcademicWeek", "AcademicWeek")]
+ [Key(12)]
+ public IDictionary AggregateExtensions
+ {
get
{
- if (_assessmentCategoryDescriptor == null)
- _assessmentCategoryDescriptor = _assessmentCategoryDescriptorId == null ? null : GeneratedArtifactStaticDependencies.DescriptorResolver.GetUri("AssessmentCategoryDescriptor", _assessmentCategoryDescriptorId.Value);
-
- return _assessmentCategoryDescriptor;
+ foreach (var key in _aggregateExtensions.Keys)
+ {
+ if (_aggregateExtensions[key] is IDeserializedPersistentGenericCollection collection)
+ {
+ collection.ReattachAggregateExtension(this, (string) key);
+ }
+ }
+
+ return _aggregateExtensions;
}
set
{
- _assessmentCategoryDescriptor = value;
- _assessmentCategoryDescriptorId = default(int?);
+ // If the _aggregateExtensions is null, this is being assigned from the constructor
+ // for the first time and no special handling is required
+ if (_aggregateExtensions != null && value != null)
+ {
+ // For aggregate extensions that have already been initialized by the extensions factory,
+ // we need to copy any "implicit" aggregate extension object entries over to the incoming
+ // value dictionary being assigned by NHibernate (or deserialization) because it won't have them,
+ // but they must be there for correct handling of extensions for the API.
+ foreach (var key in _aggregateExtensions.Keys)
+ {
+ if (!value.Contains(key))
+ {
+ value[key] = _aggregateExtensions[key];
+ }
+ }
+ }
+
+ _aggregateExtensions = value;
}
}
- public virtual string AssessmentFamily { get; set; }
- public virtual string AssessmentForm { get; set; }
- public virtual string AssessmentTitle { get; set; }
- public virtual int? AssessmentVersion { get; set; }
- public virtual long? EducationOrganizationId { get; set; }
- public virtual decimal? MaxRawScore { get; set; }
- public virtual string Nomenclature { get; set; }
- public virtual DateTime? RevisionDate
+
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // Reference Data
+ // -------------------------------------------------------------
+ [Key(13)]
+ public virtual NHibernate.EducationOrganizationAggregate.EdFi.EducationOrganizationReferenceData SchoolReferenceData { get; set; }
+
+ ///
+ /// Read-only property that allows the School resource identifier value to be mapped to the resource reference.
+ ///
+ Guid? Entities.Common.EdFi.IAcademicWeek.SchoolResourceId
{
- get { return _revisionDate; }
- set
- {
- //This is only stored as a Date in the DB and NHibernate will retrieve it using the default (local) DateTime.Kind. We must ensure it is set consistently for any equality/change evaluation.
- if(value == null)
+ get { return SchoolReferenceData?.Id; }
+ set { }
+ }
+
+ // -------------------------------------------------------------
+
+ //=============================================================
+ // Collections
+ // -------------------------------------------------------------
+ // -------------------------------------------------------------
+
+ // Provide lookup property map
+ private static readonly Dictionary _idPropertyByLookupProperty = new Dictionary(StringComparer.InvariantCultureIgnoreCase)
+ {
+ };
+
+ Dictionary IHasLookupColumnPropertyMap.IdPropertyByLookupProperty
+ {
+ get { return _idPropertyByLookupProperty; }
+ }
+
+ // Provide primary key information
+ OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
+ {
+ // Initialize a new dictionary to hold the key values
+ var keyValues = new OrderedDictionary();
+
+ // Add current key values
+ keyValues.Add("SchoolId", SchoolId);
+ keyValues.Add("WeekIdentifier", WeekIdentifier);
+
+ return keyValues;
+ }
+
+ #region Overrides for Equals() and GetHashCode()
+ public override bool Equals(object obj)
+ {
+ var compareTo = obj as IHasPrimaryKeyValues;
+
+ if (ReferenceEquals(this, compareTo))
+ return true;
+
+ if (compareTo == null)
+ return false;
+
+ var theseKeys = (this as IHasPrimaryKeyValues).GetPrimaryKeyValues();
+ var thoseKeys = compareTo.GetPrimaryKeyValues();
+
+ foreach (DictionaryEntry entry in theseKeys)
+ {
+ if (entry.Value is string)
{
- _revisionDate = null;
- } else
+ if (!GeneratedArtifactStaticDependencies.DatabaseEngineSpecificStringComparer.Equals((string) entry.Value, (string) thoseKeys[entry.Key]))
+ {
+ return false;
+ }
+ }
+ else
{
- var given = (DateTime) value;
- _revisionDate = new DateTime(given.Year, given.Month, given.Day);
+ if (!entry.Value.Equals(thoseKeys[entry.Key]))
+ return false;
}
}
+
+ return true;
}
- private DateTime? _revisionDate;
+ public override int GetHashCode()
+ {
+ var keyValues = (this as IHasPrimaryKeyValues).GetPrimaryKeyValues();
+
+ if (keyValues.Count == 0)
+ return base.GetHashCode();
+
+ var hashCode = new HashCode();
+
+ foreach (DictionaryEntry entry in keyValues)
+ {
+ if (entry.Value is string)
+ {
+ hashCode.Add(entry.Value as string, GeneratedArtifactStaticDependencies.DatabaseEngineSpecificStringComparer);
+ }
+ else
+ {
+ hashCode.Add(entry.Value);
+ }
+ }
+
+ return hashCode.ToHashCode();
+ }
+ #endregion
+ bool ISynchronizable.Synchronize(object target)
+ {
+ return this.SynchronizeTo((Entities.Common.EdFi.IAcademicWeek)target);
+ }
+
+ void IMappable.Map(object target)
+ {
+ this.MapTo((Entities.Common.EdFi.IAcademicWeek) target, null);
+ }
+
+ }
+}
+// Aggregate: AccommodationDescriptor
+
+namespace EdFi.Ods.Entities.NHibernate.AccommodationDescriptorAggregate.EdFi
+{
+// disable warnings for inheritance from classes marked Obsolete within this generated code only
+#pragma warning disable 612, 618
+
+ ///
+ /// A class which represents the edfi.AccommodationDescriptor table of the AccommodationDescriptor aggregate in the ODS database.
+ ///
+ [Schema("edfi")]
+ [ExcludeFromCodeCoverage]
+ [MessagePackObject]
+ public class AccommodationDescriptor : DescriptorAggregate.EdFi.Descriptor,
+ Entities.Common.EdFi.IAccommodationDescriptor, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IEdFiDescriptor
+ {
+
+ // =============================================================
+ // Primary Key
+ // -------------------------------------------------------------
+ [DomainSignature]
+ [IgnoreMember]
+ public virtual int AccommodationDescriptorId
+ {
+ get { return base.DescriptorId; }
+ set { base.DescriptorId = value; }
+ }
// -------------------------------------------------------------
// =============================================================
- // One-to-one relationships
+ // Inherited Properties
// -------------------------------------------------------------
- public virtual Entities.NHibernate.AssessmentAggregate.EdFi.AssessmentContentStandard AssessmentContentStandard
+ string IDescriptor.CodeValue
{
- get
- {
- // Return the item in the list, if one exists
- if (AssessmentContentStandardPersistentList.Any())
- return AssessmentContentStandardPersistentList.First();
+ get { return CodeValue; }
+ set { CodeValue = value; }
+ }
+ string IDescriptor.Description
+ {
+ get { return Description; }
+ set { Description = value; }
+ }
+ DateTime? IDescriptor.EffectiveBeginDate
+ {
+ get { return EffectiveBeginDate; }
+ set { EffectiveBeginDate = value; }
+ }
+ DateTime? IDescriptor.EffectiveEndDate
+ {
+ get { return EffectiveEndDate; }
+ set { EffectiveEndDate = value; }
+ }
+ string IDescriptor.Namespace
+ {
+ get { return Namespace; }
+ set { Namespace = value; }
+ }
+ string IDescriptor.ShortDescription
+ {
+ get { return ShortDescription; }
+ set { ShortDescription = value; }
+ }
+ // -------------------------------------------------------------
- // No reference is present
- return null;
- }
- set
+ // =============================================================
+ // Properties
+ // -------------------------------------------------------------
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // One-to-one relationships
+ // -------------------------------------------------------------
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // Extensions
+ // -------------------------------------------------------------
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // Reference Data
+ // -------------------------------------------------------------
+ // -------------------------------------------------------------
+
+ //=============================================================
+ // Collections
+ // -------------------------------------------------------------
+ // -------------------------------------------------------------
+
+ // Provide lookup property map
+ private static readonly Dictionary _idPropertyByLookupProperty = new Dictionary(StringComparer.InvariantCultureIgnoreCase)
{
- // Delete the existing object
- if (AssessmentContentStandardPersistentList.Any())
- AssessmentContentStandardPersistentList.Clear();
+ };
- // If we're setting a value, add it to the list now
- if (value != null)
+ Dictionary IHasLookupColumnPropertyMap.IdPropertyByLookupProperty
+ {
+ get { return _idPropertyByLookupProperty; }
+ }
+
+ // Provide primary key information
+ OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
+ {
+ // Initialize a new dictionary to hold the key values
+ var keyValues = new OrderedDictionary();
+
+ // Add current key values
+ keyValues.Add("AccommodationDescriptorId", AccommodationDescriptorId);
+
+ return keyValues;
+ }
+
+ #region Overrides for Equals() and GetHashCode()
+ public override bool Equals(object obj)
+ {
+ var compareTo = obj as IHasPrimaryKeyValues;
+
+ if (ReferenceEquals(this, compareTo))
+ return true;
+
+ if (compareTo == null)
+ return false;
+
+ var theseKeys = (this as IHasPrimaryKeyValues).GetPrimaryKeyValues();
+ var thoseKeys = compareTo.GetPrimaryKeyValues();
+
+ foreach (DictionaryEntry entry in theseKeys)
+ {
+ if (entry.Value is string)
{
- // Set the back-reference to the parent
- value.Assessment = this;
+ if (!GeneratedArtifactStaticDependencies.DatabaseEngineSpecificStringComparer.Equals((string) entry.Value, (string) thoseKeys[entry.Key]))
+ {
+ return false;
+ }
+ }
+ else
+ {
+ if (!entry.Value.Equals(thoseKeys[entry.Key]))
+ return false;
+ }
+ }
- AssessmentContentStandardPersistentList.Add(value);
+ return true;
+ }
+
+ public override int GetHashCode()
+ {
+ var keyValues = (this as IHasPrimaryKeyValues).GetPrimaryKeyValues();
+
+ if (keyValues.Count == 0)
+ return base.GetHashCode();
+
+ var hashCode = new HashCode();
+
+ foreach (DictionaryEntry entry in keyValues)
+ {
+ if (entry.Value is string)
+ {
+ hashCode.Add(entry.Value as string, GeneratedArtifactStaticDependencies.DatabaseEngineSpecificStringComparer);
+ }
+ else
+ {
+ hashCode.Add(entry.Value);
}
}
+
+ return hashCode.ToHashCode();
+ }
+ #endregion
+ bool ISynchronizable.Synchronize(object target)
+ {
+ return this.SynchronizeTo((Entities.Common.EdFi.IAccommodationDescriptor)target);
}
- Entities.Common.EdFi.IAssessmentContentStandard Entities.Common.EdFi.IAssessment.AssessmentContentStandard
+ void IMappable.Map(object target)
{
- get { return AssessmentContentStandard; }
- set { AssessmentContentStandard = (Entities.NHibernate.AssessmentAggregate.EdFi.AssessmentContentStandard) value; }
+ this.MapTo((Entities.Common.EdFi.IAccommodationDescriptor) target, null);
}
- private ICollection _assessmentContentStandardPersistentList;
+ }
+}
+// Aggregate: AccountabilityRating
- public virtual ICollection AssessmentContentStandardPersistentList
+namespace EdFi.Ods.Entities.NHibernate.AccountabilityRatingAggregate.EdFi
+{
+ ///
+ /// Represents a read-only reference to the entity.
+ ///
+ [MessagePackObject]
+ public class AccountabilityRatingReferenceData : IHasPrimaryKeyValues
+ {
+ // =============================================================
+ // Primary Key
+ // -------------------------------------------------------------
+ [Key(0)]
+ public virtual long EducationOrganizationId { get; set; }
+ [Key(1)]
+ public virtual string RatingTitle { get; set; }
+ [Key(2)]
+ public virtual short SchoolYear { get; set; }
+ // -------------------------------------------------------------
+
+ ///
+ /// The id of the referenced entity (used as the resource identifier in the API).
+ ///
+ [Key(3)]
+ public virtual Guid? Id { get; set; }
+
+ ///
+ /// Gets and sets the discriminator value which identifies the concrete sub-type of the referenced entity
+ /// when that entity has been derived; otherwise null.
+ ///
+ [Key(4)]
+ public virtual string Discriminator { get; set; }
+
+ // Provide primary key information
+ OrderedDictionary IHasPrimaryKeyValues.GetPrimaryKeyValues()
{
- get
- {
- // -------------------------------------------------------------
- // On-demand deserialization logic to attach reverse reference of children
- // due to ServiceStack's lack of [OnDeserialized] attribute support.
- // Back-reference is required by NHibernate for persistence.
- // -------------------------------------------------------------
- foreach (var item in _assessmentContentStandardPersistentList)
- if (item.Assessment == null)
- item.Assessment = this;
- // -------------------------------------------------------------
+ // Initialize a new dictionary to hold the key values
+ var keyValues = new OrderedDictionary();
- return _assessmentContentStandardPersistentList;
+ // Add current key values
+ keyValues.Add("EducationOrganizationId", EducationOrganizationId);
+ keyValues.Add("RatingTitle", RatingTitle);
+ keyValues.Add("SchoolYear", SchoolYear);
+
+ return keyValues;
+ }
+
+ #region Overrides for Equals() and GetHashCode()
+ public override bool Equals(object obj)
+ {
+ var compareTo = obj as IHasPrimaryKeyValues;
+
+ if (ReferenceEquals(this, compareTo))
+ return true;
+
+ if (compareTo == null)
+ return false;
+
+ var theseKeys = (this as IHasPrimaryKeyValues).GetPrimaryKeyValues();
+ var thoseKeys = compareTo.GetPrimaryKeyValues();
+
+ foreach (DictionaryEntry entry in theseKeys)
+ {
+ if (!entry.Value.Equals(thoseKeys[entry.Key]))
+ return false;
}
- set
+
+ return true;
+ }
+
+ public override int GetHashCode()
+ {
+ var keyValues = (this as IHasPrimaryKeyValues).GetPrimaryKeyValues();
+
+ if (keyValues.Count == 0)
+ return base.GetHashCode();
+
+ var hashCode = new HashCode();
+
+ foreach (DictionaryEntry entry in keyValues)
{
- _assessmentContentStandardPersistentList = value;
+ hashCode.Add(entry.Value);
}
+
+ return hashCode.ToHashCode();
+ }
+ #endregion
+ }
+
+// disable warnings for inheritance from classes marked Obsolete within this generated code only
+#pragma warning disable 612, 618
+
+ ///
+ /// A class which represents the edfi.AccountabilityRating table of the AccountabilityRating aggregate in the ODS database.
+ ///
+ [Schema("edfi")]
+ [ExcludeFromCodeCoverage]
+ [MessagePackObject]
+ public class AccountabilityRating : AggregateRootWithCompositeKey,
+ Entities.Common.EdFi.IAccountabilityRating, IHasPrimaryKeyValues, IHasLookupColumnPropertyMap, IHasExtensions
+ {
+ public virtual void SuspendReferenceAssignmentCheck() { }
+
+ public AccountabilityRating()
+ {
+ Extensions = GeneratedArtifactStaticDependencies.EntityExtensionsFactory == null ? new Dictionary() : new Dictionary(GeneratedArtifactStaticDependencies.EntityExtensionsFactory.CreateRequiredEntityExtensions(this));
+ AggregateExtensions = GeneratedArtifactStaticDependencies.EntityExtensionsFactory == null ? new Dictionary() : new Dictionary(GeneratedArtifactStaticDependencies.EntityExtensionsFactory.CreateAggregateExtensions());
}
+// restore warnings for inheritance from classes marked Obsolete
+#pragma warning restore 612, 618
+ // =============================================================
+ // Primary Key
+ // -------------------------------------------------------------
+ [DomainSignature]
+ [Key(6)]
+ public virtual long EducationOrganizationId { get; set; }
+ [DomainSignature]
+ [Key(7)]
+ public virtual string RatingTitle { get; set; }
+ [DomainSignature]
+ [Key(8)]
+ public virtual short SchoolYear { get; set; }
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // Inherited Properties
+ // -------------------------------------------------------------
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // Properties
+ // -------------------------------------------------------------
+ [Key(9)]
+ public virtual string Rating { get; set; }
+ [Key(10)]
+ public virtual DateTime? RatingDate
+ {
+ get { return _ratingDate; }
+ set
+ {
+ //This is only stored as a Date in the DB and NHibernate will retrieve it using the default (local) DateTime.Kind. We must ensure it is set consistently for any equality/change evaluation.
+ if(value == null)
+ {
+ _ratingDate = null;
+ } else
+ {
+ var given = (DateTime) value;
+ _ratingDate = new DateTime(given.Year, given.Month, given.Day);
+ }
+ }
+ }
+
+ private DateTime? _ratingDate;
+
+ [Key(11)]
+ public virtual string RatingOrganization { get; set; }
+ [Key(12)]
+ public virtual string RatingProgram { get; set; }
+ // -------------------------------------------------------------
+
+ // =============================================================
+ // One-to-one relationships
+ // -------------------------------------------------------------
// -------------------------------------------------------------
// =============================================================
@@ -2864,14 +5529,27 @@ public virtual ICollection _extensions;
+ get
+ {
+ foreach (var key in _extensions.Keys)
+ {
+ if (_extensions[key] is IDeserializedPersistentGenericCollection collection)
+ {
+ collection.ReattachExtension(this, (string) key);
+ }
+ }
+
+ return _extensions;
+ }
set
{
// If the _extensions is null, this is being assigned from the constructor
// for the first time and no special handling is required
- if (_extensions != null)
+ if (_extensions != null && value != null)
{
// For extensions that have already been initialized by the extensions factory,
// we need to copy any "implicit" extension object entries over to the incoming
@@ -2890,18 +5568,59 @@ public IDictionary Extensions
}
}
- public IDictionary AggregateExtensions { get; set; }
+ private IDictionary _aggregateExtensions;
+
+ [MessagePackFormatter(typeof(AggregateExtensionsMessagePackFormatter), "AccountabilityRating", "AccountabilityRating")]
+ [Key(14)]
+ public IDictionary AggregateExtensions
+ {
+ get
+ {
+ foreach (var key in _aggregateExtensions.Keys)
+ {
+ if (_aggregateExtensions[key] is IDeserializedPersistentGenericCollection collection)
+ {
+ collection.ReattachAggregateExtension(this, (string) key);
+ }
+ }
+
+ return _aggregateExtensions;
+ }
+ set
+ {
+ // If the _aggregateExtensions is null, this is being assigned from the constructor
+ // for the first time and no special handling is required
+ if (_aggregateExtensions != null && value != null)
+ {
+ // For aggregate extensions that have already been initialized by the extensions factory,
+ // we need to copy any "implicit" aggregate extension object entries over to the incoming
+ // value dictionary being assigned by NHibernate (or deserialization) because it won't have them,
+ // but they must be there for correct handling of extensions for the API.
+ foreach (var key in _aggregateExtensions.Keys)
+ {
+ if (!value.Contains(key))
+ {
+ value[key] = _aggregateExtensions[key];
+ }
+ }
+ }
+
+ _aggregateExtensions = value;
+ }
+ }
+
// -------------------------------------------------------------
// =============================================================
// Reference Data
// -------------------------------------------------------------
+ [Key(15)]
public virtual NHibernate.EducationOrganizationAggregate.EdFi.EducationOrganizationReferenceData EducationOrganizationReferenceData { get; set; }
///
/// Read-only property that allows the EducationOrganization discriminator value to be mapped to the resource reference.
///
- string Entities.Common.EdFi.IAssessment.EducationOrganizationDiscriminator
+ string Entities.Common.EdFi.IAccountabilityRating.EducationOrganizationDiscriminator
{
get { return EducationOrganizationReferenceData?.Discriminator; }
set { }
@@ -2910,493 +5629,941 @@ string Entities.Common.EdFi.IAssessment.EducationOrganizationDiscriminator
///
/// Read-only property that allows the EducationOrganization resource identifier value to be mapped to the resource reference.
///
- Guid? Entities.Common.EdFi.IAssessment.EducationOrganizationResourceId
+ Guid? Entities.Common.EdFi.IAccountabilityRating.EducationOrganizationResourceId
{
get { return EducationOrganizationReferenceData?.Id; }
set { }
}
+ [Key(16)]
+ public virtual NHibernate.SchoolYearTypeAggregate.EdFi.SchoolYearTypeReferenceData SchoolYearTypeReferenceData { get; set; }
+
+ ///
+ /// Read-only property that allows the SchoolYearType resource identifier value to be mapped to the resource reference.
+ ///
+ Guid? Entities.Common.EdFi.IAccountabilityRating.SchoolYearTypeResourceId
+ {
+ get { return SchoolYearTypeReferenceData?.Id; }
+ set { }
+ }
+
// -------------------------------------------------------------
//=============================================================
// Collections
// -------------------------------------------------------------
+ // -------------------------------------------------------------
- private ICollection _assessmentAcademicSubjects;
- private ICollection _assessmentAcademicSubjectsCovariant;
- public virtual ICollection AssessmentAcademicSubjects
- {
- get
+ // Provide lookup property map
+ private static readonly Dictionary _idPropertyByLookupProperty = new Dictionary(StringComparer.InvariantCultureIgnoreCase)
{
- // -------------------------------------------------------------
- // On-demand deserialization logic to attach reverse reference of children
- // due to ServiceStack's lack of [OnDeserialized] attribute support.
- // Back-reference is required by NHibernate for persistence.
- // -------------------------------------------------------------
- foreach (var item in _assessmentAcademicSubjects)
- if (item.Assessment == null)
- item.Assessment = this;
- // -------------------------------------------------------------
+ };
- return _assessmentAcademicSubjects;
- }
- set
- {
- _assessmentAcademicSubjects = value;
- _assessmentAcademicSubjectsCovariant = new CovariantCollectionAdapter