Changeset 4298 for trunk/sources/HeuristicLab.Services.OKB.DataAccess
- Timestamp:
- 08/24/10 02:37:56 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Services.OKB.DataAccess/3.3
- Files:
-
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Services.OKB.DataAccess/3.3/HeuristicLab.Services.OKB.DataAccess-3.3.csproj
r4294 r4298 121 121 </ItemGroup> 122 122 <ItemGroup> 123 <Compile Include="Authentication.cs" />124 <Compile Include="ExperimentKit.cs" />125 123 <None Include="OKB.designer.cs"> 126 124 <AutoGen>True</AutoGen> … … 161 159 </None> 162 160 <None Include="Properties\Settings.settings"> 163 <Generator> SettingsSingleFileGenerator</Generator>161 <Generator>PublicSettingsSingleFileGenerator</Generator> 164 162 <LastGenOutput>Settings.Designer.cs</LastGenOutput> 165 163 </None> -
trunk/sources/HeuristicLab.Services.OKB.DataAccess/3.3/OKB.dbml
r4276 r4298 1 1 <?xml version="1.0" encoding="utf-8"?><Database Name="OKB" EntityNamespace="HeuristicLab.Services.OKB.DataAccess" ContextNamespace="HeuristicLab.Services.OKB.DataAccess" Class="OKBDataContext" Serialization="Unidirectional" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007"> 2 <Connection Mode="AppSettings" ConnectionString="Data Source=localhost;Initial Catalog= OKB;Integrated Security=True" SettingsObjectName="HeuristicLab.Services.OKB.DataAccess.Properties.Settings" SettingsPropertyName="OKBConnectionString" Provider="System.Data.SqlClient" />2 <Connection Mode="AppSettings" ConnectionString="Data Source=localhost;Initial Catalog=HeuristicLab.OKB;Integrated Security=True" SettingsObjectName="HeuristicLab.Services.OKB.DataAccess.Properties.Settings" SettingsPropertyName="OKBConnectionString" Provider="System.Data.SqlClient" /> 3 3 <Table Name="dbo.[User]" Member="Users"> 4 4 <Type Name="User"> 5 5 <Column Name="Id" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" /> 6 6 <Column Name="Name" Type="System.String" DbType="VarChar(200) NOT NULL" CanBeNull="false" /> 7 <Association Name="User_ExperimentCreator" Member="ExperimentCreators" ThisKey="Id" OtherKey="UserId" Type="ExperimentCreator" />8 7 <Association Name="User_Run" Member="Runs" ThisKey="Id" OtherKey="UserId" Type="Run" /> 9 8 </Type> … … 93 92 <Column Name="ProblemId" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" /> 94 93 <Association Name="Experiment_CharParameterValue" Member="CharParameterValues" ThisKey="Id" OtherKey="ExperimentId" Type="CharParameterValue" /> 95 <Association Name="Experiment_ExperimentCreator" Member="ExperimentCreators" ThisKey="Id" OtherKey="ExperimentId" Type="ExperimentCreator" />96 94 <Association Name="Experiment_FloatParameterValue" Member="FloatParameterValues" ThisKey="Id" OtherKey="ExperimentId" Type="FloatParameterValue" /> 97 95 <Association Name="Experiment_IntParameterValue" Member="IntParameterValues" ThisKey="Id" OtherKey="ExperimentId" Type="IntParameterValue" /> … … 101 99 <Association Name="Project_Experiment" Member="Project" ThisKey="ProjectId" OtherKey="Id" Type="Project" IsForeignKey="true" DeleteRule="CASCADE" DeleteOnNull="true" /> 102 100 <Association Name="Algorithm_Experiment" Member="Algorithm" ThisKey="AlgorithmId" OtherKey="Id" Type="Algorithm" IsForeignKey="true" DeleteRule="CASCADE" DeleteOnNull="true" /> 103 </Type>104 </Table>105 <Table Name="dbo.ExperimentCreator" Member="ExperimentCreators">106 <Type Name="ExperimentCreator">107 <Column Name="ExperimentId" Type="System.Int32" DbType="Int NOT NULL" IsPrimaryKey="true" CanBeNull="false" />108 <Column Name="UserId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" />109 <Association Name="Experiment_ExperimentCreator" Member="Experiment" ThisKey="ExperimentId" OtherKey="Id" Type="Experiment" IsForeignKey="true" DeleteRule="CASCADE" DeleteOnNull="true" />110 <Association Name="User_ExperimentCreator" Member="User" ThisKey="UserId" OtherKey="Id" Type="User" IsForeignKey="true" />111 101 </Type> 112 102 </Table> -
trunk/sources/HeuristicLab.Services.OKB.DataAccess/3.3/OKB.dbml.layout
r4276 r4298 69 69 </nestedChildShapes> 70 70 </classShape> 71 <classShape Id="12d4c13b-7509-49ae-998b-a0b43f160db7" absoluteBounds="8.125, 7.5, 2, 1.1939925130208309">72 <DataClassMoniker Name="/OKBDataContext/ExperimentCreator" />73 <nestedChildShapes>74 <elementListCompartment Id="e4e83d65-2fb2-4364-8f61-64ce8440b3c4" absoluteBounds="8.14, 7.9600000000000009, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />75 </nestedChildShapes>76 </classShape>77 71 <classShape Id="51fb443c-2ed1-4364-9dc3-84a606c921f5" isExpanded="false" absoluteBounds="8.125, 4.25, 2, 0.45"> 78 72 <DataClassMoniker Name="/OKBDataContext/FloatParameterValue" /> … … 172 166 </nodes> 173 167 </associationConnector> 174 <associationConnector edgePoints="[(7.07291666666667 : 5.82859537760417); (7.07291666666667 : 6.50172191879847); (7.82609398177643 : 6.50172191879847); (7.82609398177643 : 8.1875); (8.125 : 8.1875)]" manuallyRouted="true" fixedFrom="NotFixed" fixedTo="NotFixed">175 <AssociationMoniker Name="/OKBDataContext/Experiment/Experiment_ExperimentCreator" />176 <nodes>177 <classShapeMoniker Id="f91d981c-4c4c-407a-aedd-bc0091bdd664" />178 <classShapeMoniker Id="12d4c13b-7509-49ae-998b-a0b43f160db7" />179 </nodes>180 </associationConnector>181 <associationConnector edgePoints="[(10.625 : 7.30729140533756); (10.385 : 7.30729140533756); (10.385 : 8.26562470439823); (10.125 : 8.26562470439823)]" fixedFrom="NotFixed" fixedTo="NotFixed">182 <AssociationMoniker Name="/OKBDataContext/User/User_ExperimentCreator" />183 <nodes>184 <classShapeMoniker Id="6abee4a0-9a54-4c51-bb1b-31061cb25f9f" />185 <classShapeMoniker Id="12d4c13b-7509-49ae-998b-a0b43f160db7" />186 </nodes>187 </associationConnector>188 168 <associationConnector edgePoints="[(7.5 : 4.475); (8.125 : 4.475)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 189 169 <AssociationMoniker Name="/OKBDataContext/Experiment/Experiment_FloatParameterValue" /> -
trunk/sources/HeuristicLab.Services.OKB.DataAccess/3.3/OKB.generated.cs
r4276 r4298 3 3 // <auto-generated> 4 4 // This code was generated by LINQ to SQL template for T4 C# 5 // Generated at 08/2 3/2010 01:35:165 // Generated at 08/24/2010 01:30:56 6 6 // 7 7 // Changes to this file may cause incorrect behavior and will be lost if … … 57 57 partial void UpdateExperiment(Experiment instance); 58 58 partial void DeleteExperiment(Experiment instance); 59 partial void InsertExperimentCreator(ExperimentCreator instance);60 partial void UpdateExperimentCreator(ExperimentCreator instance);61 partial void DeleteExperimentCreator(ExperimentCreator instance);62 59 partial void InsertFloatParameterValue(FloatParameterValue instance); 63 60 partial void UpdateFloatParameterValue(FloatParameterValue instance); … … 210 207 } 211 208 212 public Table<ExperimentCreator> ExperimentCreators213 {214 get { return GetTable<ExperimentCreator>(); }215 }216 217 209 public Table<FloatParameterValue> FloatParameterValues 218 210 { … … 360 352 private void Initialize() 361 353 { 362 _ExperimentCreators = new EntitySet<ExperimentCreator>(attach_ExperimentCreators, detach_ExperimentCreators);363 354 _Runs = new EntitySet<Run>(attach_Runs, detach_Runs); 364 355 OnCreated(); … … 408 399 409 400 #region Associations 410 private EntitySet<ExperimentCreator> _ExperimentCreators;411 [Association(Name=@"User_ExperimentCreator", Storage=@"_ExperimentCreators", ThisKey=@"Id", OtherKey=@"UserId")]412 [DataMember(Order=3, EmitDefaultValue=false)]413 public EntitySet<ExperimentCreator> ExperimentCreators414 {415 get {416 if (serializing && !_ExperimentCreators.HasLoadedOrAssignedValues) {417 return null;418 }419 return _ExperimentCreators;420 }421 set {422 _ExperimentCreators.Assign(value);423 }424 }425 426 private void attach_ExperimentCreators(ExperimentCreator entity)427 {428 SendPropertyChanging();429 entity.User = this;430 }431 432 private void detach_ExperimentCreators(ExperimentCreator entity)433 {434 SendPropertyChanging();435 entity.User = null;436 }437 401 private EntitySet<Run> _Runs; 438 402 [Association(Name=@"User_Run", Storage=@"_Runs", ThisKey=@"Id", OtherKey=@"UserId")] 439 [DataMember(Order= 4, EmitDefaultValue=false)]403 [DataMember(Order=3, EmitDefaultValue=false)] 440 404 public EntitySet<Run> Runs 441 405 { … … 2126 2090 { 2127 2091 _CharParameterValues = new EntitySet<CharParameterValue>(attach_CharParameterValues, detach_CharParameterValues); 2128 _ExperimentCreators = new EntitySet<ExperimentCreator>(attach_ExperimentCreators, detach_ExperimentCreators);2129 2092 _FloatParameterValues = new EntitySet<FloatParameterValue>(attach_FloatParameterValues, detach_FloatParameterValues); 2130 2093 _IntParameterValues = new EntitySet<IntParameterValue>(attach_IntParameterValues, detach_IntParameterValues); … … 2254 2217 entity.Experiment = null; 2255 2218 } 2256 private EntitySet<ExperimentCreator> _ExperimentCreators;2257 [Association(Name=@"Experiment_ExperimentCreator", Storage=@"_ExperimentCreators", ThisKey=@"Id", OtherKey=@"ExperimentId")]2258 [DataMember(Order=6, EmitDefaultValue=false)]2259 public EntitySet<ExperimentCreator> ExperimentCreators2260 {2261 get {2262 if (serializing && !_ExperimentCreators.HasLoadedOrAssignedValues) {2263 return null;2264 }2265 return _ExperimentCreators;2266 }2267 set {2268 _ExperimentCreators.Assign(value);2269 }2270 }2271 2272 private void attach_ExperimentCreators(ExperimentCreator entity)2273 {2274 SendPropertyChanging();2275 entity.Experiment = this;2276 }2277 2278 private void detach_ExperimentCreators(ExperimentCreator entity)2279 {2280 SendPropertyChanging();2281 entity.Experiment = null;2282 }2283 2219 private EntitySet<FloatParameterValue> _FloatParameterValues; 2284 2220 [Association(Name=@"Experiment_FloatParameterValue", Storage=@"_FloatParameterValues", ThisKey=@"Id", OtherKey=@"ExperimentId")] 2285 [DataMember(Order= 7, EmitDefaultValue=false)]2221 [DataMember(Order=6, EmitDefaultValue=false)] 2286 2222 public EntitySet<FloatParameterValue> FloatParameterValues 2287 2223 { … … 2310 2246 private EntitySet<IntParameterValue> _IntParameterValues; 2311 2247 [Association(Name=@"Experiment_IntParameterValue", Storage=@"_IntParameterValues", ThisKey=@"Id", OtherKey=@"ExperimentId")] 2312 [DataMember(Order= 8, EmitDefaultValue=false)]2248 [DataMember(Order=7, EmitDefaultValue=false)] 2313 2249 public EntitySet<IntParameterValue> IntParameterValues 2314 2250 { … … 2337 2273 private EntitySet<Run> _Runs; 2338 2274 [Association(Name=@"Experiment_Run", Storage=@"_Runs", ThisKey=@"Id", OtherKey=@"ExperimentId")] 2339 [DataMember(Order= 9, EmitDefaultValue=false)]2275 [DataMember(Order=8, EmitDefaultValue=false)] 2340 2276 public EntitySet<Run> Runs 2341 2277 { … … 2364 2300 private EntitySet<OperatorParameterValue> _OperatorParameterValues; 2365 2301 [Association(Name=@"Experiment_OperatorParameterValue", Storage=@"_OperatorParameterValues", ThisKey=@"Id", OtherKey=@"ExperimentId")] 2366 [DataMember(Order= 10, EmitDefaultValue=false)]2302 [DataMember(Order=9, EmitDefaultValue=false)] 2367 2303 public EntitySet<OperatorParameterValue> OperatorParameterValues 2368 2304 { … … 2391 2327 private EntityRef<Problem> _Problem; 2392 2328 [Association(Name=@"Problem_Experiment", Storage=@"_Problem", ThisKey=@"ProblemId", OtherKey=@"Id", IsForeignKey=true, DeleteOnNull=true, DeleteRule=@"CASCADE")] 2393 [DataMember(Order=1 1, EmitDefaultValue=false)]2329 [DataMember(Order=10, EmitDefaultValue=false)] 2394 2330 public Problem Problem 2395 2331 { … … 2423 2359 private EntityRef<Project> _Project; 2424 2360 [Association(Name=@"Project_Experiment", Storage=@"_Project", ThisKey=@"ProjectId", OtherKey=@"Id", IsForeignKey=true, DeleteOnNull=true, DeleteRule=@"CASCADE")] 2425 [DataMember(Order=1 2, EmitDefaultValue=false)]2361 [DataMember(Order=11, EmitDefaultValue=false)] 2426 2362 public Project Project 2427 2363 { … … 2455 2391 private EntityRef<Algorithm> _Algorithm; 2456 2392 [Association(Name=@"Algorithm_Experiment", Storage=@"_Algorithm", ThisKey=@"AlgorithmId", OtherKey=@"Id", IsForeignKey=true, DeleteOnNull=true, DeleteRule=@"CASCADE")] 2457 [DataMember(Order=1 3, EmitDefaultValue=false)]2393 [DataMember(Order=12, EmitDefaultValue=false)] 2458 2394 public Algorithm Algorithm 2459 2395 { … … 2504 2440 } 2505 2441 2506 [OnDeserializing()]2507 [EditorBrowsableAttribute(EditorBrowsableState.Never)]2508 public void OnDeserializing(StreamingContext context)2509 {2510 Initialize();2511 }2512 #endregion2513 }2514 }2515 2516 namespace HeuristicLab.Services.OKB.DataAccess2517 {2518 [DataContract(IsReference=true)]2519 [Table(Name=@"dbo.ExperimentCreator")]2520 [KnownType(typeof(ExperimentCreator))] public partial class ExperimentCreator : INotifyPropertyChanging, INotifyPropertyChanged2521 {2522 #region Property Change Event Handling2523 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);2524 2525 public event PropertyChangingEventHandler PropertyChanging;2526 public event PropertyChangedEventHandler PropertyChanged;2527 2528 public virtual void SendPropertyChanging()2529 {2530 if (PropertyChanging != null) {2531 PropertyChanging(this, emptyChangingEventArgs);2532 }2533 }2534 2535 public virtual void SendPropertyChanged(String propertyName)2536 {2537 if (PropertyChanged != null) {2538 PropertyChanged(this, new PropertyChangedEventArgs(propertyName));2539 }2540 }2541 #endregion2542 2543 #region Extensibility Method Definitions2544 partial void OnLoaded();2545 partial void OnValidate(ChangeAction action);2546 partial void OnCreated();2547 #endregion2548 2549 #region Construction2550 public ExperimentCreator()2551 {2552 Initialize();2553 }2554 2555 private void Initialize()2556 {2557 _Experiment = default(EntityRef<Experiment>);2558 _User = default(EntityRef<User>);2559 OnCreated();2560 }2561 #endregion2562 2563 #region Column Mappings2564 partial void OnExperimentIdChanging(int value);2565 partial void OnExperimentIdChanged();2566 private int _ExperimentId;2567 [Column(Storage=@"_ExperimentId", DbType=@"Int NOT NULL", IsPrimaryKey=true, UpdateCheck=UpdateCheck.Never)]2568 [DataMember(Order=1)]2569 public int ExperimentId2570 {2571 get { return _ExperimentId; }2572 set {2573 if (_ExperimentId != value) {2574 if (_Experiment.HasLoadedOrAssignedValue) {2575 throw new ForeignKeyReferenceAlreadyHasValueException();2576 }2577 OnExperimentIdChanging(value);2578 SendPropertyChanging();2579 _ExperimentId = value;2580 SendPropertyChanged("ExperimentId");2581 OnExperimentIdChanged();2582 }2583 }2584 }2585 2586 partial void OnUserIdChanging(Guid value);2587 partial void OnUserIdChanged();2588 private Guid _UserId;2589 [Column(Storage=@"_UserId", DbType=@"UniqueIdentifier NOT NULL", IsPrimaryKey=true, UpdateCheck=UpdateCheck.Never)]2590 [DataMember(Order=2)]2591 public Guid UserId2592 {2593 get { return _UserId; }2594 set {2595 if (_UserId != value) {2596 if (_User.HasLoadedOrAssignedValue) {2597 throw new ForeignKeyReferenceAlreadyHasValueException();2598 }2599 OnUserIdChanging(value);2600 SendPropertyChanging();2601 _UserId = value;2602 SendPropertyChanged("UserId");2603 OnUserIdChanged();2604 }2605 }2606 }2607 2608 #endregion2609 2610 #region Associations2611 private EntityRef<Experiment> _Experiment;2612 [Association(Name=@"Experiment_ExperimentCreator", Storage=@"_Experiment", ThisKey=@"ExperimentId", OtherKey=@"Id", IsForeignKey=true, DeleteOnNull=true, DeleteRule=@"CASCADE")]2613 [DataMember(Order=3, EmitDefaultValue=false)]2614 public Experiment Experiment2615 {2616 get {2617 return _Experiment.Entity;2618 }2619 set {2620 Experiment previousValue = _Experiment.Entity;2621 if ((previousValue != value) || (!_Experiment.HasLoadedOrAssignedValue)) {2622 SendPropertyChanging();2623 if (previousValue != null) {2624 _Experiment.Entity = null;2625 previousValue.ExperimentCreators.Remove(this);2626 }2627 _Experiment.Entity = value;2628 if (value != null) {2629 value.ExperimentCreators.Add(this);2630 _ExperimentId = value.Id;2631 }2632 else {2633 _ExperimentId = default(int);2634 }2635 SendPropertyChanged("Experiment");2636 }2637 }2638 }2639 2640 private EntityRef<User> _User;2641 [Association(Name=@"User_ExperimentCreator", Storage=@"_User", ThisKey=@"UserId", OtherKey=@"Id", IsForeignKey=true)]2642 [DataMember(Order=4, EmitDefaultValue=false)]2643 public User User2644 {2645 get {2646 return _User.Entity;2647 }2648 set {2649 User previousValue = _User.Entity;2650 if ((previousValue != value) || (!_User.HasLoadedOrAssignedValue)) {2651 SendPropertyChanging();2652 if (previousValue != null) {2653 _User.Entity = null;2654 previousValue.ExperimentCreators.Remove(this);2655 }2656 _User.Entity = value;2657 if (value != null) {2658 value.ExperimentCreators.Add(this);2659 _UserId = value.Id;2660 }2661 else {2662 _UserId = default(Guid);2663 }2664 SendPropertyChanged("User");2665 }2666 }2667 }2668 2669 #endregion2670 2671 #region Serialization2672 2442 [OnDeserializing()] 2673 2443 [EditorBrowsableAttribute(EditorBrowsableState.Never)] -
trunk/sources/HeuristicLab.Services.OKB.DataAccess/3.3/Properties/Settings.Designer.cs
r4276 r4298 14 14 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 15 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] 16 internalsealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {16 public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 17 18 18 private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); … … 27 27 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 28 [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)] 29 [global::System.Configuration.DefaultSettingValueAttribute("Data Source=localhost;Initial Catalog= OKB;Integrated Security=True")]29 [global::System.Configuration.DefaultSettingValueAttribute("Data Source=localhost;Initial Catalog=HeuristicLab.OKB;Integrated Security=SSPI")] 30 30 public string OKBConnectionString { 31 31 get { -
trunk/sources/HeuristicLab.Services.OKB.DataAccess/3.3/Properties/Settings.settings
r4276 r4298 1 1 <?xml version='1.0' encoding='utf-8'?> 2 <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="HeuristicLab. OKB.DataStore.Properties" GeneratedClassName="Settings">2 <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="HeuristicLab.Services.OKB.DataAccess.Properties" GeneratedClassName="Settings"> 3 3 <Profiles /> 4 4 <Settings> … … 6 6 <DesignTimeValue Profile="(Default)"><?xml version="1.0" encoding="utf-16"?> 7 7 <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 8 <ConnectionString>Data Source=localhost;Initial Catalog= OKB;Integrated Security=True</ConnectionString>8 <ConnectionString>Data Source=localhost;Initial Catalog=HeuristicLab.OKB;Integrated Security=SSPI</ConnectionString> 9 9 <ProviderName>System.Data.SqlClient</ProviderName> 10 10 </SerializableConnectionString></DesignTimeValue> 11 <Value Profile="(Default)">Data Source=localhost;Initial Catalog= OKB;Integrated Security=True</Value>11 <Value Profile="(Default)">Data Source=localhost;Initial Catalog=HeuristicLab.OKB;Integrated Security=SSPI</Value> 12 12 </Setting> 13 13 </Settings> -
trunk/sources/HeuristicLab.Services.OKB.DataAccess/3.3/app.config
r4276 r4298 4 4 </configSections> 5 5 <connectionStrings> 6 <add name="HeuristicLab.OKB.DataStore.Properties.Settings.OKBConnectionString" connectionString="Data Source=localhost;Initial Catalog=OKB;Integrated Security=True" providerName="System.Data.SqlClient"/> 6 <add name="HeuristicLab.Services.OKB.DataAccess.Properties.Settings.OKBConnectionString" 7 connectionString="Data Source=localhost;Initial Catalog=HeuristicLab.OKB;Integrated Security=SSPI" 8 providerName="System.Data.SqlClient" /> 7 9 </connectionStrings> 8 10 <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
Note: See TracChangeset
for help on using the changeset viewer.