- Timestamp:
- 12/14/10 16:52:55 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources
- Files:
-
- 5 added
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/Mocks/MockHiveService.cs
r5104 r5106 28 28 ServerConfigFilePath = Path.Combine(ServerPluginCachePath, "HeuristicLab 3.3.exe.config"); 29 29 30 byte[] data = PersistenceUtil.Serialize(new MockJob(4000 ));30 byte[] data = PersistenceUtil.Serialize(new MockJob(4000, false)); 31 31 if (plugins == null) 32 32 plugins = ReadPluginsFromServerCache(); … … 111 111 public void UpdateJob(Job jobDto, JobData jobDataDto) { 112 112 Console.WriteLine("Update Job called!"); 113 } 114 115 public void DeleteJob(Guid jobId) { 116 // do nothing 113 117 } 114 118 … … 219 223 } 220 224 225 public Services.Hive.Common.DataTransfer.Slave GetSlave(Guid slaveId) { 226 throw new NotImplementedException(); 227 } 228 229 public SlaveGroup GetSlaveGroup(Guid slaveGroupId) { 230 throw new NotImplementedException(); 231 } 232 221 233 public IEnumerable<Services.Hive.Common.DataTransfer.Slave> GetSlaves() { 222 234 throw new NotImplementedException(); … … 227 239 } 228 240 229 public void DeleteSlaveGroup(Guid clientGroupId) { 230 throw new NotImplementedException(); 231 } 232 233 public void AddResourceToGroup(Guid slaveGroupId, Resource resource) { 241 public void UpdateSlave(Services.Hive.Common.DataTransfer.Slave slave) { 242 throw new NotImplementedException(); 243 } 244 245 public void UpdateSlaveGroup(SlaveGroup slaveGroup) { 246 throw new NotImplementedException(); 247 } 248 249 public void DeleteSlave(Guid slaveId) { 250 throw new NotImplementedException(); 251 } 252 253 public void DeleteSlaveGroup(Guid slaveGroupId) { 254 throw new NotImplementedException(); 255 } 256 257 public void AddResourceToGroup(Guid slaveGroupId, Guid resourceId) { 234 258 throw new NotImplementedException(); 235 259 } 236 260 237 261 public void RemoveResourceFromGroup(Guid slaveGroupId, Guid resourceId) { 238 throw new NotImplementedException();239 }240 241 public void UpdateSlave(Services.Hive.Common.DataTransfer.Slave slave) {242 262 throw new NotImplementedException(); 243 263 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/Mocks/MockJob.cs
r5104 r5106 9 9 using System.Drawing; 10 10 using System.Threading; 11 using System.Diagnostics; 11 12 12 13 namespace HeuristicLab.Clients.Hive.Slave.Tests { … … 45 46 46 47 private int ms = 1000; //ms 47 public MockJob(int ms) { 48 private bool spinWait; 49 public MockJob(int ms, bool spinWait) { 48 50 this.ms = ms; 51 this.spinWait = spinWait; 49 52 } 50 53 public MockJob() { } 51 54 [StorableConstructor] 52 55 protected MockJob(bool deserializing) { } 53 protected MockJob(MockJob original, Cloner cloner) : base(original, cloner) { 56 protected MockJob(MockJob original, Cloner cloner) 57 : base(original, cloner) { 54 58 this.ComputeInParallel = original.ComputeInParallel; 55 59 this.IndexInParentOptimizerList = original.IndexInParentOptimizerList; … … 92 96 93 97 public virtual void Start() { 94 DateTime start = DateTime.Now; 95 do { 96 Thread.SpinWait(1000); 97 this.ExecutionTime = DateTime.Now - start; 98 } while (ExecutionTime.TotalMilliseconds < ms); 99 Stop(); 100 OnJobStopped(); 98 new Thread(Run).Start(); 99 } 100 101 private void Run() { 102 try { 103 if (spinWait) { 104 Stopwatch watch = new Stopwatch(); 105 watch.Start(); 106 do { 107 Thread.SpinWait(1000); 108 } while (watch.ElapsedMilliseconds < ms); 109 watch.Stop(); 110 } else { 111 Thread.Sleep(ms); 112 } 113 Stop(); 114 OnJobStopped(); 115 } 116 catch (Exception e) { 117 this.ExecutionState = Core.ExecutionState.Stopped; 118 OnJobFailed(); 119 } 101 120 } 102 121 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Executor.cs
r5105 r5106 195 195 196 196 public Executor() { 197 CurrentMessage = MessageContainer.MessageType.NoMessage;197 // CurrentMessage = MessageContainer.MessageType.NoMessage; [chn] check usage of 'CurrentMessage' 198 198 } 199 199 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/HiveExperimentClient.cs
r5055 r5106 46 46 private System.Timers.Timer timer; 47 47 private DateTime lastUpdateTime; 48 private Guid ?rootJobId;48 private Guid rootJobId; 49 49 private JobResultPoller jobResultPoller; 50 50 … … 535 535 // fetch all Job objects to create the full tree of tree of HiveJob objects 536 536 progress.Status = "Downloading list of jobs..."; 537 IEnumerable<LightweightJob> allResults = service.Obj.GetLightweightChildJobs(rootJobId .Value, true, true);537 IEnumerable<LightweightJob> allResults = service.Obj.GetLightweightChildJobs(rootJobId, true, true); 538 538 totalJobCount = allResults.Count(); 539 539 … … 550 550 551 551 jobCount = 1; 552 progress.Status = string.Format("Deserializing {0} of {1} jobs... ({2} kb)", jobCount, totalJobCount, allJobDatas[this.rootJobId .Value].Data.Count() / 1024);553 this.HiveJob = new HiveJob(allJobs[this.rootJobId .Value], allJobDatas[this.rootJobId.Value], false);554 allJobDatas.Remove(this.rootJobId .Value); // reduce memory footprint555 allJobs.Remove(this.rootJobId .Value);552 progress.Status = string.Format("Deserializing {0} of {1} jobs... ({2} kb)", jobCount, totalJobCount, allJobDatas[this.rootJobId].Data.Count() / 1024); 553 this.HiveJob = new HiveJob(allJobs[this.rootJobId], allJobDatas[this.rootJobId], false); 554 allJobDatas.Remove(this.rootJobId); // reduce memory footprint 555 allJobs.Remove(this.rootJobId); 556 556 progress.ProgressValue = (double)jobCount / totalJobCount; 557 557 558 558 if (this.HiveJob.Job.DateFinished.HasValue) { 559 this.ExecutionTime = this.HiveJob.Job.DateFinished.Value - this.HiveJob.Job.DateCreated .Value;559 this.ExecutionTime = this.HiveJob.Job.DateFinished.Value - this.HiveJob.Job.DateCreated; 560 560 this.lastUpdateTime = this.HiveJob.Job.DateFinished.Value; 561 561 this.ExecutionState = Core.ExecutionState.Stopped; 562 562 OnStopped(); 563 563 } else { 564 this.ExecutionTime = DateTime.Now - this.HiveJob.Job.DateCreated .Value;564 this.ExecutionTime = DateTime.Now - this.HiveJob.Job.DateCreated; 565 565 this.lastUpdateTime = DateTime.Now; 566 566 this.ExecutionState = Core.ExecutionState.Started; -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/HiveExperiment.cs
r4796 r5106 31 31 public Guid UserId { get; set; } 32 32 [DataMember] 33 public Guid? RootJobId { get; set; } 33 public Guid RootJobId { get; set; } 34 [DataMember] 35 public DateTime DateCreated { get; set; } 34 36 35 37 public HiveExperiment() { } … … 37 39 this.RootJobId = original.RootJobId; 38 40 this.UserId = original.UserId; 41 this.DateCreated = original.DateCreated; 39 42 } 40 43 public override IDeepCloneable Clone(Cloner cloner) { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/Job.cs
r4905 r5106 39 39 public int MemoryNeeded { get; set; } 40 40 [DataMember] 41 public Guid? ProjectId { get; set; }42 [DataMember]43 41 public List<Guid> PluginsNeededIds { get; set; } 44 42 … … 49 47 this.CoresNeeded = original.CoresNeeded; 50 48 this.MemoryNeeded = original.MemoryNeeded; 51 this.ProjectId = original.ProjectId;52 49 this.PluginsNeededIds = new List<Guid>(original.PluginsNeededIds); 53 50 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/JobData.cs
r4796 r5106 33 33 [DataMember] 34 34 public byte[] Data { get; set; } 35 [DataMember] 36 public DateTime LastUpdate { get; set; } 35 37 36 38 public JobData() { } 37 39 protected JobData(JobData original, Cloner cloner) : base(original, cloner) { 38 40 if (original.Data != null) this.Data = new byte[original.Data.Length]; Array.Copy(original.Data, this.Data, original.Data.Length); 41 this.LastUpdate = original.LastUpdate; 39 42 } 40 43 public override IDeepCloneable Clone(Cloner cloner) { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/LightweightJob.cs
r4796 r5106 37 37 public String Exception { get; set; } 38 38 [DataMember] 39 public DateTime ?DateCreated { get; set; }39 public DateTime DateCreated { get; set; } 40 40 [DataMember] 41 41 public DateTime? DateCalculated { get; set; } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/Resource.cs
r4796 r5106 28 28 [Serializable] 29 29 public class Resource : NamedHiveItem { 30 [DataMember] 31 public Guid? ParentResourceId { get; set; } 30 32 31 33 public Resource() { } 32 protected Resource(Resource original, Cloner cloner) : base(original, cloner) { } 34 protected Resource(Resource original, Cloner cloner) : base(original, cloner) { 35 this.ParentResourceId = original.ParentResourceId; 36 } 33 37 public override IDeepCloneable Clone(Cloner cloner) { 34 38 return new Resource(this, cloner); -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/Slave.cs
r4796 r5106 33 33 public int? FreeCores { get; set; } 34 34 [DataMember] 35 public int? CpuSpeed { get; set; } 35 public int? CpuSpeed { get; set; } // MHz 36 36 [DataMember] 37 public int? Memory { get; set; } 37 public int? Memory { get; set; } // MB 38 38 [DataMember] 39 public int? FreeMemory { get; set; } 39 public int? FreeMemory { get; set; } // MB 40 40 [DataMember] 41 41 public SlaveState SlaveState { get; set; } 42 [DataMember]43 public CalendarState CalendarSyncState { get; set; }44 [DataMember]45 public Guid? SlaveConfigId { get; set; }46 42 [DataMember] 47 43 public bool IsAllowedToCalculate { get; set; } … … 57 53 this.FreeMemory = original.FreeMemory; 58 54 this.SlaveState = original.SlaveState; 59 this.CalendarSyncState = original.CalendarSyncState;60 this.SlaveConfigId = original.SlaveConfigId;61 55 this.IsAllowedToCalculate = original.IsAllowedToCalculate; 62 56 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/SlaveGroup.cs
r4796 r5106 29 29 [DataContract] 30 30 public class SlaveGroup : Resource { 31 [DataMember] 32 public List<Guid> ChildResourcesIds { get; set; } 33 [DataMember] 34 public List<Guid> ParentResourcesIds { get; set; } 35 36 public SlaveGroup() { 37 ChildResourcesIds = new List<Guid>(); 38 } 39 protected SlaveGroup(SlaveGroup original, Cloner cloner) : base(original, cloner) { 40 this.ChildResourcesIds = new List<Guid>(original.ChildResourcesIds); 41 this.ParentResourcesIds = new List<Guid>(original.ParentResourcesIds); 42 } 31 public SlaveGroup() { } 32 protected SlaveGroup(SlaveGroup original, Cloner cloner) : base(original, cloner) { } 43 33 public override IDeepCloneable Clone(Cloner cloner) { 44 34 return new SlaveGroup(this, cloner); -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/HeuristicLab.Services.Hive.Common-3.4.csproj
r5055 r5106 64 64 <None Include="HeuristicLabServicesHiveCommonPlugin.cs.frame" /> 65 65 <Compile Include="DataTransfer\Appointment.cs" /> 66 <Compile Include="DataTransfer\CalendarState.cs" />67 66 <Compile Include="DataTransfer\HeartBeat.cs" /> 68 67 <Compile Include="DataTransfer\HiveExperiment.cs" /> … … 76 75 <Compile Include="MessageContainer.cs" /> 77 76 <Compile Include="DataTransfer\NamedHiveItem.cs" /> 78 <Compile Include="DataTransfer\Project.cs" />79 77 <Compile Include="DataTransfer\Resource.cs" /> 80 78 <Compile Include="DataTransfer\JobData.cs" /> 81 <Compile Include="DataTransfer\SlaveConfig.cs" />82 79 <Compile Include="DataTransfer\Slave.cs" /> 83 80 <Compile Include="DataTransfer\SlaveGroup.cs" /> 84 81 <Compile Include="DataTransfer\SlaveState.cs" /> 85 <Compile Include="DataTransfer\UpTimeStatistics.cs" />86 82 <Compile Include="HeuristicLabServicesHiveCommonPlugin.cs" /> 87 83 <Compile Include="Properties\AssemblyInfo.cs" /> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/MessageContainer.cs
r5078 r5106 35 35 public enum MessageType { 36 36 // *** commands from hive server *** 37 NoMessage, // do nothing38 37 AquireJob, // slave should aquire a new job (formerly FetchJob) 39 38 StopJob, // slave should stop the job and submit results -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/ServiceContracts/IHiveService.cs
r5101 r5106 37 37 [OperationContract] 38 38 void UpdateJob(Job jobDto, JobData jobDataDto); 39 40 [OperationContract] 41 void DeleteJob(Guid jobId); 39 42 40 43 [OperationContract] … … 107 110 108 111 [OperationContract] 112 Slave GetSlave(Guid slaveId); 113 114 [OperationContract] 115 SlaveGroup GetSlaveGroup(Guid slaveGroupId); 116 117 [OperationContract] 109 118 IEnumerable<Slave> GetSlaves(); 110 119 111 120 [OperationContract] 112 [ServiceKnownType(typeof(Resource))]113 [ServiceKnownType(typeof(Slave))]114 [ServiceKnownType(typeof(SlaveGroup))]115 121 IEnumerable<SlaveGroup> GetSlaveGroups(); 116 122 117 123 [OperationContract] 118 void DeleteSlaveGroup(Guid clientGroupId);124 void UpdateSlave(Slave slave); 119 125 120 126 [OperationContract] 121 [ServiceKnownType(typeof(Resource))] 122 [ServiceKnownType(typeof(Slave))] 123 [ServiceKnownType(typeof(SlaveGroup))] 124 void AddResourceToGroup(Guid slaveGroupId, Resource resource); 127 void UpdateSlaveGroup(SlaveGroup slaveGroup); 128 129 [OperationContract] 130 void DeleteSlave(Guid slaveId); 131 132 [OperationContract] 133 void DeleteSlaveGroup(Guid slaveGroupId); 134 135 [OperationContract] 136 void AddResourceToGroup(Guid slaveGroupId, Guid resourceId); 125 137 126 138 [OperationContract] 127 139 void RemoveResourceFromGroup(Guid slaveGroupId, Guid resourceId); 128 140 129 [OperationContract]130 void UpdateSlave(Slave slave);131 141 #endregion 132 142 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Convert.cs
r4905 r5106 42 42 ParentJobId = source.ParentJobId, 43 43 Priority = source.Priority, 44 ProjectId = source.ProjectId,45 44 SlaveId = source.SlaveId, 46 45 JobState = source.JobState, … … 66 65 target.ParentJobId = source.ParentJobId; 67 66 target.Priority = source.Priority; 68 target.ProjectId = source.ProjectId;69 67 target.SlaveId = source.SlaveId; 70 68 target.JobState = source.JobState; 71 69 target.UserId = source.UserId; 72 // target.RequiredPlugins = db.Plugins.Select(x => source.PluginsNeededIds.Contains(x.PluginId)); - this is difficult70 // target.RequiredPlugins = db.Plugins.Select(x => source.PluginsNeededIds.Contains(x.PluginId)); - this is difficult 73 71 } 74 72 } … … 78 76 public static DT.JobData ToDto(JobData source) { 79 77 if (source == null) return null; 80 return new DT.JobData { JobId = source.JobId, Data = source.Data.ToArray() };78 return new DT.JobData { JobId = source.JobId, Data = source.Data.ToArray(), LastUpdate = source.LastUpdate }; 81 79 } 82 80 public static JobData ToEntity(DT.JobData source) { … … 87 85 public static void ToEntity(DT.JobData source, JobData target) { 88 86 if ((source != null) && (target != null)) { 89 target.JobId = source.JobId; target.Data = new Binary(source.Data); 87 target.JobId = source.JobId; target.Data = new Binary(source.Data); target.LastUpdate = source.LastUpdate; 90 88 } 91 89 } … … 95 93 public static DT.HiveExperiment ToDto(HiveExperiment source) { 96 94 if (source == null) return null; 97 return new DT.HiveExperiment { Id = source.HiveExperimentId, Description = source.Description, Name = source.Name, RootJobId = source.RootJobId, UserId = source.UserId };95 return new DT.HiveExperiment { Id = source.HiveExperimentId, Description = source.Description, Name = source.Name, RootJobId = source.RootJobId, UserId = source.UserId, DateCreated = source.DateCreated }; 98 96 } 99 97 public static HiveExperiment ToEntity(DT.HiveExperiment source) { … … 104 102 public static void ToEntity(DT.HiveExperiment source, HiveExperiment target) { 105 103 if ((source != null) && (target != null)) { 106 target.HiveExperimentId = source.Id; target.Description = source.Description; target.Name = source.Name; target.RootJobId = source.RootJobId; target.UserId = source.UserId; 104 target.HiveExperimentId = source.Id; target.Description = source.Description; target.Name = source.Name; target.RootJobId = source.RootJobId; target.UserId = source.UserId; target.DateCreated = source.DateCreated; 107 105 } 108 106 } … … 146 144 public static DT.Slave ToDto(Slave source) { 147 145 if (source == null) return null; 148 return new DT.Slave { Id = source.ResourceId, CalendarSyncState = source.CalendarSyncState, Cores = source.Cores, CpuSpeed = source.CpuSpeed, FreeCores = source.FreeCores, FreeMemory = source.FreeMemory, IsAllowedToCalculate = source.IsAllowedToCalculate, Memory = source.Memory, Name = source.Name, SlaveConfigId = source.SlaveConfigId, SlaveState = source.SlaveState };146 return new DT.Slave { Id = source.ResourceId, ParentResourceId = source.ParentResourceId, Cores = source.Cores, CpuSpeed = source.CpuSpeed, FreeCores = source.FreeCores, FreeMemory = source.FreeMemory, IsAllowedToCalculate = source.IsAllowedToCalculate, Memory = source.Memory, Name = source.Name, SlaveState = source.SlaveState }; 149 147 } 150 148 public static Slave ToEntity(DT.Slave source) { … … 155 153 public static void ToEntity(DT.Slave source, Slave target) { 156 154 if ((source != null) && (target != null)) { 157 target.ResourceId = source.Id; target. CalendarSyncState = source.CalendarSyncState; target.Cores = source.Cores; target.CpuSpeed = source.CpuSpeed; target.FreeCores = source.FreeCores; target.FreeMemory = source.FreeMemory; target.IsAllowedToCalculate = source.IsAllowedToCalculate; target.Memory = source.Memory; target.Name = source.Name; target.SlaveConfigId = source.SlaveConfigId; target.SlaveState = source.SlaveState;155 target.ResourceId = source.Id; target.ParentResourceId = source.ParentResourceId; target.Cores = source.Cores; target.CpuSpeed = source.CpuSpeed; target.FreeCores = source.FreeCores; target.FreeMemory = source.FreeMemory; target.IsAllowedToCalculate = source.IsAllowedToCalculate; target.Memory = source.Memory; target.Name = source.Name; target.SlaveState = source.SlaveState; 158 156 } 159 157 } … … 163 161 public static DT.SlaveGroup ToDto(SlaveGroup source) { 164 162 if (source == null) return null; 165 return new DT.SlaveGroup { Id = source.ResourceId, Name = source.Name, ChildResourcesIds = source.SlaveGroup_Resources_Children.Select(x => x.ResourceId).ToList(), ParentResourcesIds = source.SlaveGroup_Resources_Parents.Select(x => x.ResourceId).ToList()};163 return new DT.SlaveGroup { Id = source.ResourceId, Name = source.Name, ParentResourceId = source.ParentResourceId }; 166 164 } 167 165 public static SlaveGroup ToEntity(DT.SlaveGroup source) { … … 172 170 public static void ToEntity(DT.SlaveGroup source, SlaveGroup target) { 173 171 if ((source != null) && (target != null)) { 174 target.ResourceId = source.Id; 175 target.Name = source.Name; 176 //target.SlaveGroup_Resources_Children = // TODO: see how working with groups will work, then decide how to handle enumerations in here 177 //target.SlaveGroup_Resources_Parents = 172 target.ResourceId = source.Id; target.Name = source.Name; target.ParentResourceId = source.ParentResourceId; 178 173 } 179 174 } … … 183 178 public static DT.Resource ToDto(Resource source) { 184 179 if (source == null) return null; 185 return new DT.Resource { Id = source.ResourceId, Name = source.Name };180 return new DT.Resource { Id = source.ResourceId, Name = source.Name, ParentResourceId = source.ParentResourceId }; 186 181 } 187 182 public static Resource ToEntity(DT.Resource source) { … … 192 187 public static void ToEntity(DT.Resource source, Resource target) { 193 188 if ((source != null) && (target != null)) { 194 target.ResourceId = source.Id; target.Name = source.Name; 189 target.ResourceId = source.Id; target.Name = source.Name; target.ParentResourceId = source.ParentResourceId; 195 190 } 196 191 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HeuristicLab.Services.Hive.DataAccess-3.4.csproj
r5078 r5106 61 61 <Reference Include="System.Data.Linq" /> 62 62 <Reference Include="System.Transactions" /> 63 <Reference Include="System.Windows.Forms" /> 63 64 <Reference Include="System.Xml.Linq" /> 64 65 <Reference Include="System.Data.DataSetExtensions" /> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDao.cs
r4905 r5106 53 53 var entity = db.Jobs.FirstOrDefault(x => x.JobId == id); 54 54 if (entity != null) db.Jobs.DeleteOnSubmit(entity); 55 db.SubmitChanges(); 55 db.SubmitChanges(); // JobData and child jobs are deleted by db-trigger 56 56 } 57 57 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDataContext.dbml
r4905 r5106 9 9 </Type> 10 10 </Table> 11 <Table Name="dbo.UptimeStatistics" Member="UptimeStatistics">12 <Type Name="UptimeStatistic">13 <Column Name="UptimeStatisticsId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />14 <Column Name="Login" Type="System.DateTime" DbType="DateTime" CanBeNull="false" />15 <Column Name="Logout" Type="System.DateTime" DbType="DateTime" CanBeNull="false" />16 <Column Name="ResourceId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="false" />17 <Association Name="Slave_UptimeStatistic" Member="Slave" ThisKey="ResourceId" OtherKey="ResourceId" Type="Slave" IsForeignKey="true" DeleteRule="SET NULL" />18 </Type>19 </Table>20 <Table Name="dbo.SlaveConfig" Member="SlaveConfigs">21 <Type Name="SlaveConfig">22 <Column Name="SlaveConfigId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />23 <Column Name="UpDownTimeCalendar" Type="System.Xml.Linq.XElement" DbType="Xml" CanBeNull="false" UpdateCheck="Never" />24 <Column Name="HeartBeatIntervall" Type="System.Int32" DbType="Int" CanBeNull="true" />25 <Association Name="SlaveConfig_Slave" Member="Slaves" ThisKey="SlaveConfigId" OtherKey="SlaveConfigId" Type="Slave" />26 </Type>27 </Table>28 <Table Name="dbo.SlaveGroup_Resource" Member="SlaveGroup_Resources">29 <Type Name="SlaveGroup_Resource">30 <Column Name="SlaveGroup_RessourceId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />31 <Column Name="SlaveGroupId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />32 <Column Name="ResourceId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />33 <Association Name="SlaveGroup_SlaveGroup_Resource" Member="SlaveGroup" ThisKey="SlaveGroupId" OtherKey="ResourceId" Type="SlaveGroup" IsForeignKey="true" />34 <Association Name="Resource_SlaveGroup_Resource" Member="Resource" ThisKey="ResourceId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" DeleteRule="CASCADE" />35 </Type>36 </Table>37 11 <Table Name="dbo.Plugin" Member="Plugins"> 38 12 <Type Name="Plugin"> … … 42 16 <Association Name="Plugin_RequiredPlugin" Member="RequiredPlugins" ThisKey="PluginId" OtherKey="PluginId" Type="RequiredPlugin" /> 43 17 <Association Name="Plugin_PluginData" Member="PluginData" ThisKey="PluginId" OtherKey="PluginId" Type="PluginData" Cardinality="One" /> 44 </Type>45 </Table>46 <Table Name="dbo.Project" Member="Projects">47 <Type Name="Project">48 <Column Name="ProjectId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />49 <Column Name="Name" Type="System.String" DbType="VarChar(MAX)" CanBeNull="false" />50 <Association Name="Project_Job" Member="Jobs" ThisKey="ProjectId" OtherKey="ProjectId" Type="Job" />51 18 </Type> 52 19 </Table> … … 62 29 <Table Name="dbo.Resource" Member="Resources"> 63 30 <Type Name="Resource" InheritanceCode="RESOURCE"> 64 <Column Name="ResourceId" AutoSync="OnInsert" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" />31 <Column Name="ResourceId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" /> 65 32 <Column Name="Name" Type="System.String" DbType="VarChar(MAX)" CanBeNull="false" /> 66 33 <Column Name="ResourceType" Type="System.String" CanBeNull="false" IsDiscriminator="true" /> 34 <Column Name="ParentResourceId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" /> 67 35 <Association Name="Resource_AssignedResource" Member="AssignedResources" ThisKey="ResourceId" OtherKey="ResourceId" Type="AssignedResource" /> 68 <Association Name="Resource_SlaveGroup_Resource" Member="SlaveGroup_Resources_Parents" ThisKey="ResourceId" OtherKey="ResourceId" Type="SlaveGroup_Resource" />69 36 <Association Name="Resource_UptimeCalendar" Member="UptimeCalendars" ThisKey="ResourceId" OtherKey="ResourceId" Type="UptimeCalendar" /> 37 <Association Name="Resource_Resource" Member="ChildResources" ThisKey="ResourceId" OtherKey="ParentResourceId" Type="Resource" /> 38 <Association Name="Resource_Resource" Member="ParentResource" ThisKey="ParentResourceId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" /> 70 39 <Type Name="Slave" InheritanceCode="Slave" IsInheritanceDefault="true"> 71 40 <Column Name="CpuSpeed" Storage="_CPUSpeed" Type="System.Int32" DbType="Int" CanBeNull="true" /> … … 73 42 <Column Name="Login" Type="System.DateTime" DbType="DateTime" CanBeNull="true" /> 74 43 <Column Name="SlaveState" Storage="_Status" Type="global::HeuristicLab.Services.Hive.Common.DataTransfer.SlaveState" DbType="VarChar(15)" CanBeNull="true" /> 75 <Column Name="CalendarSyncState" Storage="_CalendarSyncStatus" Type="global::HeuristicLab.Services.Hive.Common.DataTransfer.CalendarState" DbType="VarChar(MAX)" CanBeNull="true" />76 <Column Name="UseCalendarFromResourceId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />77 <Column Name="SlaveConfigId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />78 44 <Column Name="Cores" Storage="_NumberOfCores" Type="System.Int32" DbType="Int" CanBeNull="true" /> 79 45 <Column Name="FreeCores" Storage="_NumberOfFreeCores" Type="System.Int32" DbType="Int" CanBeNull="true" /> 80 46 <Column Name="FreeMemory" Type="System.Int32" DbType="Int" CanBeNull="true" /> 81 47 <Column Name="IsAllowedToCalculate" Type="System.Boolean" DbType="Bit" CanBeNull="false" /> 82 <Association Name="Slave_UptimeStatistic" Member="UptimeStatistics" ThisKey="ResourceId" OtherKey="ResourceId" Type="UptimeStatistic" />83 48 <Association Name="Slave_Job" Member="Jobs" ThisKey="ResourceId" OtherKey="SlaveId" Type="Job" /> 84 <Association Name="SlaveConfig_Slave" Member="SlaveConfig" ThisKey="SlaveConfigId" OtherKey="SlaveConfigId" Type="SlaveConfig" IsForeignKey="true" DeleteRule="SET NULL" />85 49 </Type> 86 <Type Name="SlaveGroup" InheritanceCode="GROUP"> 87 <Association Name="SlaveGroup_SlaveGroup_Resource" Member="SlaveGroup_Resources_Children" ThisKey="ResourceId" OtherKey="SlaveGroupId" Type="SlaveGroup_Resource" /> 88 </Type> 50 <Type Name="SlaveGroup" InheritanceCode="GROUP" /> 89 51 </Type> 90 52 </Table> … … 97 59 <Column Name="ExecutionTime" Type="System.TimeSpan" DbType="Time" CanBeNull="true" /> 98 60 <Column Name="Exception" Type="System.String" DbType="VarChar(MAX)" CanBeNull="true" /> 99 <Column Name="DateCreated" Type="System.DateTime" DbType="DateTime" CanBeNull=" true" />61 <Column Name="DateCreated" Type="System.DateTime" DbType="DateTime" CanBeNull="false" /> 100 62 <Column Name="DateCalculated" Type="System.DateTime" DbType="DateTime" CanBeNull="true" /> 101 63 <Column Name="DateFinished" Type="System.DateTime" DbType="DateTime" CanBeNull="true" /> … … 107 69 <Association Name="Job_AssignedResource" Member="AssignedResources" ThisKey="JobId" OtherKey="JobId" Type="AssignedResource" /> 108 70 <Association Name="Job_RequiredPlugin" Member="RequiredPlugins" ThisKey="JobId" OtherKey="JobId" Type="RequiredPlugin" /> 109 <Association Name="Job_Job" Member=" Jobs" ThisKey="JobId" OtherKey="ParentJobId" Type="Job" />71 <Association Name="Job_Job" Member="ChildJobs" Storage="_Jobs" ThisKey="JobId" OtherKey="ParentJobId" Type="Job" /> 110 72 <Association Name="Job_JobData" Member="JobData" ThisKey="JobId" OtherKey="JobId" Type="JobData" Cardinality="One" /> 111 <Association Name="Job_Job" Member="Job1" ThisKey="ParentJobId" OtherKey="JobId" Type="Job" IsForeignKey="true" /> 112 <Association Name="Project_Job" Member="Project" ThisKey="ProjectId" OtherKey="ProjectId" Type="Project" IsForeignKey="true" DeleteRule="SET NULL" /> 73 <Association Name="Job_Job" Member="ParentJob" Storage="_Job1" ThisKey="ParentJobId" OtherKey="JobId" Type="Job" IsForeignKey="true" /> 113 74 <Association Name="Slave_Job" Member="Slave" ThisKey="SlaveId" OtherKey="ResourceId" Type="Slave" IsForeignKey="true" DeleteRule="SET NULL" /> 114 75 </Type> … … 133 94 <Column Name="ResourceIds" Type="System.String" DbType="VarChar(MAX)" CanBeNull="true" /> 134 95 <Column Name="UserId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="false" /> 135 <Column Name="RootJobId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" /> 96 <Column Name="RootJobId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="false" /> 97 <Column Name="DateCreated" Type="System.DateTime" DbType="DateTime" CanBeNull="false" /> 136 98 <Association Name="Job_HiveExperiment" Member="RootJob" Storage="_Job" ThisKey="RootJobId" OtherKey="JobId" Type="Job" IsForeignKey="true" DeleteRule="CASCADE" /> 137 99 </Type> … … 141 103 <Column Name="JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" /> 142 104 <Column Name="Data" Type="System.Data.Linq.Binary" DbType="VarBinary(MAX)" CanBeNull="false" UpdateCheck="Never" /> 105 <Column Name="LastUpdate" Type="System.DateTime" DbType="DateTime" CanBeNull="false" /> 143 106 <Association Name="Job_JobData" Member="Job" ThisKey="JobId" OtherKey="JobId" Type="Job" IsForeignKey="true" /> 144 107 </Type> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDataContext.dbml.layout
r4905 r5106 1 1 <?xml version="1.0" encoding="utf-8"?> 2 <ordesignerObjectsDiagram dslVersion="1.0.0.0" absoluteBounds="0, 0, 1 7.25, 12.25" name="HiveDataContext">2 <ordesignerObjectsDiagram dslVersion="1.0.0.0" absoluteBounds="0, 0, 16.25, 12.25" name="HiveDataContext"> 3 3 <DataContextMoniker Name="/HiveDataContext" /> 4 4 <nestedChildShapes> … … 9 9 </nestedChildShapes> 10 10 </classShape> 11 <classShape Id="3176614f-3038-41e5-8e75-cdf99373cb3d" absoluteBounds="4.5, 2.125, 2, 1.5785953776041666">12 <DataClassMoniker Name="/HiveDataContext/UptimeStatistic" />13 <nestedChildShapes>14 <elementListCompartment Id="35235ffe-b21e-49da-b58a-27423444612a" absoluteBounds="4.5150000000000006, 2.5850000000000009, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />15 </nestedChildShapes>16 </classShape>17 <classShape Id="5d9c7dad-8113-49c9-bdfa-c64543554a7b" absoluteBounds="7, 0.75, 2, 1.3862939453125023">18 <DataClassMoniker Name="/HiveDataContext/SlaveConfig" />19 <nestedChildShapes>20 <elementListCompartment Id="c2e15bc8-44cb-42af-b195-b9a30f61af28" absoluteBounds="7.0150000000000006, 1.2100000000000009, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />21 </nestedChildShapes>22 </classShape>23 <classShape Id="7edeab13-5aa7-4b63-8c5e-cae056298001" absoluteBounds="15, 2.875, 2, 1.3862939453125023">24 <DataClassMoniker Name="/HiveDataContext/SlaveGroup_Resource" />25 <nestedChildShapes>26 <elementListCompartment Id="b84f48de-4352-4df2-a7da-ff7cbc1fe702" absoluteBounds="15.015, 3.3350000000000009, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />27 </nestedChildShapes>28 </classShape>29 11 <classShape Id="7d998e56-4fba-41ca-a1a8-1dcdb9068edf" absoluteBounds="9, 10.625, 2, 1.3862939453125005"> 30 12 <DataClassMoniker Name="/HiveDataContext/Plugin" /> 31 13 <nestedChildShapes> 32 14 <elementListCompartment Id="ec4ba325-6dff-4418-baad-59af81ae2024" absoluteBounds="9.015, 11.085, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> 33 </nestedChildShapes>34 </classShape>35 <classShape Id="85f04409-b6e0-4e2f-a140-7191436a806f" absoluteBounds="5, 8.25, 2, 1.1939925130208309">36 <DataClassMoniker Name="/HiveDataContext/Project" />37 <nestedChildShapes>38 <elementListCompartment Id="59e11457-6078-47f4-8ee6-eb2052868699" absoluteBounds="5.0150000000000006, 8.71, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />39 15 </nestedChildShapes> 40 16 </classShape> … … 45 21 </nestedChildShapes> 46 22 </classShape> 47 <classShape Id="706a4581-6daf-4e71-ae2a-87d50b27a051" absoluteBounds="11.75, 0.75, 2, 1. 3862939453125005">23 <classShape Id="706a4581-6daf-4e71-ae2a-87d50b27a051" absoluteBounds="11.75, 0.75, 2, 1.5785953776041666"> 48 24 <DataClassMoniker Name="/HiveDataContext/Resource" /> 49 25 <nestedChildShapes> 50 <elementListCompartment Id="8c24f5bf-2164-4d0f-832e-1730eb0066df" absoluteBounds="11.765, 1.21, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />26 <elementListCompartment Id="8c24f5bf-2164-4d0f-832e-1730eb0066df" absoluteBounds="11.765, 1.21, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> 51 27 </nestedChildShapes> 52 28 </classShape> … … 63 39 </nestedChildShapes> 64 40 </classShape> 65 <classShape Id="e6f840cc-2968-4be1-b234-eef624ccacbb" absoluteBounds="4.875, 6, 2, 1.9631982421875005">41 <classShape Id="e6f840cc-2968-4be1-b234-eef624ccacbb" absoluteBounds="4.875, 6, 2, 2.1554996744791666"> 66 42 <DataClassMoniker Name="/HiveDataContext/HiveExperiment" /> 67 43 <nestedChildShapes> 68 <elementListCompartment Id="0c65d4e1-256a-4a91-9a57-392f25e4de7f" absoluteBounds="4.8900000000000006, 6.4600000000000009, 1.9700000000000002, 1. 4031982421875" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />44 <elementListCompartment Id="0c65d4e1-256a-4a91-9a57-392f25e4de7f" absoluteBounds="4.8900000000000006, 6.4600000000000009, 1.9700000000000002, 1.5954996744791665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> 69 45 </nestedChildShapes> 70 46 </classShape> 71 <classShape Id="26f4edfa-91dd-4941-a058-359f89e567a8" absoluteBounds="9.375, 0.75, 2, 2. 9247054036458326">47 <classShape Id="26f4edfa-91dd-4941-a058-359f89e567a8" absoluteBounds="9.375, 0.75, 2, 2.3478011067708335"> 72 48 <DataClassMoniker Name="/HiveDataContext/Slave" /> 73 49 <nestedChildShapes> 74 <elementListCompartment Id="1e61f36b-08dc-4df7-8594-c9dcd95c0791" absoluteBounds="9.39, 1.21, 1.9700000000000002, 2.364705403645833" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />50 <elementListCompartment Id="1e61f36b-08dc-4df7-8594-c9dcd95c0791" absoluteBounds="9.39, 1.21, 1.9700000000000002, 1.7878011067708333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> 75 51 </nestedChildShapes> 76 52 </classShape> … … 81 57 </nestedChildShapes> 82 58 </classShape> 83 <inheritanceConnector edgePoints="[(11.75 : 1. 44314697265625); (11.375 : 1.44314697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">59 <inheritanceConnector edgePoints="[(11.75 : 1.53929768880208); (11.375 : 1.53929768880208)]" fixedFrom="Algorithm" fixedTo="Algorithm" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62"> 84 60 <nodes> 85 61 <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" /> … … 87 63 </nodes> 88 64 </inheritanceConnector> 89 <inheritanceConnector edgePoints="[(13.75 : 1.15469482421875); (14 : 1.15469482421875)]" fixedFrom=" NotFixed" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">65 <inheritanceConnector edgePoints="[(13.75 : 1.15469482421875); (14 : 1.15469482421875)]" fixedFrom="Algorithm" fixedTo="Algorithm" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62"> 90 66 <nodes> 91 67 <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" /> … … 93 69 </nodes> 94 70 </inheritanceConnector> 95 <associationConnector edgePoints="[(13.25 : 2. 1362939453125); (13.25 : 2.875)]" fixedFrom="NotFixed" fixedTo="NotFixed">71 <associationConnector edgePoints="[(13.25 : 2.32859537760417); (13.25 : 2.875)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 96 72 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_AssignedResource" /> 97 73 <nodes> … … 107 83 </nodes> 108 84 </associationConnector> 109 <associationConnector edgePoints="[(9.375 : 2.93674967447917); (6.5 : 2.93674967447917)]" fixedFrom="NotFixed" fixedTo="NotFixed">110 <AssociationMoniker Name="/HiveDataContext/Slave/Slave_UptimeStatistic" />111 <nodes>112 <classShapeMoniker Id="26f4edfa-91dd-4941-a058-359f89e567a8" />113 <classShapeMoniker Id="3176614f-3038-41e5-8e75-cdf99373cb3d" />114 </nodes>115 </associationConnector>116 <associationConnector edgePoints="[(15.6910576194798 : 1.5593896484375); (15.6910576194798 : 2.875)]" fixedFrom="NotFixed" fixedTo="NotFixed">117 <AssociationMoniker Name="/HiveDataContext/SlaveGroup/SlaveGroup_SlaveGroup_Resource" />118 <nodes>119 <classShapeMoniker Id="bbd91675-92f2-4a69-8429-0950008fc8a4" />120 <classShapeMoniker Id="7edeab13-5aa7-4b63-8c5e-cae056298001" />121 </nodes>122 </associationConnector>123 <associationConnector edgePoints="[(13.75 : 2.1362939453125); (14.125 : 2.5112939453125); (15.3497974555544 : 2.5112939453125); (15.3497974555544 : 2.875)]" fixedFrom="NotFixed" fixedTo="NotFixed">124 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_SlaveGroup_Resource" />125 <nodes>126 <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" />127 <classShapeMoniker Id="7edeab13-5aa7-4b63-8c5e-cae056298001" />128 </nodes>129 </associationConnector>130 85 <associationConnector edgePoints="[(10.25 : 7.87660970052083); (10.25 : 8.875)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 131 86 <AssociationMoniker Name="/HiveDataContext/Job/Job_RequiredPlugin" /> … … 133 88 <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" /> 134 89 <classShapeMoniker Id="97b00810-fa30-457e-b484-b4e80b22f91b" /> 135 </nodes>136 </associationConnector>137 <associationConnector edgePoints="[(9 : 1.44314697265625); (9.375 : 1.44314697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed">138 <AssociationMoniker Name="/HiveDataContext/SlaveConfig/SlaveConfig_Slave" />139 <nodes>140 <classShapeMoniker Id="5d9c7dad-8113-49c9-bdfa-c64543554a7b" />141 <classShapeMoniker Id="26f4edfa-91dd-4941-a058-359f89e567a8" />142 90 </nodes> 143 91 </associationConnector> … … 149 97 </nodes> 150 98 </associationConnector> 151 <associationConnector edgePoints="[(7 : 8.25); (7.875 : 8.125); (7.875 : 8.05644744428109); (8.875 : 8.05644744428109); (8.875 : 8.25160970052083); (9.25 : 7.87660970052083)]" manuallyRouted="true" fixedFrom="NotFixed" fixedTo="NotFixed"> 152 <AssociationMoniker Name="/HiveDataContext/Project/Project_Job" /> 153 <nodes> 154 <classShapeMoniker Id="85f04409-b6e0-4e2f-a140-7191436a806f" /> 155 <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" /> 156 </nodes> 157 </associationConnector> 158 <associationConnector edgePoints="[(10.3125 : 3.67470540364583); (10.3125 : 4.375)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 99 <associationConnector edgePoints="[(10.3125 : 3.09780110677083); (10.3125 : 4.375)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 159 100 <AssociationMoniker Name="/HiveDataContext/Slave/Slave_Job" /> 160 101 <nodes> … … 163 104 </nodes> 164 105 </associationConnector> 165 <associationConnector edgePoints="[(12.21875 : 2. 1362939453125); (12.21875 : 4.625)]" fixedFrom="NotFixed" fixedTo="NotFixed">106 <associationConnector edgePoints="[(12.21875 : 2.32859537760417); (12.21875 : 4.625)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 166 107 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_UptimeCalendar" /> 167 108 <nodes> … … 170 111 </nodes> 171 112 </associationConnector> 172 <associationConnector edgePoints="[(9.25 : 6. 71875); (6.875 : 6.71875)]" fixedFrom="NotFixed" fixedTo="NotFixed">113 <associationConnector edgePoints="[(9.25 : 6.93830485026042); (6.875 : 6.93830485026042)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 173 114 <AssociationMoniker Name="/HiveDataContext/Job/Job_HiveExperiment" /> 174 115 <nodes> … … 177 118 </nodes> 178 119 </associationConnector> 179 <classShape Id="6bc13f26-f9a8-4597-b054-35be34190d12" absoluteBounds="6.875, 4.375, 2, 1. 1939925130208327">120 <classShape Id="6bc13f26-f9a8-4597-b054-35be34190d12" absoluteBounds="6.875, 4.375, 2, 1.3862939453124996"> 180 121 <DataClassMoniker Name="/HiveDataContext/JobData" /> 181 122 <nestedChildShapes> 182 <elementListCompartment Id="a068522c-7974-4679-b356-e33c941c465b" absoluteBounds="6.89, 4.835, 1.9700000000000002, 0. 63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />123 <elementListCompartment Id="a068522c-7974-4679-b356-e33c941c465b" absoluteBounds="6.89, 4.835, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> 183 124 </nestedChildShapes> 184 125 </classShape> … … 189 130 </nestedChildShapes> 190 131 </classShape> 191 <associationConnector edgePoints="[(11 : 11.2219962565104); (11.5 : 11.2219962565104)]" fixedFrom=" Algorithm" fixedTo="Algorithm">132 <associationConnector edgePoints="[(11 : 11.2219962565104); (11.5 : 11.2219962565104)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 192 133 <AssociationMoniker Name="/HiveDataContext/Plugin/Plugin_PluginData" /> 193 134 <nodes> … … 196 137 </nodes> 197 138 </associationConnector> 198 <associationConnector edgePoints="[(9.25 : 4.97199625651042); (8.875 : 4.97199625651042)]" fixedFrom="NotFixed" fixedTo="NotFixed">139 <associationConnector edgePoints="[(9.25 : 5.06814697265625); (8.875 : 5.06814697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 199 140 <AssociationMoniker Name="/HiveDataContext/Job/Job_JobData" /> 200 141 <nodes> … … 203 144 </nodes> 204 145 </associationConnector> 205 <associationConnector edgePoints="[(10.125 : 10.625); (10.125 : 10.2612939453125)]" fixedFrom=" Algorithm" fixedTo="Algorithm">146 <associationConnector edgePoints="[(10.125 : 10.625); (10.125 : 10.2612939453125)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 206 147 <AssociationMoniker Name="/HiveDataContext/Plugin/Plugin_RequiredPlugin" /> 207 148 <nodes> … … 210 151 </nodes> 211 152 </associationConnector> 153 <associationConnector edgePoints="[(12.4524234637921 : 0.75); (12.4524234637921 : 0.5); (13.0617468474559 : 0.5); (13.0617468474559 : 0.75)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 154 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_Resource" /> 155 <nodes> 156 <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" /> 157 <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" /> 158 </nodes> 159 </associationConnector> 212 160 </nestedChildShapes> 213 161 </ordesignerObjectsDiagram> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDataContext.designer.cs
r4905 r5106 34 34 partial void UpdateAssignedResource(AssignedResource instance); 35 35 partial void DeleteAssignedResource(AssignedResource instance); 36 partial void InsertUptimeStatistic(UptimeStatistic instance);37 partial void UpdateUptimeStatistic(UptimeStatistic instance);38 partial void DeleteUptimeStatistic(UptimeStatistic instance);39 partial void InsertSlaveConfig(SlaveConfig instance);40 partial void UpdateSlaveConfig(SlaveConfig instance);41 partial void DeleteSlaveConfig(SlaveConfig instance);42 partial void InsertSlaveGroup_Resource(SlaveGroup_Resource instance);43 partial void UpdateSlaveGroup_Resource(SlaveGroup_Resource instance);44 partial void DeleteSlaveGroup_Resource(SlaveGroup_Resource instance);45 36 partial void InsertPlugin(Plugin instance); 46 37 partial void UpdatePlugin(Plugin instance); 47 38 partial void DeletePlugin(Plugin instance); 48 partial void InsertProject(Project instance);49 partial void UpdateProject(Project instance);50 partial void DeleteProject(Project instance);51 39 partial void InsertRequiredPlugin(RequiredPlugin instance); 52 40 partial void UpdateRequiredPlugin(RequiredPlugin instance); … … 101 89 } 102 90 103 public System.Data.Linq.Table<UptimeStatistic> UptimeStatistics104 {105 get106 {107 return this.GetTable<UptimeStatistic>();108 }109 }110 111 public System.Data.Linq.Table<SlaveConfig> SlaveConfigs112 {113 get114 {115 return this.GetTable<SlaveConfig>();116 }117 }118 119 public System.Data.Linq.Table<SlaveGroup_Resource> SlaveGroup_Resources120 {121 get122 {123 return this.GetTable<SlaveGroup_Resource>();124 }125 }126 127 91 public System.Data.Linq.Table<Plugin> Plugins 128 92 { … … 130 94 { 131 95 return this.GetTable<Plugin>(); 132 }133 }134 135 public System.Data.Linq.Table<Project> Projects136 {137 get138 {139 return this.GetTable<Project>();140 96 } 141 97 } … … 390 346 } 391 347 392 [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.UptimeStatistics")]393 public partial class UptimeStatistic : INotifyPropertyChanging, INotifyPropertyChanged394 {395 396 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);397 398 private System.Guid _UptimeStatisticsId;399 400 private System.DateTime _Login;401 402 private System.DateTime _Logout;403 404 private System.Guid _ResourceId;405 406 private EntityRef<Slave> _Slave;407 408 #region Extensibility Method Definitions409 partial void OnLoaded();410 partial void OnValidate(System.Data.Linq.ChangeAction action);411 partial void OnCreated();412 partial void OnUptimeStatisticsIdChanging(System.Guid value);413 partial void OnUptimeStatisticsIdChanged();414 partial void OnLoginChanging(System.DateTime value);415 partial void OnLoginChanged();416 partial void OnLogoutChanging(System.DateTime value);417 partial void OnLogoutChanged();418 partial void OnResourceIdChanging(System.Guid value);419 partial void OnResourceIdChanged();420 #endregion421 422 public UptimeStatistic()423 {424 this._Slave = default(EntityRef<Slave>);425 OnCreated();426 }427 428 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UptimeStatisticsId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]429 public System.Guid UptimeStatisticsId430 {431 get432 {433 return this._UptimeStatisticsId;434 }435 set436 {437 if ((this._UptimeStatisticsId != value))438 {439 this.OnUptimeStatisticsIdChanging(value);440 this.SendPropertyChanging();441 this._UptimeStatisticsId = value;442 this.SendPropertyChanged("UptimeStatisticsId");443 this.OnUptimeStatisticsIdChanged();444 }445 }446 }447 448 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Login", DbType="DateTime")]449 public System.DateTime Login450 {451 get452 {453 return this._Login;454 }455 set456 {457 if ((this._Login != value))458 {459 this.OnLoginChanging(value);460 this.SendPropertyChanging();461 this._Login = value;462 this.SendPropertyChanged("Login");463 this.OnLoginChanged();464 }465 }466 }467 468 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Logout", DbType="DateTime")]469 public System.DateTime Logout470 {471 get472 {473 return this._Logout;474 }475 set476 {477 if ((this._Logout != value))478 {479 this.OnLogoutChanging(value);480 this.SendPropertyChanging();481 this._Logout = value;482 this.SendPropertyChanged("Logout");483 this.OnLogoutChanged();484 }485 }486 }487 488 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", DbType="UniqueIdentifier")]489 public System.Guid ResourceId490 {491 get492 {493 return this._ResourceId;494 }495 set496 {497 if ((this._ResourceId != value))498 {499 if (this._Slave.HasLoadedOrAssignedValue)500 {501 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();502 }503 this.OnResourceIdChanging(value);504 this.SendPropertyChanging();505 this._ResourceId = value;506 this.SendPropertyChanged("ResourceId");507 this.OnResourceIdChanged();508 }509 }510 }511 512 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Slave_UptimeStatistic", Storage="_Slave", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="SET NULL")]513 public Slave Slave514 {515 get516 {517 return this._Slave.Entity;518 }519 set520 {521 Slave previousValue = this._Slave.Entity;522 if (((previousValue != value)523 || (this._Slave.HasLoadedOrAssignedValue == false)))524 {525 this.SendPropertyChanging();526 if ((previousValue != null))527 {528 this._Slave.Entity = null;529 previousValue.UptimeStatistics.Remove(this);530 }531 this._Slave.Entity = value;532 if ((value != null))533 {534 value.UptimeStatistics.Add(this);535 this._ResourceId = value.ResourceId;536 }537 else538 {539 this._ResourceId = default(System.Guid);540 }541 this.SendPropertyChanged("Slave");542 }543 }544 }545 546 public event PropertyChangingEventHandler PropertyChanging;547 548 public event PropertyChangedEventHandler PropertyChanged;549 550 protected virtual void SendPropertyChanging()551 {552 if ((this.PropertyChanging != null))553 {554 this.PropertyChanging(this, emptyChangingEventArgs);555 }556 }557 558 protected virtual void SendPropertyChanged(String propertyName)559 {560 if ((this.PropertyChanged != null))561 {562 this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));563 }564 }565 }566 567 [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.SlaveConfig")]568 public partial class SlaveConfig : INotifyPropertyChanging, INotifyPropertyChanged569 {570 571 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);572 573 private System.Guid _SlaveConfigId;574 575 private System.Xml.Linq.XElement _UpDownTimeCalendar;576 577 private System.Nullable<int> _HeartBeatIntervall;578 579 private EntitySet<Slave> _Slaves;580 581 #region Extensibility Method Definitions582 partial void OnLoaded();583 partial void OnValidate(System.Data.Linq.ChangeAction action);584 partial void OnCreated();585 partial void OnSlaveConfigIdChanging(System.Guid value);586 partial void OnSlaveConfigIdChanged();587 partial void OnUpDownTimeCalendarChanging(System.Xml.Linq.XElement value);588 partial void OnUpDownTimeCalendarChanged();589 partial void OnHeartBeatIntervallChanging(System.Nullable<int> value);590 partial void OnHeartBeatIntervallChanged();591 #endregion592 593 public SlaveConfig()594 {595 this._Slaves = new EntitySet<Slave>(new Action<Slave>(this.attach_Slaves), new Action<Slave>(this.detach_Slaves));596 OnCreated();597 }598 599 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SlaveConfigId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]600 public System.Guid SlaveConfigId601 {602 get603 {604 return this._SlaveConfigId;605 }606 set607 {608 if ((this._SlaveConfigId != value))609 {610 this.OnSlaveConfigIdChanging(value);611 this.SendPropertyChanging();612 this._SlaveConfigId = value;613 this.SendPropertyChanged("SlaveConfigId");614 this.OnSlaveConfigIdChanged();615 }616 }617 }618 619 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpDownTimeCalendar", DbType="Xml", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]620 public System.Xml.Linq.XElement UpDownTimeCalendar621 {622 get623 {624 return this._UpDownTimeCalendar;625 }626 set627 {628 if ((this._UpDownTimeCalendar != value))629 {630 this.OnUpDownTimeCalendarChanging(value);631 this.SendPropertyChanging();632 this._UpDownTimeCalendar = value;633 this.SendPropertyChanged("UpDownTimeCalendar");634 this.OnUpDownTimeCalendarChanged();635 }636 }637 }638 639 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HeartBeatIntervall", DbType="Int")]640 public System.Nullable<int> HeartBeatIntervall641 {642 get643 {644 return this._HeartBeatIntervall;645 }646 set647 {648 if ((this._HeartBeatIntervall != value))649 {650 this.OnHeartBeatIntervallChanging(value);651 this.SendPropertyChanging();652 this._HeartBeatIntervall = value;653 this.SendPropertyChanged("HeartBeatIntervall");654 this.OnHeartBeatIntervallChanged();655 }656 }657 }658 659 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="SlaveConfig_Slave", Storage="_Slaves", ThisKey="SlaveConfigId", OtherKey="SlaveConfigId")]660 public EntitySet<Slave> Slaves661 {662 get663 {664 return this._Slaves;665 }666 set667 {668 this._Slaves.Assign(value);669 }670 }671 672 public event PropertyChangingEventHandler PropertyChanging;673 674 public event PropertyChangedEventHandler PropertyChanged;675 676 protected virtual void SendPropertyChanging()677 {678 if ((this.PropertyChanging != null))679 {680 this.PropertyChanging(this, emptyChangingEventArgs);681 }682 }683 684 protected virtual void SendPropertyChanged(String propertyName)685 {686 if ((this.PropertyChanged != null))687 {688 this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));689 }690 }691 692 private void attach_Slaves(Slave entity)693 {694 this.SendPropertyChanging();695 entity.SlaveConfig = this;696 }697 698 private void detach_Slaves(Slave entity)699 {700 this.SendPropertyChanging();701 entity.SlaveConfig = null;702 }703 }704 705 [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.SlaveGroup_Resource")]706 public partial class SlaveGroup_Resource : INotifyPropertyChanging, INotifyPropertyChanged707 {708 709 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);710 711 private System.Guid _SlaveGroup_RessourceId;712 713 private System.Guid _SlaveGroupId;714 715 private System.Guid _ResourceId;716 717 private EntityRef<SlaveGroup> _SlaveGroup;718 719 private EntityRef<Resource> _Resource;720 721 #region Extensibility Method Definitions722 partial void OnLoaded();723 partial void OnValidate(System.Data.Linq.ChangeAction action);724 partial void OnCreated();725 partial void OnSlaveGroup_RessourceIdChanging(System.Guid value);726 partial void OnSlaveGroup_RessourceIdChanged();727 partial void OnSlaveGroupIdChanging(System.Guid value);728 partial void OnSlaveGroupIdChanged();729 partial void OnResourceIdChanging(System.Guid value);730 partial void OnResourceIdChanged();731 #endregion732 733 public SlaveGroup_Resource()734 {735 this._SlaveGroup = default(EntityRef<SlaveGroup>);736 this._Resource = default(EntityRef<Resource>);737 OnCreated();738 }739 740 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SlaveGroup_RessourceId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]741 public System.Guid SlaveGroup_RessourceId742 {743 get744 {745 return this._SlaveGroup_RessourceId;746 }747 set748 {749 if ((this._SlaveGroup_RessourceId != value))750 {751 this.OnSlaveGroup_RessourceIdChanging(value);752 this.SendPropertyChanging();753 this._SlaveGroup_RessourceId = value;754 this.SendPropertyChanged("SlaveGroup_RessourceId");755 this.OnSlaveGroup_RessourceIdChanged();756 }757 }758 }759 760 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SlaveGroupId", DbType="UniqueIdentifier NOT NULL")]761 public System.Guid SlaveGroupId762 {763 get764 {765 return this._SlaveGroupId;766 }767 set768 {769 if ((this._SlaveGroupId != value))770 {771 if (this._SlaveGroup.HasLoadedOrAssignedValue)772 {773 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();774 }775 this.OnSlaveGroupIdChanging(value);776 this.SendPropertyChanging();777 this._SlaveGroupId = value;778 this.SendPropertyChanged("SlaveGroupId");779 this.OnSlaveGroupIdChanged();780 }781 }782 }783 784 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL")]785 public System.Guid ResourceId786 {787 get788 {789 return this._ResourceId;790 }791 set792 {793 if ((this._ResourceId != value))794 {795 if (this._Resource.HasLoadedOrAssignedValue)796 {797 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();798 }799 this.OnResourceIdChanging(value);800 this.SendPropertyChanging();801 this._ResourceId = value;802 this.SendPropertyChanged("ResourceId");803 this.OnResourceIdChanged();804 }805 }806 }807 808 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="SlaveGroup_SlaveGroup_Resource", Storage="_SlaveGroup", ThisKey="SlaveGroupId", OtherKey="ResourceId", IsForeignKey=true)]809 public SlaveGroup SlaveGroup810 {811 get812 {813 return this._SlaveGroup.Entity;814 }815 set816 {817 SlaveGroup previousValue = this._SlaveGroup.Entity;818 if (((previousValue != value)819 || (this._SlaveGroup.HasLoadedOrAssignedValue == false)))820 {821 this.SendPropertyChanging();822 if ((previousValue != null))823 {824 this._SlaveGroup.Entity = null;825 previousValue.SlaveGroup_Resources_Children.Remove(this);826 }827 this._SlaveGroup.Entity = value;828 if ((value != null))829 {830 value.SlaveGroup_Resources_Children.Add(this);831 this._SlaveGroupId = value.ResourceId;832 }833 else834 {835 this._SlaveGroupId = default(System.Guid);836 }837 this.SendPropertyChanged("SlaveGroup");838 }839 }840 }841 842 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_SlaveGroup_Resource", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="CASCADE")]843 public Resource Resource844 {845 get846 {847 return this._Resource.Entity;848 }849 set850 {851 Resource previousValue = this._Resource.Entity;852 if (((previousValue != value)853 || (this._Resource.HasLoadedOrAssignedValue == false)))854 {855 this.SendPropertyChanging();856 if ((previousValue != null))857 {858 this._Resource.Entity = null;859 previousValue.SlaveGroup_Resources_Parents.Remove(this);860 }861 this._Resource.Entity = value;862 if ((value != null))863 {864 value.SlaveGroup_Resources_Parents.Add(this);865 this._ResourceId = value.ResourceId;866 }867 else868 {869 this._ResourceId = default(System.Guid);870 }871 this.SendPropertyChanged("Resource");872 }873 }874 }875 876 public event PropertyChangingEventHandler PropertyChanging;877 878 public event PropertyChangedEventHandler PropertyChanged;879 880 protected virtual void SendPropertyChanging()881 {882 if ((this.PropertyChanging != null))883 {884 this.PropertyChanging(this, emptyChangingEventArgs);885 }886 }887 888 protected virtual void SendPropertyChanged(String propertyName)889 {890 if ((this.PropertyChanged != null))891 {892 this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));893 }894 }895 }896 897 348 [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Plugin")] 898 349 public partial class Plugin : INotifyPropertyChanging, INotifyPropertyChanged … … 1033 484 } 1034 485 1035 [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Project")]1036 public partial class Project : INotifyPropertyChanging, INotifyPropertyChanged1037 {1038 1039 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);1040 1041 private System.Guid _ProjectId;1042 1043 private string _Name;1044 1045 private EntitySet<Job> _Jobs;1046 1047 #region Extensibility Method Definitions1048 partial void OnLoaded();1049 partial void OnValidate(System.Data.Linq.ChangeAction action);1050 partial void OnCreated();1051 partial void OnProjectIdChanging(System.Guid value);1052 partial void OnProjectIdChanged();1053 partial void OnNameChanging(string value);1054 partial void OnNameChanged();1055 #endregion1056 1057 public Project()1058 {1059 this._Jobs = new EntitySet<Job>(new Action<Job>(this.attach_Jobs), new Action<Job>(this.detach_Jobs));1060 OnCreated();1061 }1062 1063 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]1064 public System.Guid ProjectId1065 {1066 get1067 {1068 return this._ProjectId;1069 }1070 set1071 {1072 if ((this._ProjectId != value))1073 {1074 this.OnProjectIdChanging(value);1075 this.SendPropertyChanging();1076 this._ProjectId = value;1077 this.SendPropertyChanged("ProjectId");1078 this.OnProjectIdChanged();1079 }1080 }1081 }1082 1083 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="VarChar(MAX)", CanBeNull=false)]1084 public string Name1085 {1086 get1087 {1088 return this._Name;1089 }1090 set1091 {1092 if ((this._Name != value))1093 {1094 this.OnNameChanging(value);1095 this.SendPropertyChanging();1096 this._Name = value;1097 this.SendPropertyChanged("Name");1098 this.OnNameChanged();1099 }1100 }1101 }1102 1103 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_Job", Storage="_Jobs", ThisKey="ProjectId", OtherKey="ProjectId")]1104 public EntitySet<Job> Jobs1105 {1106 get1107 {1108 return this._Jobs;1109 }1110 set1111 {1112 this._Jobs.Assign(value);1113 }1114 }1115 1116 public event PropertyChangingEventHandler PropertyChanging;1117 1118 public event PropertyChangedEventHandler PropertyChanged;1119 1120 protected virtual void SendPropertyChanging()1121 {1122 if ((this.PropertyChanging != null))1123 {1124 this.PropertyChanging(this, emptyChangingEventArgs);1125 }1126 }1127 1128 protected virtual void SendPropertyChanged(String propertyName)1129 {1130 if ((this.PropertyChanged != null))1131 {1132 this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));1133 }1134 }1135 1136 private void attach_Jobs(Job entity)1137 {1138 this.SendPropertyChanging();1139 entity.Project = this;1140 }1141 1142 private void detach_Jobs(Job entity)1143 {1144 this.SendPropertyChanging();1145 entity.Project = null;1146 }1147 }1148 1149 486 [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.RequiredPlugins")] 1150 487 public partial class RequiredPlugin : INotifyPropertyChanging, INotifyPropertyChanged … … 1354 691 private string _ResourceType; 1355 692 693 private System.Nullable<System.Guid> _ParentResourceId; 694 1356 695 private EntitySet<AssignedResource> _AssignedResources; 1357 696 1358 private EntitySet<SlaveGroup_Resource> _SlaveGroup_Resources_Parents;1359 1360 697 private EntitySet<UptimeCalendar> _UptimeCalendars; 698 699 private EntitySet<Resource> _ChildResources; 700 701 private EntityRef<Resource> _ParentResource; 1361 702 1362 703 #region Extensibility Method Definitions … … 1370 711 partial void OnResourceTypeChanging(string value); 1371 712 partial void OnResourceTypeChanged(); 713 partial void OnParentResourceIdChanging(System.Nullable<System.Guid> value); 714 partial void OnParentResourceIdChanged(); 1372 715 #endregion 1373 716 … … 1375 718 { 1376 719 this._AssignedResources = new EntitySet<AssignedResource>(new Action<AssignedResource>(this.attach_AssignedResources), new Action<AssignedResource>(this.detach_AssignedResources)); 1377 this._SlaveGroup_Resources_Parents = new EntitySet<SlaveGroup_Resource>(new Action<SlaveGroup_Resource>(this.attach_SlaveGroup_Resources_Parents), new Action<SlaveGroup_Resource>(this.detach_SlaveGroup_Resources_Parents));1378 720 this._UptimeCalendars = new EntitySet<UptimeCalendar>(new Action<UptimeCalendar>(this.attach_UptimeCalendars), new Action<UptimeCalendar>(this.detach_UptimeCalendars)); 721 this._ChildResources = new EntitySet<Resource>(new Action<Resource>(this.attach_ChildResources), new Action<Resource>(this.detach_ChildResources)); 722 this._ParentResource = default(EntityRef<Resource>); 1379 723 OnCreated(); 1380 724 } 1381 725 1382 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true )]726 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)] 1383 727 public System.Guid ResourceId 1384 728 { … … 1440 784 } 1441 785 786 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ParentResourceId", DbType="UniqueIdentifier")] 787 public System.Nullable<System.Guid> ParentResourceId 788 { 789 get 790 { 791 return this._ParentResourceId; 792 } 793 set 794 { 795 if ((this._ParentResourceId != value)) 796 { 797 if (this._ParentResource.HasLoadedOrAssignedValue) 798 { 799 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); 800 } 801 this.OnParentResourceIdChanging(value); 802 this.SendPropertyChanging(); 803 this._ParentResourceId = value; 804 this.SendPropertyChanged("ParentResourceId"); 805 this.OnParentResourceIdChanged(); 806 } 807 } 808 } 809 1442 810 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedResource", Storage="_AssignedResources", ThisKey="ResourceId", OtherKey="ResourceId")] 1443 811 public EntitySet<AssignedResource> AssignedResources … … 1453 821 } 1454 822 1455 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_SlaveGroup_Resource", Storage="_SlaveGroup_Resources_Parents", ThisKey="ResourceId", OtherKey="ResourceId")]1456 public EntitySet<SlaveGroup_Resource> SlaveGroup_Resources_Parents1457 {1458 get1459 {1460 return this._SlaveGroup_Resources_Parents;1461 }1462 set1463 {1464 this._SlaveGroup_Resources_Parents.Assign(value);1465 }1466 }1467 1468 823 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_UptimeCalendar", Storage="_UptimeCalendars", ThisKey="ResourceId", OtherKey="ResourceId")] 1469 824 public EntitySet<UptimeCalendar> UptimeCalendars … … 1479 834 } 1480 835 836 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_Resource", Storage="_ChildResources", ThisKey="ResourceId", OtherKey="ParentResourceId")] 837 public EntitySet<Resource> ChildResources 838 { 839 get 840 { 841 return this._ChildResources; 842 } 843 set 844 { 845 this._ChildResources.Assign(value); 846 } 847 } 848 849 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_Resource", Storage="_ParentResource", ThisKey="ParentResourceId", OtherKey="ResourceId", IsForeignKey=true)] 850 public Resource ParentResource 851 { 852 get 853 { 854 return this._ParentResource.Entity; 855 } 856 set 857 { 858 Resource previousValue = this._ParentResource.Entity; 859 if (((previousValue != value) 860 || (this._ParentResource.HasLoadedOrAssignedValue == false))) 861 { 862 this.SendPropertyChanging(); 863 if ((previousValue != null)) 864 { 865 this._ParentResource.Entity = null; 866 previousValue.ChildResources.Remove(this); 867 } 868 this._ParentResource.Entity = value; 869 if ((value != null)) 870 { 871 value.ChildResources.Add(this); 872 this._ParentResourceId = value.ResourceId; 873 } 874 else 875 { 876 this._ParentResourceId = default(Nullable<System.Guid>); 877 } 878 this.SendPropertyChanged("ParentResource"); 879 } 880 } 881 } 882 1481 883 public event PropertyChangingEventHandler PropertyChanging; 1482 884 … … 1511 913 } 1512 914 1513 private void attach_ SlaveGroup_Resources_Parents(SlaveGroup_Resourceentity)915 private void attach_UptimeCalendars(UptimeCalendar entity) 1514 916 { 1515 917 this.SendPropertyChanging(); … … 1517 919 } 1518 920 1519 private void detach_ SlaveGroup_Resources_Parents(SlaveGroup_Resourceentity)921 private void detach_UptimeCalendars(UptimeCalendar entity) 1520 922 { 1521 923 this.SendPropertyChanging(); … … 1523 925 } 1524 926 1525 private void attach_ UptimeCalendars(UptimeCalendarentity)927 private void attach_ChildResources(Resource entity) 1526 928 { 1527 929 this.SendPropertyChanging(); 1528 entity. Resource = this;1529 } 1530 1531 private void detach_ UptimeCalendars(UptimeCalendarentity)930 entity.ParentResource = this; 931 } 932 933 private void detach_ChildResources(Resource entity) 1532 934 { 1533 935 this.SendPropertyChanging(); 1534 entity. Resource = null;936 entity.ParentResource = null; 1535 937 } 1536 938 } … … 1547 949 private global::HeuristicLab.Services.Hive.Common.DataTransfer.SlaveState _Status; 1548 950 1549 private global::HeuristicLab.Services.Hive.Common.DataTransfer.CalendarState _CalendarSyncStatus;1550 1551 private System.Nullable<System.Guid> _UseCalendarFromResourceId;1552 1553 private System.Nullable<System.Guid> _SlaveConfigId;1554 1555 951 private System.Nullable<int> _NumberOfCores; 1556 952 … … 1561 957 private bool _IsAllowedToCalculate; 1562 958 1563 private EntitySet<UptimeStatistic> _UptimeStatistics;1564 1565 959 private EntitySet<Job> _Jobs; 1566 1567 private EntityRef<SlaveConfig> _SlaveConfig;1568 960 1569 961 #region Extensibility Method Definitions … … 1579 971 partial void OnSlaveStateChanging(global::HeuristicLab.Services.Hive.Common.DataTransfer.SlaveState value); 1580 972 partial void OnSlaveStateChanged(); 1581 partial void OnCalendarSyncStateChanging(global::HeuristicLab.Services.Hive.Common.DataTransfer.CalendarState value);1582 partial void OnCalendarSyncStateChanged();1583 partial void OnUseCalendarFromResourceIdChanging(System.Nullable<System.Guid> value);1584 partial void OnUseCalendarFromResourceIdChanged();1585 partial void OnSlaveConfigIdChanging(System.Nullable<System.Guid> value);1586 partial void OnSlaveConfigIdChanged();1587 973 partial void OnCoresChanging(System.Nullable<int> value); 1588 974 partial void OnCoresChanged(); … … 1597 983 public Slave() 1598 984 { 1599 this._UptimeStatistics = new EntitySet<UptimeStatistic>(new Action<UptimeStatistic>(this.attach_UptimeStatistics), new Action<UptimeStatistic>(this.detach_UptimeStatistics));1600 985 this._Jobs = new EntitySet<Job>(new Action<Job>(this.attach_Jobs), new Action<Job>(this.detach_Jobs)); 1601 this._SlaveConfig = default(EntityRef<SlaveConfig>);1602 986 OnCreated(); 1603 987 } … … 1683 1067 } 1684 1068 1685 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalendarSyncStatus", DbType="VarChar(MAX)", CanBeNull=true)]1686 public global::HeuristicLab.Services.Hive.Common.DataTransfer.CalendarState CalendarSyncState1687 {1688 get1689 {1690 return this._CalendarSyncStatus;1691 }1692 set1693 {1694 if ((this._CalendarSyncStatus != value))1695 {1696 this.OnCalendarSyncStateChanging(value);1697 this.SendPropertyChanging();1698 this._CalendarSyncStatus = value;1699 this.SendPropertyChanged("CalendarSyncState");1700 this.OnCalendarSyncStateChanged();1701 }1702 }1703 }1704 1705 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UseCalendarFromResourceId", DbType="UniqueIdentifier")]1706 public System.Nullable<System.Guid> UseCalendarFromResourceId1707 {1708 get1709 {1710 return this._UseCalendarFromResourceId;1711 }1712 set1713 {1714 if ((this._UseCalendarFromResourceId != value))1715 {1716 this.OnUseCalendarFromResourceIdChanging(value);1717 this.SendPropertyChanging();1718 this._UseCalendarFromResourceId = value;1719 this.SendPropertyChanged("UseCalendarFromResourceId");1720 this.OnUseCalendarFromResourceIdChanged();1721 }1722 }1723 }1724 1725 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SlaveConfigId", DbType="UniqueIdentifier")]1726 public System.Nullable<System.Guid> SlaveConfigId1727 {1728 get1729 {1730 return this._SlaveConfigId;1731 }1732 set1733 {1734 if ((this._SlaveConfigId != value))1735 {1736 if (this._SlaveConfig.HasLoadedOrAssignedValue)1737 {1738 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();1739 }1740 this.OnSlaveConfigIdChanging(value);1741 this.SendPropertyChanging();1742 this._SlaveConfigId = value;1743 this.SendPropertyChanged("SlaveConfigId");1744 this.OnSlaveConfigIdChanged();1745 }1746 }1747 }1748 1749 1069 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumberOfCores", DbType="Int")] 1750 1070 public System.Nullable<int> Cores … … 1827 1147 } 1828 1148 1829 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Slave_UptimeStatistic", Storage="_UptimeStatistics", ThisKey="ResourceId", OtherKey="ResourceId")]1830 public EntitySet<UptimeStatistic> UptimeStatistics1831 {1832 get1833 {1834 return this._UptimeStatistics;1835 }1836 set1837 {1838 this._UptimeStatistics.Assign(value);1839 }1840 }1841 1842 1149 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Slave_Job", Storage="_Jobs", ThisKey="ResourceId", OtherKey="SlaveId")] 1843 1150 public EntitySet<Job> Jobs … … 1851 1158 this._Jobs.Assign(value); 1852 1159 } 1853 }1854 1855 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="SlaveConfig_Slave", Storage="_SlaveConfig", ThisKey="SlaveConfigId", OtherKey="SlaveConfigId", IsForeignKey=true, DeleteRule="SET NULL")]1856 public SlaveConfig SlaveConfig1857 {1858 get1859 {1860 return this._SlaveConfig.Entity;1861 }1862 set1863 {1864 SlaveConfig previousValue = this._SlaveConfig.Entity;1865 if (((previousValue != value)1866 || (this._SlaveConfig.HasLoadedOrAssignedValue == false)))1867 {1868 this.SendPropertyChanging();1869 if ((previousValue != null))1870 {1871 this._SlaveConfig.Entity = null;1872 previousValue.Slaves.Remove(this);1873 }1874 this._SlaveConfig.Entity = value;1875 if ((value != null))1876 {1877 value.Slaves.Add(this);1878 this._SlaveConfigId = value.SlaveConfigId;1879 }1880 else1881 {1882 this._SlaveConfigId = default(Nullable<System.Guid>);1883 }1884 this.SendPropertyChanged("SlaveConfig");1885 }1886 }1887 }1888 1889 private void attach_UptimeStatistics(UptimeStatistic entity)1890 {1891 this.SendPropertyChanging();1892 entity.Slave = this;1893 }1894 1895 private void detach_UptimeStatistics(UptimeStatistic entity)1896 {1897 this.SendPropertyChanging();1898 entity.Slave = null;1899 1160 } 1900 1161 … … 1914 1175 public partial class SlaveGroup : Resource 1915 1176 { 1916 1917 private EntitySet<SlaveGroup_Resource> _SlaveGroup_Resources_Children;1918 1177 1919 1178 #region Extensibility Method Definitions … … 1925 1184 public SlaveGroup() 1926 1185 { 1927 this._SlaveGroup_Resources_Children = new EntitySet<SlaveGroup_Resource>(new Action<SlaveGroup_Resource>(this.attach_SlaveGroup_Resources_Children), new Action<SlaveGroup_Resource>(this.detach_SlaveGroup_Resources_Children));1928 1186 OnCreated(); 1929 }1930 1931 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="SlaveGroup_SlaveGroup_Resource", Storage="_SlaveGroup_Resources_Children", ThisKey="ResourceId", OtherKey="SlaveGroupId")]1932 public EntitySet<SlaveGroup_Resource> SlaveGroup_Resources_Children1933 {1934 get1935 {1936 return this._SlaveGroup_Resources_Children;1937 }1938 set1939 {1940 this._SlaveGroup_Resources_Children.Assign(value);1941 }1942 }1943 1944 private void attach_SlaveGroup_Resources_Children(SlaveGroup_Resource entity)1945 {1946 this.SendPropertyChanging();1947 entity.SlaveGroup = this;1948 }1949 1950 private void detach_SlaveGroup_Resources_Children(SlaveGroup_Resource entity)1951 {1952 this.SendPropertyChanging();1953 entity.SlaveGroup = null;1954 1187 } 1955 1188 } … … 1973 1206 private string _Exception; 1974 1207 1975 private System. Nullable<System.DateTime>_DateCreated;1208 private System.DateTime _DateCreated; 1976 1209 1977 1210 private System.Nullable<System.DateTime> _DateCalculated; … … 1998 1231 1999 1232 private EntityRef<Job> _Job1; 2000 2001 private EntityRef<Project> _Project;2002 1233 2003 1234 private EntityRef<Slave> _Slave; … … 2019 1250 partial void OnExceptionChanging(string value); 2020 1251 partial void OnExceptionChanged(); 2021 partial void OnDateCreatedChanging(System. Nullable<System.DateTime>value);1252 partial void OnDateCreatedChanging(System.DateTime value); 2022 1253 partial void OnDateCreatedChanged(); 2023 1254 partial void OnDateCalculatedChanging(System.Nullable<System.DateTime> value); … … 2044 1275 this._JobData = default(EntityRef<JobData>); 2045 1276 this._Job1 = default(EntityRef<Job>); 2046 this._Project = default(EntityRef<Project>);2047 1277 this._Slave = default(EntityRef<Slave>); 2048 1278 OnCreated(); … … 2174 1404 2175 1405 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCreated", DbType="DateTime")] 2176 public System. Nullable<System.DateTime>DateCreated1406 public System.DateTime DateCreated 2177 1407 { 2178 1408 get … … 2264 1494 if ((this._ProjectId != value)) 2265 1495 { 2266 if (this._Project.HasLoadedOrAssignedValue)2267 {2268 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();2269 }2270 1496 this.OnProjectIdChanging(value); 2271 1497 this.SendPropertyChanging(); … … 2364 1590 2365 1591 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_Job", Storage="_Jobs", ThisKey="JobId", OtherKey="ParentJobId")] 2366 public EntitySet<Job> Jobs1592 public EntitySet<Job> ChildJobs 2367 1593 { 2368 1594 get … … 2406 1632 2407 1633 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_Job", Storage="_Job1", ThisKey="ParentJobId", OtherKey="JobId", IsForeignKey=true)] 2408 public Job Job11634 public Job ParentJob 2409 1635 { 2410 1636 get … … 2422 1648 { 2423 1649 this._Job1.Entity = null; 2424 previousValue. Jobs.Remove(this);1650 previousValue.ChildJobs.Remove(this); 2425 1651 } 2426 1652 this._Job1.Entity = value; 2427 1653 if ((value != null)) 2428 1654 { 2429 value. Jobs.Add(this);1655 value.ChildJobs.Add(this); 2430 1656 this._ParentJobId = value.JobId; 2431 1657 } … … 2434 1660 this._ParentJobId = default(Nullable<System.Guid>); 2435 1661 } 2436 this.SendPropertyChanged("Job1"); 2437 } 2438 } 2439 } 2440 2441 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_Job", Storage="_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true, DeleteRule="SET NULL")] 2442 public Project Project 2443 { 2444 get 2445 { 2446 return this._Project.Entity; 2447 } 2448 set 2449 { 2450 Project previousValue = this._Project.Entity; 2451 if (((previousValue != value) 2452 || (this._Project.HasLoadedOrAssignedValue == false))) 2453 { 2454 this.SendPropertyChanging(); 2455 if ((previousValue != null)) 2456 { 2457 this._Project.Entity = null; 2458 previousValue.Jobs.Remove(this); 2459 } 2460 this._Project.Entity = value; 2461 if ((value != null)) 2462 { 2463 value.Jobs.Add(this); 2464 this._ProjectId = value.ProjectId; 2465 } 2466 else 2467 { 2468 this._ProjectId = default(Nullable<System.Guid>); 2469 } 2470 this.SendPropertyChanged("Project"); 1662 this.SendPropertyChanged("ParentJob"); 2471 1663 } 2472 1664 } … … 2554 1746 { 2555 1747 this.SendPropertyChanging(); 2556 entity. Job1= this;1748 entity.ParentJob = this; 2557 1749 } 2558 1750 … … 2560 1752 { 2561 1753 this.SendPropertyChanging(); 2562 entity. Job1= null;1754 entity.ParentJob = null; 2563 1755 } 2564 1756 } … … 2827 2019 private System.Guid _UserId; 2828 2020 2829 private System.Nullable<System.Guid> _RootJobId; 2021 private System.Guid _RootJobId; 2022 2023 private System.DateTime _DateCreated; 2830 2024 2831 2025 private EntityRef<Job> _Job; … … 2845 2039 partial void OnUserIdChanging(System.Guid value); 2846 2040 partial void OnUserIdChanged(); 2847 partial void OnRootJobIdChanging(System. Nullable<System.Guid>value);2041 partial void OnRootJobIdChanging(System.Guid value); 2848 2042 partial void OnRootJobIdChanged(); 2043 partial void OnDateCreatedChanging(System.DateTime value); 2044 partial void OnDateCreatedChanged(); 2849 2045 #endregion 2850 2046 … … 2956 2152 2957 2153 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RootJobId", DbType="UniqueIdentifier")] 2958 public System. Nullable<System.Guid>RootJobId2154 public System.Guid RootJobId 2959 2155 { 2960 2156 get … … 2975 2171 this.SendPropertyChanged("RootJobId"); 2976 2172 this.OnRootJobIdChanged(); 2173 } 2174 } 2175 } 2176 2177 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCreated", DbType="DateTime")] 2178 public System.DateTime DateCreated 2179 { 2180 get 2181 { 2182 return this._DateCreated; 2183 } 2184 set 2185 { 2186 if ((this._DateCreated != value)) 2187 { 2188 this.OnDateCreatedChanging(value); 2189 this.SendPropertyChanging(); 2190 this._DateCreated = value; 2191 this.SendPropertyChanged("DateCreated"); 2192 this.OnDateCreatedChanged(); 2977 2193 } 2978 2194 } … … 3027 2243 3028 2244 private System.Data.Linq.Binary _Data; 2245 2246 private System.DateTime _LastUpdate; 3029 2247 3030 2248 private EntityRef<Job> _Job; … … 3038 2256 partial void OnDataChanging(System.Data.Linq.Binary value); 3039 2257 partial void OnDataChanged(); 2258 partial void OnLastUpdateChanging(System.DateTime value); 2259 partial void OnLastUpdateChanged(); 3040 2260 #endregion 3041 2261 … … 3086 2306 this.SendPropertyChanged("Data"); 3087 2307 this.OnDataChanged(); 2308 } 2309 } 2310 } 2311 2312 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastUpdate", DbType="DateTime")] 2313 public System.DateTime LastUpdate 2314 { 2315 get 2316 { 2317 return this._LastUpdate; 2318 } 2319 set 2320 { 2321 if ((this._LastUpdate != value)) 2322 { 2323 this.OnLastUpdateChanging(value); 2324 this.SendPropertyChanging(); 2325 this._LastUpdate = value; 2326 this.SendPropertyChanged("LastUpdate"); 2327 this.OnLastUpdateChanged(); 3088 2328 } 3089 2329 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Properties/Settings.Designer.cs
r4593 r5106 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=HeuristicLab.Hive ;Integrated Security=True;" +30 " ")]29 [global::System.Configuration.DefaultSettingValueAttribute("Data Source=localhost;Initial Catalog=HeuristicLab.Hive-3.4;Integrated Security=T" + 30 "rue;")] 31 31 public string HeuristicLab_Hive_LinqConnectionString { 32 32 get { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Properties/Settings.settings
r4593 r5106 1 1 <?xml version='1.0' encoding='utf-8'?> 2 <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="HeuristicLab. Hive.Server.LINQDataAccess.Properties" GeneratedClassName="Settings">2 <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="HeuristicLab.Services.Hive.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=HeuristicLab.Hive ;Integrated Security=True;</ConnectionString>8 <ConnectionString>Data Source=localhost;Initial Catalog=HeuristicLab.Hive-3.4;Integrated Security=True;</ConnectionString> 9 9 <ProviderName>System.Data.SqlClient</ProviderName> 10 10 </SerializableConnectionString></DesignTimeValue> 11 <Value Profile="(Default)">Data Source=localhost;Initial Catalog=HeuristicLab.Hive ;Integrated Security=True;</Value>11 <Value Profile="(Default)">Data Source=localhost;Initial Catalog=HeuristicLab.Hive-3.4;Integrated Security=True;</Value> 12 12 </Setting> 13 13 </Settings> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Tools/CreateHiveDatabaseApplication.cs
r5078 r5106 21 21 22 22 using HeuristicLab.PluginInfrastructure; 23 using System.IO; 24 using System.Windows.Forms; 23 25 24 26 namespace HeuristicLab.Services.Hive.DataAccess { 25 [Application("Create Hive-3.4 Database", "Creates new empty Hive Database.", true)]27 [Application("Create Hive-3.4 Database", "Creates new empty Hive Database.", false)] 26 28 class CreateHiveDatabaseApplication : ApplicationBase { 27 29 … … 31 33 db.DeleteDatabase(); 32 34 db.CreateDatabase(); 35 using (var sr = new StreamReader("../../../../HeuristicLab.Services.Hive.DataAccess/3.4/Tools/prepareHiveDatabase.sql")) { 36 var commands = sr.ReadToEnd().Split(new string[] {"GO\r"}, System.StringSplitOptions.RemoveEmptyEntries); 37 foreach (var cmd in commands) { 38 db.ExecuteCommand(cmd); 39 } 40 } 33 41 } 42 MessageBox.Show("Successfully created HeuristicLab.Hive-3.4 database."); 34 43 } 35 44 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Tools/cleanHiveDatabase.sql
r4629 r5106 1 DELETE FROM [HeuristicLab.Hive ].[dbo].AssignedResources2 DELETE FROM [HeuristicLab.Hive ].[dbo].RequiredPlugins3 DELETE FROM [HeuristicLab.Hive ].[dbo].PluginInfo4 DELETE FROM [HeuristicLab.Hive ].[dbo].UptimeStatistics5 DELETE FROM [HeuristicLab.Hive ].[dbo].UptimeCalendar6 DELETE FROM [HeuristicLab.Hive ].[dbo].SlaveConfig7 DELETE FROM [HeuristicLab.Hive ].[dbo].SlaveGroup_Resource8 DELETE FROM [HeuristicLab.Hive ].[dbo].[Resource]9 DELETE FROM [HeuristicLab.Hive ].[dbo].HiveExperiment10 DELETE FROM [HeuristicLab.Hive ].[dbo].Job1 DELETE FROM [HeuristicLab.Hive-3.4].[dbo].AssignedResources 2 DELETE FROM [HeuristicLab.Hive-3.4].[dbo].RequiredPlugins 3 DELETE FROM [HeuristicLab.Hive-3.4].[dbo].PluginData 4 DELETE FROM [HeuristicLab.Hive-3.4].[dbo].Plugin 5 DELETE FROM [HeuristicLab.Hive-3.4].[dbo].UptimeCalendar 6 DELETE FROM [HeuristicLab.Hive-3.4].[dbo].SlaveGroup_Resource 7 DELETE FROM [HeuristicLab.Hive-3.4].[dbo].[Resource] 8 DELETE FROM [HeuristicLab.Hive-3.4].[dbo].HiveExperiment 9 DELETE FROM [HeuristicLab.Hive-3.4].[dbo].JobData 10 DELETE FROM [HeuristicLab.Hive-3.4].[dbo].Job 11 11 12 12 /** only jobs & experiments **/ 13 DELETE FROM [HeuristicLab.Hive].[dbo].AssignedResources 14 DELETE FROM [HeuristicLab.Hive].[dbo].RequiredPlugins 15 DELETE FROM [HeuristicLab.Hive].[dbo].PluginInfo 16 DELETE FROM [HeuristicLab.Hive].[dbo].HiveExperiment 17 DELETE FROM [HeuristicLab.Hive].[dbo].Job 13 DELETE FROM [HeuristicLab.Hive-3.4].[dbo].AssignedResources 14 DELETE FROM [HeuristicLab.Hive-3.4].[dbo].RequiredPlugins 15 DELETE FROM [HeuristicLab.Hive-3.4].[dbo].PluginData 16 DELETE FROM [HeuristicLab.Hive-3.4].[dbo].Plugin 17 DELETE FROM [HeuristicLab.Hive-3.4].[dbo].HiveExperiment 18 DELETE FROM [HeuristicLab.Hive-3.4].[dbo].JobData 19 DELETE FROM [HeuristicLab.Hive-3.4].[dbo].Job -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Tools/prepareHiveDatabase.sql
r4905 r5106 1 1 /* this script is supposed to be executed after the plain DB is generated by the linq-to-sql schema */ 2 2 3 /* 4 use these DROP commands if you want to run this query a second time on the same db */ 3 /* use these DROP commands if you want to run this query a second time on the same db */ 4 5 5 /* 6 6 ALTER TABLE dbo.AssignedResources ALTER COLUMN AssignedRessourcesId DROP ROWGUIDCOL; 7 7 ALTER TABLE dbo.Job ALTER COLUMN JobId DROP ROWGUIDCOL; 8 ALTER TABLE dbo.SlaveConfig ALTER COLUMN SlaveConfigId DROP ROWGUIDCOL;9 8 ALTER TABLE dbo.SlaveGroup_Resource ALTER COLUMN SlaveGroup_RessourceId DROP ROWGUIDCOL; 10 9 ALTER TABLE dbo.Plugin ALTER COLUMN PluginId DROP ROWGUIDCOL; 11 ALTER TABLE dbo.Project ALTER COLUMN ProjectId DROP ROWGUIDCOL;12 10 ALTER TABLE dbo.RequiredPlugins ALTER COLUMN RequiredPluginId DROP ROWGUIDCOL; 13 11 ALTER TABLE dbo.Resource ALTER COLUMN ResourceId DROP ROWGUIDCOL; 14 12 ALTER TABLE dbo.UptimeCalendar ALTER COLUMN UptimeCalendarId DROP ROWGUIDCOL; 15 ALTER TABLE dbo.UptimeStatistics ALTER COLUMN UptimeStatisticsId DROP ROWGUIDCOL;16 13 ALTER TABLE dbo.HiveExperiment ALTER COLUMN HiveExperimentId DROP ROWGUIDCOL; 17 14 18 15 ALTER TABLE dbo.AssignedResources DROP CONSTRAINT [DF_AssignedResources_AssignedRessourcesId]; 19 16 ALTER TABLE dbo.Job DROP CONSTRAINT [DF_Job_JobId]; 20 ALTER TABLE dbo.SlaveConfig DROP CONSTRAINT [DF_SlaveConfig_SlaveConfigId];21 17 ALTER TABLE dbo.SlaveGroup_Resource DROP CONSTRAINT [DF_SlaveGroup_ResourceSlaveGroup_RessourceId]; 22 18 ALTER TABLE dbo.Plugin DROP CONSTRAINT [DF_Plugin_PluginId]; 23 ALTER TABLE dbo.Project DROP CONSTRAINT [DF_Project_ProjectId];24 19 ALTER TABLE dbo.RequiredPlugins DROP CONSTRAINT [DF_RequiredPlugins_RequiredPluginId]; 25 20 ALTER TABLE dbo.Resource DROP CONSTRAINT [DF_Resource_ResourceId]; 26 21 ALTER TABLE dbo.UptimeCalendar DROP CONSTRAINT [DF_UptimeCalendar_UptimeCalendarId]; 27 ALTER TABLE dbo.UptimeStatistics DROP CONSTRAINT [DF_UptimeStatistics_UptimeStatisticsId];28 22 ALTER TABLE dbo.HiveExperiment DROP CONSTRAINT [DF_HiveExperiment_HiveExperimentId]; 29 23 */ … … 47 41 ALTER TABLE dbo.Job WITH NOCHECK ADD CONSTRAINT [DF_Job_JobId] DEFAULT (newid()) FOR JobId; 48 42 49 ALTER TABLE dbo.SlaveConfig ALTER COLUMN SlaveConfigId ADD ROWGUIDCOL;50 ALTER TABLE dbo.SlaveConfig WITH NOCHECK ADD CONSTRAINT [DF_SlaveConfig_SlaveConfigId] DEFAULT (newid()) FOR SlaveConfigId;51 52 ALTER TABLE dbo.SlaveGroup_Resource ALTER COLUMN SlaveGroup_RessourceId ADD ROWGUIDCOL;53 ALTER TABLE dbo.SlaveGroup_Resource WITH NOCHECK ADD CONSTRAINT [DF_SlaveGroup_Resource_SlaveGroup_RessourceId] DEFAULT (newid()) FOR SlaveGroup_RessourceId;54 55 43 ALTER TABLE dbo.Plugin ALTER COLUMN PluginId ADD ROWGUIDCOL; 56 44 ALTER TABLE dbo.Plugin WITH NOCHECK ADD CONSTRAINT [DF_Plugin_PluginId] DEFAULT (newid()) FOR PluginId; 57 58 ALTER TABLE dbo.Project ALTER COLUMN ProjectId ADD ROWGUIDCOL;59 ALTER TABLE dbo.Project WITH NOCHECK ADD CONSTRAINT [DF_Project_ProjectId] DEFAULT (newid()) FOR ProjectId;60 45 61 46 ALTER TABLE dbo.RequiredPlugins ALTER COLUMN RequiredPluginId ADD ROWGUIDCOL; … … 81 66 ALTER TABLE dbo.UptimeCalendar ALTER COLUMN UptimeCalendarId ADD ROWGUIDCOL; 82 67 ALTER TABLE dbo.UptimeCalendar WITH NOCHECK ADD CONSTRAINT [DF_UptimeCalendar_UptimeCalendarId] DEFAULT (newid()) FOR UptimeCalendarId; 83 84 ALTER TABLE dbo.UptimeStatistics ALTER COLUMN UptimeStatisticsId ADD ROWGUIDCOL;85 ALTER TABLE dbo.UptimeStatistics WITH NOCHECK ADD CONSTRAINT [DF_UptimeStatistics_UptimeStatisticsId] DEFAULT (newid()) FOR UptimeStatisticsId;86 68 87 69 ALTER TABLE dbo.HiveExperiment ALTER COLUMN HiveExperimentId ADD ROWGUIDCOL; … … 137 119 END 138 120 121 DELETE JobData FROM JobData INNER JOIN #Table ON JobData.JobId = #Table.JobId 139 122 DELETE Job FROM Job INNER JOIN #Table ON Job.JobId = #Table.JobId 140 123 END -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/app.config
r5078 r5106 5 5 <connectionStrings> 6 6 <add name="HeuristicLab.Services.Hive.DataAccess.Properties.Settings.HeuristicLab_Hive_LinqConnectionString" 7 8 7 connectionString="Data Source=localhost;Initial Catalog=HeuristicLab.Hive-3.4;Integrated Security=True;" 8 providerName="System.Data.SqlClient" /> 9 9 </connectionStrings> 10 10 </configuration> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/HeuristicLab.Services.Hive.Tests-3.4.csproj
r5095 r5106 297 297 <RequiredTargetFramework>3.5</RequiredTargetFramework> 298 298 </Reference> 299 <Reference Include="System.Data" /> 300 <Reference Include="System.Data.DataSetExtensions" /> 301 <Reference Include="System.Drawing" /> 302 <Reference Include="System.Runtime.Serialization" /> 303 <Reference Include="System.ServiceModel" /> 304 <Reference Include="System.ServiceProcess" /> 305 <Reference Include="System.Windows.Forms" /> 306 <Reference Include="System.Xml" /> 307 <Reference Include="System.Xml.Linq" /> 299 308 <Reference Include="WeifenLuo.WinFormsUI.Docking-2.3.1"> 300 309 <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\WeifenLuo.WinFormsUI.Docking-2.3.1.dll</HintPath> … … 307 316 </ItemGroup> 308 317 <ItemGroup> 318 <Compile Include="PluginLoader.cs" /> 319 <Compile Include="ServiceTests.cs" /> 309 320 <Compile Include="Mocks\MockAuthorizationManager.cs" /> 310 321 <Compile Include="Mocks\MockLifecycleManager.cs" /> 311 322 <Compile Include="Mocks\MockServiceLocator.cs" /> 312 <Compile Include="PluginLoader.cs" />313 323 <Compile Include="Properties\AssemblyInfo.cs" /> 314 <Compile Include=" ServerTest.cs" />324 <Compile Include="DaoTests.cs" /> 315 325 </ItemGroup> 316 326 <ItemGroup> … … 319 329 <Name>HeuristicLab.Clients.Hive.Slave.Tests-3.4</Name> 320 330 </ProjectReference> 331 <ProjectReference Include="..\HeuristicLab.Clients.Hive.Slave.Views\3.4\HeuristicLab.Clients.Hive.Slave.Views-3.4.csproj"> 332 <Project>{8C0D9F39-397F-4DBE-856F-BC4DC0FE23F8}</Project> 333 <Name>HeuristicLab.Clients.Hive.Slave.Views-3.4</Name> 334 </ProjectReference> 335 <ProjectReference Include="..\HeuristicLab.Clients.Hive.Slave\3.4\HeuristicLab.Clients.Hive.Slave-3.4.csproj"> 336 <Project>{989FE92B-484E-41EE-87E2-6A24AF0381D8}</Project> 337 <Name>HeuristicLab.Clients.Hive.Slave-3.4</Name> 338 </ProjectReference> 339 <ProjectReference Include="..\HeuristicLab.Clients.Hive.Views\3.4\HeuristicLab.Clients.Hive.Views-3.4.csproj"> 340 <Project>{E1D6C801-892A-406A-B606-F158E36DD3C3}</Project> 341 <Name>HeuristicLab.Clients.Hive.Views-3.4</Name> 342 </ProjectReference> 321 343 <ProjectReference Include="..\HeuristicLab.Clients.Hive\3.4\HeuristicLab.Clients.Hive-3.4.csproj"> 322 344 <Project>{B5EF1E5A-9F3D-40B9-B4B0-30AADF2E2CEB}</Project> … … 344 366 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 345 367 </None> 368 <Shadow Include="Test References\HeuristicLab.Clients.Hive.Views-3.4.accessor" /> 369 <Shadow Include="Test References\HeuristicLab.Clients.Hive-3.4.accessor" /> 346 370 </ItemGroup> 347 371 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/Mocks/MockServiceLocator.cs
r5095 r5106 25 25 public ILifecycleManager LifecycleManager { 26 26 get { 27 return new MockLifecycleManager();27 return defaultServiceLocator.LifecycleManager; 28 28 } 29 29 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveService.cs
r5102 r5106 17 17 /// Implementation of the Hive service (interface <see cref="IHiveService"/>). 18 18 /// </summary> 19 [ServiceBehavior(InstanceContextMode =InstanceContextMode.PerCall)]19 [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)] 20 20 public class HiveService : IHiveService { 21 21 private DataAccess.IHiveDao dao { … … 37 37 public Guid AddJob(Job job, JobData jobData) { 38 38 using (trans.OpenTransaction()) { 39 job.UserId = auth.UserId; 40 job.DateCreated = DateTime.Now; 41 job.JobState = JobState.Waiting; 39 42 jobData.JobId = dao.AddJob(job); 43 jobData.LastUpdate = DateTime.Now; 40 44 dao.AddJobData(jobData); 41 45 return jobData.JobId; … … 46 50 using (trans.OpenTransaction()) { 47 51 job.ParentJobId = parentJobId; 52 jobData.LastUpdate = DateTime.Now; 48 53 return AddJob(job, jobData); 49 54 } … … 66 71 } 67 72 68 // formerly GetLastSerializedResult69 73 public JobData GetJobData(Guid jobId) { 70 74 return dao.GetJobData(jobId); 71 75 } 72 76 73 public Stream GetJobDataStreamed(Guid jobId) { 74 throw new NotImplementedException(); 75 } 76 77 public void UpdateJob(Job jobDto, JobData jobDataDto) { 78 using (trans.OpenTransaction()) { 79 dao.UpdateJob(jobDto); 80 dao.UpdateJobData(jobDataDto); 81 } 82 } 83 84 public void UpdateJobDataStreamed(Stream stream) { 85 using (trans.OpenTransaction()) { 86 throw new NotImplementedException(); 87 } 88 } 89 90 public void DeleteChildJobs(Guid jobId) { 91 using (trans.OpenTransaction()) { 92 var jobs = GetChildJobs(jobId, true, false); 77 public void UpdateJob(Job job, JobData jobData) { 78 using (trans.OpenTransaction()) { 79 jobData.LastUpdate = DateTime.Now; 80 dao.UpdateJob(job); 81 dao.UpdateJobData(jobData); 82 } 83 } 84 85 public void DeleteJob(Guid jobId) { 86 using (trans.OpenTransaction()) { 87 dao.DeleteJob(jobId); 88 } 89 } 90 91 public void DeleteChildJobs(Guid parentJobId) { 92 using (trans.OpenTransaction()) { 93 var jobs = GetChildJobs(parentJobId, true, false); 93 94 foreach (var job in jobs) { 94 95 dao.DeleteJob(job.Id); … … 144 145 using (trans.OpenTransaction()) { 145 146 hiveExperimentDto.UserId = auth.UserId; 147 hiveExperimentDto.DateCreated = DateTime.Now; 146 148 return dao.AddHiveExperiment(hiveExperimentDto); 147 149 } … … 157 159 using (trans.OpenTransaction()) { 158 160 HiveExperiment he = dao.GetHiveExperiment(hiveExperimentId); 159 if (he.RootJobId.HasValue) { 160 var jobs = GetChildJobs(he.RootJobId.Value, true, true); 161 foreach (var j in jobs) { 162 dao.DeleteJobData(j.Id); 163 dao.DeleteJob(j.Id); 164 } 165 } 166 dao.DeleteHiveExperiment(hiveExperimentId); 167 } 168 } 169 #endregion 170 161 dao.DeleteHiveExperiment(hiveExperimentId); // child jobs will be deleted by db-trigger 162 } 163 } 164 #endregion 165 171 166 #region Login Methods 172 167 public void Hello(Guid slaveId, string name, int cores, int memory) { … … 208 203 } 209 204 #endregion 210 205 211 206 #region Slave Methods 212 207 public Guid AddSlave(Slave slave) { … … 222 217 } 223 218 219 public Slave GetSlave(Guid slaveId) { 220 return dao.GetSlave(slaveId); 221 } 222 223 public SlaveGroup GetSlaveGroup(Guid slaveGroupId) { 224 return dao.GetSlaveGroup(slaveGroupId); 225 } 226 224 227 public IEnumerable<Slave> GetSlaves() { 225 228 return dao.GetSlaves(x => true); … … 230 233 } 231 234 235 public void UpdateSlave(Slave slave) { 236 using (trans.OpenTransaction()) { 237 dao.UpdateSlave(slave); 238 } 239 } 240 241 public void UpdateSlaveGroup(SlaveGroup slaveGroup) { 242 using (trans.OpenTransaction()) { 243 dao.UpdateSlaveGroup(slaveGroup); 244 } 245 } 246 247 public void DeleteSlave(Guid slaveId) { 248 using (trans.OpenTransaction()) { 249 dao.DeleteSlave(slaveId); 250 } 251 } 252 232 253 public void DeleteSlaveGroup(Guid slaveGroupId) { 233 254 using (trans.OpenTransaction()) { … … 236 257 } 237 258 238 public void AddResourceToGroup(Guid slaveGroupId, Resource resource) { 239 using (trans.OpenTransaction()) { 240 throw new NotImplementedException(); 241 } 242 } 243 244 public void RemoveResourceFromGroup(Guid clientGroupId, Guid resourceId) { 245 using (trans.OpenTransaction()) { 246 throw new NotImplementedException(); 247 } 248 } 249 250 public void UpdateSlave(Slave slave) { 251 using (trans.OpenTransaction()) { 252 dao.UpdateSlave(slave); 253 } 254 } 259 public void AddResourceToGroup(Guid slaveGroupId, Guid resourceId) { 260 using (trans.OpenTransaction()) { 261 var resource = dao.GetResource(resourceId); 262 resource.ParentResourceId = slaveGroupId; 263 dao.UpdateResource(resource); 264 } 265 } 266 267 public void RemoveResourceFromGroup(Guid slaveGroupId, Guid resourceId) { 268 using (trans.OpenTransaction()) { 269 var resource = dao.GetResource(resourceId); 270 resource.ParentResourceId = null; 271 dao.UpdateResource(resource); 272 } 273 } 274 255 275 #endregion 256 276
Note: See TracChangeset
for help on using the changeset viewer.