Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Application.Ringtoets.Storage.csproj
===================================================================
diff -u -rdb6506035368f043c476a528c324f1a093759fca -r0978d02df195899fb836b7eb6f4d01f2b56f5cab
--- Application/Ringtoets/src/Application.Ringtoets.Storage/Application.Ringtoets.Storage.csproj (.../Application.Ringtoets.Storage.csproj) (revision db6506035368f043c476a528c324f1a093759fca)
+++ Application/Ringtoets/src/Application.Ringtoets.Storage/Application.Ringtoets.Storage.csproj (.../Application.Ringtoets.Storage.csproj) (revision 0978d02df195899fb836b7eb6f4d01f2b56f5cab)
@@ -100,6 +100,7 @@
RingtoetsEntities.tt
+
RingtoetsEntities.tt
Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/PersistenceRegistry.cs
===================================================================
diff -u -r0c84eb5ded5af71c3982410db8d00ad4fcc572bd -r0978d02df195899fb836b7eb6f4d01f2b56f5cab
--- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/PersistenceRegistry.cs (.../PersistenceRegistry.cs) (revision 0c84eb5ded5af71c3982410db8d00ad4fcc572bd)
+++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/PersistenceRegistry.cs (.../PersistenceRegistry.cs) (revision 0978d02df195899fb836b7eb6f4d01f2b56f5cab)
@@ -58,6 +58,7 @@
private readonly Dictionary closingStructures = CreateDictionary();
private readonly Dictionary stabilityPointStructures = CreateDictionary();
private readonly Dictionary> heightStructuresCalculations = CreateDictionary>();
+ private readonly Dictionary> closingStructuresCalculations = CreateDictionary>();
private static Dictionary CreateDictionary()
{
@@ -324,6 +325,20 @@
Register(heightStructuresCalculations, entity, model);
}
+ ///
+ /// Registers a create operation for and the
+ /// that was constructed with the information.
+ ///
+ /// The
+ /// to be registered.
+ /// The to
+ /// be registered.
+ /// Thrown when any input parameter is null.
+ internal void Register(ClosingStructuresCalculationEntity entity, StructuresCalculation model)
+ {
+ Register(closingStructuresCalculations, entity, model);
+ }
+
#endregion
#region Contains Methods
@@ -471,6 +486,17 @@
return ContainsValue(heightStructuresCalculations, model);
}
+ ///
+ /// Checks whether a create operations has been registered for the given .
+ ///
+ /// The to check for.
+ /// true if the was registered before, false otherwise.
+ /// Thrown when is null.
+ internal bool Contains(StructuresCalculation model)
+ {
+ return ContainsValue(closingStructuresCalculations, model);
+ }
+
#endregion
#region Get Methods
@@ -693,6 +719,23 @@
return Get(heightStructuresCalculations, model);
}
+ ///
+ /// Obtains the which was
+ /// registered for the given .
+ ///
+ /// The for
+ /// which a read operation has been registered.
+ /// The constructed .
+ /// Thrown when is null.
+ /// Thrown when no create operation
+ /// has been registered for .
+ /// Use to find out
+ /// whether a create operation has been registered for .
+ internal ClosingStructuresCalculationEntity Get(StructuresCalculation model)
+ {
+ return Get(closingStructuresCalculations, model);
+ }
+
#endregion
}
}
\ No newline at end of file
Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StructuresCalculationCreateExtensions.cs
===================================================================
diff -u -rbce62ec6102f15b0dbb1328fd9d14063fd21c978 -r0978d02df195899fb836b7eb6f4d01f2b56f5cab
--- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StructuresCalculationCreateExtensions.cs (.../StructuresCalculationCreateExtensions.cs) (revision bce62ec6102f15b0dbb1328fd9d14063fd21c978)
+++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StructuresCalculationCreateExtensions.cs (.../StructuresCalculationCreateExtensions.cs) (revision 0978d02df195899fb836b7eb6f4d01f2b56f5cab)
@@ -95,6 +95,13 @@
};
SetInputValues(entity, calculation.InputParameters, registry);
+ if (calculation.HasOutput)
+ {
+ entity.ClosingStructuresOutputEntities.Add(calculation.Output.Create(registry));
+ }
+
+ registry.Register(entity, calculation);
+
return entity;
}
Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PartialClosingStructuresOutputEntity.cs
===================================================================
diff -u
--- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PartialClosingStructuresOutputEntity.cs (revision 0)
+++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PartialClosingStructuresOutputEntity.cs (revision 0978d02df195899fb836b7eb6f4d01f2b56f5cab)
@@ -0,0 +1,29 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+namespace Application.Ringtoets.Storage.DbContext
+{
+ ///
+ /// Partial implementation of that implements
+ /// .
+ ///
+ public partial class ClosingStructuresOutputEntity : IProbabilityAssessmentOutputEntity {}
+}
\ No newline at end of file