- Timestamp:
- 02/17/11 14:47:56 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Convert.cs
r5458 r5511 33 33 Id = source.JobId, 34 34 CoresNeeded = source.CoresNeeded, 35 DateCalculated = source.DateCalculated, 36 DateCreated = source.DateCreated, 37 DateFinished = source.DateFinished, 38 Exception = source.Exception, 39 ExecutionTime = source.ExecutionTime, 35 ExecutionTime = string.IsNullOrEmpty(source.ExecutionTime) ? TimeSpan.Zero : TimeSpan.Parse(source.ExecutionTime), 40 36 MemoryNeeded = source.MemoryNeeded, 41 37 ParentJobId = source.ParentJobId, 42 38 Priority = source.Priority, 43 SlaveId = source.SlaveId,44 JobState = source.JobState,45 UserId = source.UserId,46 39 PluginsNeededIds = source.RequiredPlugins.Select(x => x.PluginId).ToList(), 47 LastHeartbeat = source.LastHeartbeat 40 LastHeartbeat = source.LastHeartbeat, 41 State = source.State, 42 StateLog = source.StateLogs.Select(x => Convert.ToDto(x)).OrderBy(x => x.DateTime).ToList() 48 43 }; 49 44 } … … 57 52 target.JobId = source.Id; 58 53 target.CoresNeeded = source.CoresNeeded; 59 target.DateCalculated = source.DateCalculated; 60 target.DateCreated = source.DateCreated; 61 target.DateFinished = source.DateFinished; 62 target.Exception = source.Exception; 63 target.ExecutionTime = source.ExecutionTime; 54 target.ExecutionTime = source.ExecutionTime.ToString(); 64 55 target.MemoryNeeded = source.MemoryNeeded; 65 56 target.ParentJobId = source.ParentJobId; 66 57 target.Priority = source.Priority; 67 target.SlaveId = source.SlaveId;68 target.JobState = source.JobState;69 target.UserId = source.UserId;70 58 target.LastHeartbeat = source.LastHeartbeat; 59 target.State = source.State; 60 if (target.StateLogs == null) target.StateLogs = new EntitySet<StateLog>(); 61 target.StateLogs.AddRange(source.StateLog.Select(x => Convert.ToEntity(x)).OrderBy(x => x.DateTime)); 71 62 // RequiredPlugins are added by Dao 72 63 } … … 91 82 #endregion 92 83 84 #region StateLog 85 public static DT.StateLog ToDto(StateLog source) { 86 if (source == null) return null; 87 return new DT.StateLog { Id = source.StateLogId, DateTime = source.DateTime, Exception = source.Exception, JobId = source.JobId, SlaveId = source.SlaveId, State = source.State, UserId = source.UserId }; 88 } 89 public static StateLog ToEntity(DT.StateLog source) { 90 if (source == null) return null; 91 var entity = new StateLog(); ToEntity(source, entity); 92 return entity; 93 } 94 public static void ToEntity(DT.StateLog source, StateLog target) { 95 if ((source != null) && (target != null)) { 96 target.StateLogId = source.Id; target.DateTime = source.DateTime; target.Exception = source.Exception; target.JobId = source.JobId; target.SlaveId = source.SlaveId; target.State = source.State; target.UserId = source.UserId; 97 } 98 } 99 #endregion 100 93 101 #region HiveExperiment 94 102 public static DT.HiveExperiment ToDto(HiveExperiment source) { 95 103 if (source == null) return null; 96 return new DT.HiveExperiment { Id = source.HiveExperimentId, Description = source.Description, Name = source.Name, RootJobId = source.RootJobId, UserId = source.UserId, DateCreated = source.DateCreated, ResourceNames = source.ResourceIds};104 return new DT.HiveExperiment { Id = source.HiveExperimentId, Description = source.Description, Name = source.Name, RootJobId = source.RootJobId, OwnerUserId = source.OwnerUserId, DateCreated = source.DateCreated, ResourceNames = source.ResourceIds, LastAccessed = source.LastAccessed }; 97 105 } 98 106 public static HiveExperiment ToEntity(DT.HiveExperiment source) { … … 103 111 public static void ToEntity(DT.HiveExperiment source, HiveExperiment target) { 104 112 if ((source != null) && (target != null)) { 105 target.HiveExperimentId = source.Id; target.Description = source.Description; target.Name = source.Name; target.RootJobId = source.RootJobId; target.UserId = source.UserId; target.DateCreated = source.DateCreated; target.ResourceIds = source.ResourceNames; 113 target.HiveExperimentId = source.Id; target.Description = source.Description; target.Name = source.Name; target.RootJobId = source.RootJobId; target.OwnerUserId = source.OwnerUserId; target.DateCreated = source.DateCreated; target.ResourceIds = source.ResourceNames; target.LastAccessed = source.LastAccessed; 114 } 115 } 116 #endregion 117 118 #region HiveExperimentPermission 119 public static DT.HiveExperimentPermission ToDto(HiveExperimentPermission source) { 120 if (source == null) return null; 121 return new DT.HiveExperimentPermission { HiveExperimentId = source.HiveExperimentId, GrantedUserId = source.GrantedUserId, GrantedByUserId = source.GrantedByUserId, Permission = source.Permission }; 122 } 123 public static HiveExperimentPermission ToEntity(DT.HiveExperimentPermission source) { 124 if (source == null) return null; 125 var entity = new HiveExperimentPermission(); ToEntity(source, entity); 126 return entity; 127 } 128 public static void ToEntity(DT.HiveExperimentPermission source, HiveExperimentPermission target) { 129 if ((source != null) && (target != null)) { 130 target.HiveExperimentId = source.HiveExperimentId; target.GrantedUserId = source.GrantedUserId; target.GrantedByUserId = source.GrantedByUserId; target.Permission = source.Permission; 106 131 } 107 132 } … … 145 170 public static DT.Slave ToDto(Slave source) { 146 171 if (source == null) return null; 147 return new DT.Slave { 148 Id = source.ResourceId, 149 ParentResourceId = source.ParentResourceId, 172 return new DT.Slave { 173 Id = source.ResourceId, 174 ParentResourceId = source.ParentResourceId, 150 175 Cores = source.Cores, 151 CpuSpeed = source.CpuSpeed, 152 FreeCores = source.FreeCores, 153 FreeMemory = source.FreeMemory, 154 IsAllowedToCalculate = source.IsAllowedToCalculate, 155 Memory = source.Memory, 156 Name = source.Name, 157 SlaveState = source.SlaveState, 158 CpuArchitecture = source.CpuArchitecture, 176 CpuSpeed = source.CpuSpeed, 177 FreeCores = source.FreeCores, 178 FreeMemory = source.FreeMemory, 179 IsAllowedToCalculate = source.IsAllowedToCalculate, 180 Memory = source.Memory, 181 Name = source.Name, 182 SlaveState = source.SlaveState, 183 CpuArchitecture = source.CpuArchitecture, 159 184 OperatingSystem = source.OperatingSystem, 160 185 LastHeartbeat = source.LastHeartbeat … … 170 195 target.ResourceId = source.Id; 171 196 target.ParentResourceId = source.ParentResourceId; 172 target.Cores = source.Cores; 197 target.Cores = source.Cores; 173 198 target.CpuSpeed = source.CpuSpeed; 174 199 target.FreeCores = source.FreeCores; 175 target.FreeMemory = source.FreeMemory; 200 target.FreeMemory = source.FreeMemory; 176 201 target.IsAllowedToCalculate = source.IsAllowedToCalculate; 177 202 target.Memory = source.Memory; 178 target.Name = source.Name; 179 target.SlaveState = source.SlaveState; 180 target.CpuArchitecture = source.CpuArchitecture; 203 target.Name = source.Name; 204 target.SlaveState = source.SlaveState; 205 target.CpuArchitecture = source.CpuArchitecture; 181 206 target.OperatingSystem = source.OperatingSystem; 182 207 target.LastHeartbeat = source.LastHeartbeat; -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDao.cs
r5404 r5511 85 85 using (var db = CreateContext()) { 86 86 var query = from ar in db.AssignedResources 87 join sl in db.StateLogs on ar.JobId equals sl.JobId 87 88 where resourceIds.Contains(ar.ResourceId) 88 && ar.Job. JobState == JobState.WaitingForChildJobs89 && ar.Job.State == JobState.FinishOnChildJobsFinished 89 90 && (from child in db.Jobs 90 91 where child.ParentJobId == ar.Job.JobId 91 select child. JobState == JobState.Finished).All(x => x)92 select child.State == JobState.Finished).All(x => x) 92 93 && (from child in db.Jobs // avoid returning WaitForChildJobs jobs where no child-jobs exist (yet) 93 94 where child.ParentJobId == ar.Job.JobId … … 107 108 var query = from ar in db.AssignedResources 108 109 where resourceIds.Contains(ar.ResourceId) 109 && ar.Job. JobState == JobState.Waiting110 && ar.Job.State == JobState.Waiting 110 111 && ar.Job.CoresNeeded <= slave.FreeCores 111 112 && ar.Job.MemoryNeeded <= slave.FreeMemory … … 197 198 } 198 199 } 200 #endregion 201 202 #region HiveExperimentPermission Methods 203 204 public DT.HiveExperimentPermission GetHiveExperimentPermission(Guid hiveExperimentId, Guid grantedUserId) { 205 using (var db = CreateContext()) { 206 return Convert.ToDto(db.HiveExperimentPermissions.SingleOrDefault(x => x.HiveExperimentId == hiveExperimentId && x.GrantedUserId == grantedUserId)); 207 } 208 } 209 210 public IEnumerable<DT.HiveExperimentPermission> GetHiveExperimentPermissions(Expression<Func<HiveExperimentPermission, bool>> predicate) { 211 using (var db = CreateContext()) { 212 return db.HiveExperimentPermissions.Where(predicate).Select(x => Convert.ToDto(x)).ToArray(); 213 } 214 } 215 216 public void AddHiveExperimentPermission(DT.HiveExperimentPermission dto) { 217 using (var db = CreateContext()) { 218 var entity = Convert.ToEntity(dto); 219 db.HiveExperimentPermissions.InsertOnSubmit(entity); 220 db.SubmitChanges(); 221 } 222 } 223 224 public void UpdateHiveExperimentPermission(DT.HiveExperimentPermission dto) { 225 using (var db = CreateContext()) { 226 var entity = db.HiveExperimentPermissions.FirstOrDefault(x => x.HiveExperimentId == dto.HiveExperimentId && x.GrantedUserId == dto.GrantedUserId); 227 if (entity == null) db.HiveExperimentPermissions.InsertOnSubmit(Convert.ToEntity(dto)); 228 else Convert.ToEntity(dto, entity); 229 db.SubmitChanges(); 230 } 231 } 232 233 public void DeleteHiveExperimentPermission(Guid hiveExperimentId, Guid grantedUserId) { 234 using (var db = CreateContext()) { 235 var entity = db.HiveExperimentPermissions.FirstOrDefault(x => x.HiveExperimentId == hiveExperimentId && x.GrantedUserId == grantedUserId); 236 if (entity != null) db.HiveExperimentPermissions.DeleteOnSubmit(entity); 237 db.SubmitChanges(); 238 } 239 } 240 199 241 #endregion 200 242 … … 440 482 441 483 #region Authorization Methods 442 public bool IsUserAuthorizedForJobs(Guid userId, params Guid[] jobIds) { 443 using (var db = CreateContext()) { 444 var userIds = from job in db.Jobs // this needs to be fast! 445 where jobIds.Contains(job.JobId) 446 select job.UserId; 447 return userIds.All(x => x == userId); 448 } 449 } 484 public Permission GetPermissionForJob(Guid jobId, Guid userId) { 485 using (var db = CreateContext()) { 486 return GetPermissionForExperiment(GetExperimentForJob(jobId), userId); 487 } 488 } 489 490 public Permission GetPermissionForExperiment(Guid experimentId, Guid userId) { 491 using (var db = CreateContext()) { 492 HiveExperimentPermission permission = db.HiveExperimentPermissions.SingleOrDefault(p => p.HiveExperimentId == experimentId && p.GrantedUserId == userId); 493 return permission != null ? permission.Permission : Permission.NotAllowed; 494 } 495 } 496 497 public Guid GetExperimentForJob(Guid jobId) { 498 using (var db = CreateContext()) { 499 var job = db.Jobs.SingleOrDefault(j => j.JobId == jobId); 500 if (job.ParentJobId.HasValue) { 501 return GetExperimentForJob(job.ParentJobId.Value); 502 } else { 503 return db.HiveExperiments.SingleOrDefault(he => he.RootJobId == jobId).HiveExperimentId; 504 } 505 } 506 } 507 450 508 #endregion 451 509 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDataContext.dbml
r5405 r5511 39 39 <Association Name="Resource_Resource" Member="ChildResources" ThisKey="ResourceId" OtherKey="ParentResourceId" Type="Resource" /> 40 40 <Association Name="Resource_UptimeCalendar" Member="UptimeCalendars" ThisKey="ResourceId" OtherKey="ResourceId" Type="UptimeCalendar" /> 41 <Association Name="Resource_StateLog" Member="StateLogs" ThisKey="ResourceId" OtherKey="SlaveId" Type="StateLog" /> 41 42 <Association Name="Resource_Resource" Member="ParentResource" ThisKey="ParentResourceId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" /> 42 43 <Type Name="Slave" InheritanceCode="Slave" IsInheritanceDefault="true"> … … 52 53 <Column Name="OperatingSystem" Type="System.String" DbType="VarChar(MAX)" CanBeNull="false" UpdateCheck="Never" /> 53 54 <Column Name="LastHeartbeat" Type="System.DateTime" DbType="DateTime" CanBeNull="true" /> 54 <Association Name="Slave_Job" Member="Jobs" ThisKey="ResourceId" OtherKey="SlaveId" Type="Job" />55 55 </Type> 56 56 <Type Name="SlaveGroup" InheritanceCode="GROUP" /> … … 61 61 <Column Name="JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" /> 62 62 <Column Name="ParentJobId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" /> 63 <Column Name="JobState" Type="global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState" DbType="VarChar(15)" CanBeNull="false" /> 64 <Column Name="ResourceId" Member="SlaveId" Storage="_ResourceId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" /> 65 <Column Name="ExecutionTime" Type="System.TimeSpan" DbType="Time" CanBeNull="true" /> 66 <Column Name="Exception" Type="System.String" DbType="VarChar(MAX)" CanBeNull="true" /> 67 <Column Name="DateCreated" Type="System.DateTime" DbType="DateTime" CanBeNull="false" /> 68 <Column Name="DateCalculated" Type="System.DateTime" DbType="DateTime" CanBeNull="true" /> 69 <Column Name="DateFinished" Type="System.DateTime" DbType="DateTime" CanBeNull="true" /> 63 <Column Name="ExecutionTime" Type="System.String" DbType="VarChar(30)" CanBeNull="true" /> 70 64 <Column Name="Priority" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" /> 71 <Column Name="ProjectId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />72 <Column Name="UserId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="false" />73 65 <Column Name="CoresNeeded" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" /> 74 66 <Column Name="MemoryNeeded" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" /> 75 67 <Column Name="LastHeartbeat" Type="System.DateTime" DbType="DateTime" CanBeNull="true" /> 68 <Column Name="JobState" Member="State" Type="global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState" DbType="VarChar(30)" CanBeNull="false" /> 76 69 <Association Name="Job_AssignedResource" Member="AssignedResources" ThisKey="JobId" OtherKey="JobId" Type="AssignedResource" /> 77 70 <Association Name="Job_RequiredPlugin" Member="RequiredPlugins" ThisKey="JobId" OtherKey="JobId" Type="RequiredPlugin" /> 78 71 <Association Name="Job_Job" Member="ChildJobs" Storage="_Jobs" ThisKey="JobId" OtherKey="ParentJobId" Type="Job" /> 79 72 <Association Name="Job_JobData" Member="JobData" ThisKey="JobId" OtherKey="JobId" Type="JobData" Cardinality="One" /> 73 <Association Name="Job_StateLog" Member="StateLogs" ThisKey="JobId" OtherKey="JobId" Type="StateLog" /> 80 74 <Association Name="Job_Job" Member="ParentJob" Storage="_Job1" ThisKey="ParentJobId" OtherKey="JobId" Type="Job" IsForeignKey="true" /> 81 <Association Name="Slave_Job" Member="Slave" ThisKey="SlaveId" OtherKey="ResourceId" Type="Slave" IsForeignKey="true" DeleteRule="SET NULL" />82 75 </Type> 83 76 </Table> … … 100 93 <Column Name="Description" Type="System.String" DbType="VarChar(MAX)" CanBeNull="true" /> 101 94 <Column Name="ResourceIds" Type="System.String" DbType="VarChar(MAX)" CanBeNull="true" /> 102 <Column Name=" UserId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="false" />95 <Column Name="OwnerUserId" Storage="_UserId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="false" /> 103 96 <Column Name="RootJobId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="false" /> 104 97 <Column Name="DateCreated" Type="System.DateTime" DbType="DateTime" CanBeNull="false" /> 98 <Column Name="LastAccessed" Type="System.DateTime" DbType="DateTime" CanBeNull="true" /> 99 <Column Name="IsHiveEngine" Type="System.Boolean" DbType="Bit" CanBeNull="false" /> 100 <Association Name="HiveExperiment_HiveExperimentPermission" Member="HiveExperimentPermissions" ThisKey="HiveExperimentId" OtherKey="HiveExperimentId" Type="HiveExperimentPermission" /> 105 101 <Association Name="Job_HiveExperiment" Member="RootJob" Storage="_Job" ThisKey="RootJobId" OtherKey="JobId" Type="Job" IsForeignKey="true" DeleteRule="CASCADE" /> 106 102 </Type> 107 103 </Table> 108 <Table Name=" " Member="JobDatas">104 <Table Name="dbo.JobData" Member="JobDatas"> 109 105 <Type Name="JobData"> 110 106 <Column Name="JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" /> … … 114 110 </Type> 115 111 </Table> 116 <Table Name=" " Member="PluginDatas">112 <Table Name="dbo.PluginData" Member="PluginDatas"> 117 113 <Type Name="PluginData"> 118 114 <Column Name="PluginDataId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" /> … … 123 119 </Type> 124 120 </Table> 121 <Table Name="dbo.StateLog" Member="StateLogs"> 122 <Type Name="StateLog"> 123 <Column Name="StateLogId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" /> 124 <Column Name="State" Type="global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState" DbType="VarChar(30) NOT NULL" CanBeNull="false" /> 125 <Column Name="DateTime" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" /> 126 <Column Name="JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" /> 127 <Column Name="UserId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" /> 128 <Column Name="SlaveId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" /> 129 <Column Name="Exception" Type="System.String" DbType="VarChar(MAX)" CanBeNull="false" /> 130 <Association Name="Job_StateLog" Member="Job" ThisKey="JobId" OtherKey="JobId" Type="Job" IsForeignKey="true" /> 131 <Association Name="Resource_StateLog" Member="Resource" ThisKey="SlaveId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" /> 132 </Type> 133 </Table> 134 <Table Name="dbo.HiveExperimentPermission" Member="HiveExperimentPermissions"> 135 <Type Name="HiveExperimentPermission"> 136 <Column Name="HiveExperimentId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" /> 137 <Column Name="GrantedUserId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" /> 138 <Column Name="GrantedByUserId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" /> 139 <Column Name="Permission" Type="global::HeuristicLab.Services.Hive.Common.DataTransfer.Permission" DbType="VarChar(15) NOT NULL" CanBeNull="false" /> 140 <Association Name="HiveExperiment_HiveExperimentPermission" Member="HiveExperiment" ThisKey="HiveExperimentId" OtherKey="HiveExperimentId" Type="HiveExperiment" IsForeignKey="true" /> 141 </Type> 142 </Table> 125 143 </Database> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDataContext.dbml.layout
r5405 r5511 3 3 <DataContextMoniker Name="/HiveDataContext" /> 4 4 <nestedChildShapes> 5 <classShape Id="a929c9dc-69f4-4488-ba1c-a2342bf81d89" absoluteBounds="8.875, 3. 75, 2, 1.3862939453124987">5 <classShape Id="a929c9dc-69f4-4488-ba1c-a2342bf81d89" absoluteBounds="8.875, 3.875, 2, 1.3862939453124987"> 6 6 <DataClassMoniker Name="/HiveDataContext/AssignedResource" /> 7 7 <nestedChildShapes> 8 <elementListCompartment Id="8b005775-f0ee-41b0-ae10-6d1151003708" absoluteBounds="8.89, 4. 2100000000000009, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />8 <elementListCompartment Id="8b005775-f0ee-41b0-ae10-6d1151003708" absoluteBounds="8.89, 4.3350000000000009, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> 9 9 </nestedChildShapes> 10 10 </classShape> 11 <classShape Id="7d998e56-4fba-41ca-a1a8-1dcdb9068edf" absoluteBounds=" 9, 5.5, 2, 1.9631982421874996">11 <classShape Id="7d998e56-4fba-41ca-a1a8-1dcdb9068edf" absoluteBounds="8.875, 5.5, 2, 1.9631982421874996"> 12 12 <DataClassMoniker Name="/HiveDataContext/Plugin" /> 13 13 <nestedChildShapes> 14 <elementListCompartment Id="ec4ba325-6dff-4418-baad-59af81ae2024" absoluteBounds=" 9.015, 5.9600000000000009, 1.9700000000000002, 1.4031982421875" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />14 <elementListCompartment Id="ec4ba325-6dff-4418-baad-59af81ae2024" absoluteBounds="8.89, 5.9600000000000009, 1.9700000000000002, 1.4031982421875" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> 15 15 </nestedChildShapes> 16 16 </classShape> … … 27 27 </nestedChildShapes> 28 28 </classShape> 29 <classShape Id="695bfc39-59f3-4e60-8644-f847964bf62c" absoluteBounds="6.5, 1, 2, 3.6939111328124996">29 <classShape Id="695bfc39-59f3-4e60-8644-f847964bf62c" absoluteBounds="6.5, 1, 2, 2.3478011067708335"> 30 30 <DataClassMoniker Name="/HiveDataContext/Job" /> 31 31 <nestedChildShapes> 32 <elementListCompartment Id="a6a30e11-03d1-4869-82e6-b733f4ef9974" absoluteBounds="6.5150000000000006, 1.46, 1.9700000000000002, 3.1339111328125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />32 <elementListCompartment Id="a6a30e11-03d1-4869-82e6-b733f4ef9974" absoluteBounds="6.5150000000000006, 1.46, 1.9700000000000002, 1.7878011067708333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> 33 33 </nestedChildShapes> 34 34 </classShape> … … 39 39 </nestedChildShapes> 40 40 </classShape> 41 <classShape Id="e6f840cc-2968-4be1-b234-eef624ccacbb" absoluteBounds="4.125, 2.625, 2, 2. 1554996744791666">41 <classShape Id="e6f840cc-2968-4be1-b234-eef624ccacbb" absoluteBounds="4.125, 2.625, 2, 2.5401025390624996"> 42 42 <DataClassMoniker Name="/HiveDataContext/HiveExperiment" /> 43 43 <nestedChildShapes> 44 <elementListCompartment Id="0c65d4e1-256a-4a91-9a57-392f25e4de7f" absoluteBounds="4.1400000000000006, 3.0850000000000009, 1.9700000000000002, 1. 5954996744791665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />44 <elementListCompartment Id="0c65d4e1-256a-4a91-9a57-392f25e4de7f" absoluteBounds="4.1400000000000006, 3.0850000000000009, 1.9700000000000002, 1.9801025390625" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> 45 45 </nestedChildShapes> 46 46 </classShape> … … 69 69 </nodes> 70 70 </inheritanceConnector> 71 <associationConnector edgePoints="[(11.9843735 : 2.57859537760417); (11.9843735 : 4. 44314697265625); (10.875 : 4.44314697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed">71 <associationConnector edgePoints="[(11.9843735 : 2.57859537760417); (11.9843735 : 4.56814697265625); (10.875 : 4.56814697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 72 72 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_AssignedResource" /> 73 73 <nodes> … … 76 76 </nodes> 77 77 </associationConnector> 78 <associationConnector edgePoints="[(8.5 : 4.22195556640625); (8.875 : 4.22195556640625)]" fixedFrom="NotFixed" fixedTo="NotFixed">78 <associationConnector edgePoints="[(8.5 : 3.34780110677083); (8.875 : 3.875)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 79 79 <AssociationMoniker Name="/HiveDataContext/Job/Job_AssignedResource" /> 80 80 <nodes> … … 83 83 </nodes> 84 84 </associationConnector> 85 <associationConnector edgePoints="[(7. 0898076923077 : 4.6939111328125); (7.0898076923077 : 5.5)]" fixedFrom="NotFixed" fixedTo="NotFixed">85 <associationConnector edgePoints="[(7.4687475 : 3.34780110677083); (7.4687475 : 5.5)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 86 86 <AssociationMoniker Name="/HiveDataContext/Job/Job_RequiredPlugin" /> 87 87 <nodes> … … 97 97 </nodes> 98 98 </associationConnector> 99 <associationConnector edgePoints="[(8.875 : 2.33735270182292); (8.5 : 2.33735270182292)]" fixedFrom="NotFixed" fixedTo="NotFixed">100 <AssociationMoniker Name="/HiveDataContext/Slave/Slave_Job" />101 <nodes>102 <classShapeMoniker Id="26f4edfa-91dd-4941-a058-359f89e567a8" />103 <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />104 </nodes>105 </associationConnector>106 99 <associationConnector edgePoints="[(12.781252 : 2.57859537760417); (12.781252 : 3.54212367513021); (13.5 : 3.54212367513021)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 107 100 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_UptimeCalendar" /> … … 111 104 </nodes> 112 105 </associationConnector> 113 <associationConnector edgePoints="[(6.5 : 3.65945556640625); (6.125 : 3.65945556640625)]" fixedFrom="NotFixed" fixedTo="NotFixed">106 <associationConnector edgePoints="[(6.5 : 2.98640055338542); (6.125 : 2.98640055338542)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 114 107 <AssociationMoniker Name="/HiveDataContext/Job/Job_HiveExperiment" /> 115 108 <nodes> … … 124 117 </nestedChildShapes> 125 118 </classShape> 126 <classShape Id="ad25bd0f-80e8-4a06-abd8-190eb678eec7" absoluteBounds="11. 625, 5.5, 2, 1.5785953776041666">119 <classShape Id="ad25bd0f-80e8-4a06-abd8-190eb678eec7" absoluteBounds="11.25, 5.5, 2, 1.5785953776041666"> 127 120 <DataClassMoniker Name="/HiveDataContext/PluginData" /> 128 121 <nestedChildShapes> 129 <elementListCompartment Id="acddb513-7de6-4bb4-8335-d6982fb2ef35" absoluteBounds="11. 64, 5.9600000000000009, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />122 <elementListCompartment Id="acddb513-7de6-4bb4-8335-d6982fb2ef35" absoluteBounds="11.265, 5.9600000000000009, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> 130 123 </nestedChildShapes> 131 124 </classShape> 132 <associationConnector edgePoints="[(1 1 : 6.28929768880208); (11.625 : 6.28929768880208)]" fixedFrom="NotFixed" fixedTo="NotFixed">125 <associationConnector edgePoints="[(10.875 : 6.28929768880208); (11.25 : 6.28929768880208)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 133 126 <AssociationMoniker Name="/HiveDataContext/Plugin/Plugin_PluginData" /> 134 127 <nodes> … … 137 130 </nodes> 138 131 </associationConnector> 139 <associationConnector edgePoints="[(6.5 : 1.69314697265625); (6.125 : 1.69314697265625)]" fixedFrom=" NotFixed" fixedTo="NotFixed">132 <associationConnector edgePoints="[(6.5 : 1.69314697265625); (6.125 : 1.69314697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 140 133 <AssociationMoniker Name="/HiveDataContext/Job/Job_JobData" /> 141 134 <nodes> … … 144 137 </nodes> 145 138 </associationConnector> 146 <associationConnector edgePoints="[( 9: 6.19314697265625); (8.5 : 6.19314697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed">139 <associationConnector edgePoints="[(8.875 : 6.19314697265625); (8.5 : 6.19314697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 147 140 <AssociationMoniker Name="/HiveDataContext/Plugin/Plugin_RequiredPlugin" /> 148 141 <nodes> … … 158 151 </nodes> 159 152 </associationConnector> 153 <classShape Id="00352397-340e-449a-8e23-6ddd216e8617" absoluteBounds="1.75, 1, 2, 2.1554996744791666"> 154 <DataClassMoniker Name="/HiveDataContext/StateLog" /> 155 <nestedChildShapes> 156 <elementListCompartment Id="9a003897-deef-4bb5-b180-4c4bcdb7fadc" absoluteBounds="1.765, 1.46, 1.9700000000000002, 1.5954996744791665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> 157 </nestedChildShapes> 158 </classShape> 159 <classShape Id="4d800dc9-1b18-469f-b02c-d4554757c5e1" absoluteBounds="1.75, 3.625, 2, 1.5785953776041666"> 160 <DataClassMoniker Name="/HiveDataContext/HiveExperimentPermission" /> 161 <nestedChildShapes> 162 <elementListCompartment Id="dedd97d3-a9a2-45a2-9b95-d7366fb65a7f" absoluteBounds="1.765, 4.085, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> 163 </nestedChildShapes> 164 </classShape> 165 <associationConnector edgePoints="[(6.5 : 2.50564697265625); (3.75 : 2.50564697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 166 <AssociationMoniker Name="/HiveDataContext/Job/Job_StateLog" /> 167 <nodes> 168 <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" /> 169 <classShapeMoniker Id="00352397-340e-449a-8e23-6ddd216e8617" /> 170 </nodes> 171 </associationConnector> 172 <associationConnector edgePoints="[(11.25 : 1.78929768880208); (10.9375 : 1.78929768880208); (10.9375 : 0.6875); (2.75 : 0.6875); (2.75 : 1)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 173 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_StateLog" /> 174 <nodes> 175 <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" /> 176 <classShapeMoniker Id="00352397-340e-449a-8e23-6ddd216e8617" /> 177 </nodes> 178 </associationConnector> 179 <associationConnector edgePoints="[(4.125 : 4.39505126953125); (3.75 : 4.39505126953125)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 180 <AssociationMoniker Name="/HiveDataContext/HiveExperiment/HiveExperiment_HiveExperimentPermission" /> 181 <nodes> 182 <classShapeMoniker Id="e6f840cc-2968-4be1-b234-eef624ccacbb" /> 183 <classShapeMoniker Id="4d800dc9-1b18-469f-b02c-d4554757c5e1" /> 184 </nodes> 185 </associationConnector> 160 186 </nestedChildShapes> 161 187 </ordesignerObjectsDiagram> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDataContext.designer.cs
r5405 r5511 58 58 partial void UpdatePluginData(PluginData instance); 59 59 partial void DeletePluginData(PluginData instance); 60 partial void InsertStateLog(StateLog instance); 61 partial void UpdateStateLog(StateLog instance); 62 partial void DeleteStateLog(StateLog instance); 63 partial void InsertHiveExperimentPermission(HiveExperimentPermission instance); 64 partial void UpdateHiveExperimentPermission(HiveExperimentPermission instance); 65 partial void DeleteHiveExperimentPermission(HiveExperimentPermission instance); 60 66 #endregion 61 67 … … 153 159 { 154 160 return this.GetTable<PluginData>(); 161 } 162 } 163 164 public System.Data.Linq.Table<StateLog> StateLogs 165 { 166 get 167 { 168 return this.GetTable<StateLog>(); 169 } 170 } 171 172 public System.Data.Linq.Table<HiveExperimentPermission> HiveExperimentPermissions 173 { 174 get 175 { 176 return this.GetTable<HiveExperimentPermission>(); 155 177 } 156 178 } … … 788 810 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); 789 811 790 pr otectedSystem.Guid _ResourceId;812 private System.Guid _ResourceId; 791 813 792 814 private string _Name; … … 801 823 802 824 private EntitySet<UptimeCalendar> _UptimeCalendars; 825 826 private EntitySet<StateLog> _StateLogs; 803 827 804 828 private EntityRef<Resource> _ParentResource; … … 823 847 this._ChildResources = new EntitySet<Resource>(new Action<Resource>(this.attach_ChildResources), new Action<Resource>(this.detach_ChildResources)); 824 848 this._UptimeCalendars = new EntitySet<UptimeCalendar>(new Action<UptimeCalendar>(this.attach_UptimeCalendars), new Action<UptimeCalendar>(this.detach_UptimeCalendars)); 849 this._StateLogs = new EntitySet<StateLog>(new Action<StateLog>(this.attach_StateLogs), new Action<StateLog>(this.detach_StateLogs)); 825 850 this._ParentResource = default(EntityRef<Resource>); 826 851 OnCreated(); … … 950 975 } 951 976 977 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_StateLog", Storage="_StateLogs", ThisKey="ResourceId", OtherKey="SlaveId")] 978 public EntitySet<StateLog> StateLogs 979 { 980 get 981 { 982 return this._StateLogs; 983 } 984 set 985 { 986 this._StateLogs.Assign(value); 987 } 988 } 989 952 990 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_Resource", Storage="_ParentResource", ThisKey="ParentResourceId", OtherKey="ResourceId", IsForeignKey=true)] 953 991 public Resource ParentResource … … 1035 1073 1036 1074 private void detach_UptimeCalendars(UptimeCalendar entity) 1075 { 1076 this.SendPropertyChanging(); 1077 entity.Resource = null; 1078 } 1079 1080 private void attach_StateLogs(StateLog entity) 1081 { 1082 this.SendPropertyChanging(); 1083 entity.Resource = this; 1084 } 1085 1086 private void detach_StateLogs(StateLog entity) 1037 1087 { 1038 1088 this.SendPropertyChanging(); … … 1065 1115 1066 1116 private System.Nullable<System.DateTime> _LastHeartbeat; 1067 1068 private EntitySet<Job> _Jobs;1069 1117 1070 1118 #region Extensibility Method Definitions … … 1098 1146 public Slave() 1099 1147 { 1100 this._Jobs = new EntitySet<Job>(new Action<Job>(this.attach_Jobs), new Action<Job>(this.detach_Jobs));1101 1148 OnCreated(); 1102 1149 } … … 1320 1367 } 1321 1368 } 1322 }1323 1324 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Slave_Job", Storage="_Jobs", ThisKey="ResourceId", OtherKey="SlaveId")]1325 public EntitySet<Job> Jobs1326 {1327 get1328 {1329 return this._Jobs;1330 }1331 set1332 {1333 this._Jobs.Assign(value);1334 }1335 }1336 1337 private void attach_Jobs(Job entity)1338 {1339 this.SendPropertyChanging();1340 entity.Slave = this;1341 }1342 1343 private void detach_Jobs(Job entity)1344 {1345 this.SendPropertyChanging();1346 entity.Slave = null;1347 1369 } 1348 1370 } … … 1373 1395 private System.Nullable<System.Guid> _ParentJobId; 1374 1396 1375 private global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState _JobState; 1376 1377 private System.Nullable<System.Guid> _ResourceId; 1378 1379 private System.Nullable<System.TimeSpan> _ExecutionTime; 1380 1381 private string _Exception; 1382 1383 private System.DateTime _DateCreated; 1384 1385 private System.Nullable<System.DateTime> _DateCalculated; 1386 1387 private System.Nullable<System.DateTime> _DateFinished; 1397 private string _ExecutionTime; 1388 1398 1389 1399 private int _Priority; 1390 1400 1391 private System.Nullable<System.Guid> _ProjectId;1392 1393 private System.Guid _UserId;1394 1395 1401 private int _CoresNeeded; 1396 1402 … … 1399 1405 private System.Nullable<System.DateTime> _LastHeartbeat; 1400 1406 1407 private global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState _State; 1408 1401 1409 private EntitySet<AssignedResource> _AssignedResources; 1402 1410 … … 1407 1415 private EntityRef<JobData> _JobData; 1408 1416 1417 private EntitySet<StateLog> _StateLogs; 1418 1409 1419 private EntityRef<Job> _Job1; 1410 1411 private EntityRef<Slave> _Slave;1412 1420 1413 1421 #region Extensibility Method Definitions … … 1419 1427 partial void OnParentJobIdChanging(System.Nullable<System.Guid> value); 1420 1428 partial void OnParentJobIdChanged(); 1421 partial void OnJobStateChanging(global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState value); 1422 partial void OnJobStateChanged(); 1423 partial void OnSlaveIdChanging(System.Nullable<System.Guid> value); 1424 partial void OnSlaveIdChanged(); 1425 partial void OnExecutionTimeChanging(System.Nullable<System.TimeSpan> value); 1429 partial void OnExecutionTimeChanging(string value); 1426 1430 partial void OnExecutionTimeChanged(); 1427 partial void OnExceptionChanging(string value);1428 partial void OnExceptionChanged();1429 partial void OnDateCreatedChanging(System.DateTime value);1430 partial void OnDateCreatedChanged();1431 partial void OnDateCalculatedChanging(System.Nullable<System.DateTime> value);1432 partial void OnDateCalculatedChanged();1433 partial void OnDateFinishedChanging(System.Nullable<System.DateTime> value);1434 partial void OnDateFinishedChanged();1435 1431 partial void OnPriorityChanging(int value); 1436 1432 partial void OnPriorityChanged(); 1437 partial void OnProjectIdChanging(System.Nullable<System.Guid> value);1438 partial void OnProjectIdChanged();1439 partial void OnUserIdChanging(System.Guid value);1440 partial void OnUserIdChanged();1441 1433 partial void OnCoresNeededChanging(int value); 1442 1434 partial void OnCoresNeededChanged(); … … 1445 1437 partial void OnLastHeartbeatChanging(System.Nullable<System.DateTime> value); 1446 1438 partial void OnLastHeartbeatChanged(); 1439 partial void OnStateChanging(global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState value); 1440 partial void OnStateChanged(); 1447 1441 #endregion 1448 1442 … … 1453 1447 this._Jobs = new EntitySet<Job>(new Action<Job>(this.attach_Jobs), new Action<Job>(this.detach_Jobs)); 1454 1448 this._JobData = default(EntityRef<JobData>); 1449 this._StateLogs = new EntitySet<StateLog>(new Action<StateLog>(this.attach_StateLogs), new Action<StateLog>(this.detach_StateLogs)); 1455 1450 this._Job1 = default(EntityRef<Job>); 1456 this._Slave = default(EntityRef<Slave>);1457 1451 OnCreated(); 1458 1452 } … … 1502 1496 } 1503 1497 1504 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobState", DbType="VarChar(15)", CanBeNull=false)] 1505 public global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState JobState 1506 { 1507 get 1508 { 1509 return this._JobState; 1510 } 1511 set 1512 { 1513 if ((this._JobState != value)) 1514 { 1515 this.OnJobStateChanging(value); 1516 this.SendPropertyChanging(); 1517 this._JobState = value; 1518 this.SendPropertyChanged("JobState"); 1519 this.OnJobStateChanged(); 1520 } 1521 } 1522 } 1523 1524 [global::System.Data.Linq.Mapping.ColumnAttribute(Name="ResourceId", Storage="_ResourceId", DbType="UniqueIdentifier")] 1525 public System.Nullable<System.Guid> SlaveId 1526 { 1527 get 1528 { 1529 return this._ResourceId; 1530 } 1531 set 1532 { 1533 if ((this._ResourceId != value)) 1534 { 1535 this.OnSlaveIdChanging(value); 1536 this.SendPropertyChanging(); 1537 this._ResourceId = value; 1538 this.SendPropertyChanged("SlaveId"); 1539 this.OnSlaveIdChanged(); 1540 } 1541 } 1542 } 1543 1544 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExecutionTime", DbType="Time")] 1545 public System.Nullable<System.TimeSpan> ExecutionTime 1498 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExecutionTime", DbType="VarChar(30)")] 1499 public string ExecutionTime 1546 1500 { 1547 1501 get … … 1562 1516 } 1563 1517 1564 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Exception", DbType="VarChar(MAX)")]1565 public string Exception1566 {1567 get1568 {1569 return this._Exception;1570 }1571 set1572 {1573 if ((this._Exception != value))1574 {1575 this.OnExceptionChanging(value);1576 this.SendPropertyChanging();1577 this._Exception = value;1578 this.SendPropertyChanged("Exception");1579 this.OnExceptionChanged();1580 }1581 }1582 }1583 1584 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCreated", DbType="DateTime")]1585 public System.DateTime DateCreated1586 {1587 get1588 {1589 return this._DateCreated;1590 }1591 set1592 {1593 if ((this._DateCreated != value))1594 {1595 this.OnDateCreatedChanging(value);1596 this.SendPropertyChanging();1597 this._DateCreated = value;1598 this.SendPropertyChanged("DateCreated");1599 this.OnDateCreatedChanged();1600 }1601 }1602 }1603 1604 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCalculated", DbType="DateTime")]1605 public System.Nullable<System.DateTime> DateCalculated1606 {1607 get1608 {1609 return this._DateCalculated;1610 }1611 set1612 {1613 if ((this._DateCalculated != value))1614 {1615 this.OnDateCalculatedChanging(value);1616 this.SendPropertyChanging();1617 this._DateCalculated = value;1618 this.SendPropertyChanged("DateCalculated");1619 this.OnDateCalculatedChanged();1620 }1621 }1622 }1623 1624 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateFinished", DbType="DateTime")]1625 public System.Nullable<System.DateTime> DateFinished1626 {1627 get1628 {1629 return this._DateFinished;1630 }1631 set1632 {1633 if ((this._DateFinished != value))1634 {1635 this.OnDateFinishedChanging(value);1636 this.SendPropertyChanging();1637 this._DateFinished = value;1638 this.SendPropertyChanged("DateFinished");1639 this.OnDateFinishedChanged();1640 }1641 }1642 }1643 1644 1518 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Priority", DbType="Int NOT NULL")] 1645 1519 public int Priority … … 1662 1536 } 1663 1537 1664 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="UniqueIdentifier")]1665 public System.Nullable<System.Guid> ProjectId1666 {1667 get1668 {1669 return this._ProjectId;1670 }1671 set1672 {1673 if ((this._ProjectId != value))1674 {1675 this.OnProjectIdChanging(value);1676 this.SendPropertyChanging();1677 this._ProjectId = value;1678 this.SendPropertyChanged("ProjectId");1679 this.OnProjectIdChanged();1680 }1681 }1682 }1683 1684 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier")]1685 public System.Guid UserId1686 {1687 get1688 {1689 return this._UserId;1690 }1691 set1692 {1693 if ((this._UserId != value))1694 {1695 this.OnUserIdChanging(value);1696 this.SendPropertyChanging();1697 this._UserId = value;1698 this.SendPropertyChanged("UserId");1699 this.OnUserIdChanged();1700 }1701 }1702 }1703 1704 1538 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CoresNeeded", DbType="Int NOT NULL")] 1705 1539 public int CoresNeeded … … 1762 1596 } 1763 1597 1598 [global::System.Data.Linq.Mapping.ColumnAttribute(Name="JobState", Storage="_State", DbType="VarChar(30)", CanBeNull=false)] 1599 public global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState State 1600 { 1601 get 1602 { 1603 return this._State; 1604 } 1605 set 1606 { 1607 if ((this._State != value)) 1608 { 1609 this.OnStateChanging(value); 1610 this.SendPropertyChanging(); 1611 this._State = value; 1612 this.SendPropertyChanged("State"); 1613 this.OnStateChanged(); 1614 } 1615 } 1616 } 1617 1764 1618 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_AssignedResource", Storage="_AssignedResources", ThisKey="JobId", OtherKey="JobId")] 1765 1619 public EntitySet<AssignedResource> AssignedResources … … 1830 1684 } 1831 1685 1686 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_StateLog", Storage="_StateLogs", ThisKey="JobId", OtherKey="JobId")] 1687 public EntitySet<StateLog> StateLogs 1688 { 1689 get 1690 { 1691 return this._StateLogs; 1692 } 1693 set 1694 { 1695 this._StateLogs.Assign(value); 1696 } 1697 } 1698 1832 1699 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_Job", Storage="_Job1", ThisKey="ParentJobId", OtherKey="JobId", IsForeignKey=true)] 1833 1700 public Job ParentJob … … 1864 1731 } 1865 1732 1866 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Slave_Job", Storage="_Slave", ThisKey="SlaveId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="SET NULL")]1867 public Slave Slave1868 {1869 get1870 {1871 return this._Slave.Entity;1872 }1873 set1874 {1875 Slave previousValue = this._Slave.Entity;1876 if (((previousValue != value)1877 || (this._Slave.HasLoadedOrAssignedValue == false)))1878 {1879 this.SendPropertyChanging();1880 if ((previousValue != null))1881 {1882 this._Slave.Entity = null;1883 previousValue.Jobs.Remove(this);1884 }1885 this._Slave.Entity = value;1886 if ((value != null))1887 {1888 value.Jobs.Add(this);1889 this._ResourceId = value.ResourceId;1890 }1891 else1892 {1893 this._ResourceId = default(Nullable<System.Guid>);1894 }1895 this.SendPropertyChanged("Slave");1896 }1897 }1898 }1899 1900 1733 public event PropertyChangingEventHandler PropertyChanging; 1901 1734 … … 1952 1785 this.SendPropertyChanging(); 1953 1786 entity.ParentJob = null; 1787 } 1788 1789 private void attach_StateLogs(StateLog entity) 1790 { 1791 this.SendPropertyChanging(); 1792 entity.Job = this; 1793 } 1794 1795 private void detach_StateLogs(StateLog entity) 1796 { 1797 this.SendPropertyChanging(); 1798 entity.Job = null; 1954 1799 } 1955 1800 } … … 2222 2067 private System.DateTime _DateCreated; 2223 2068 2069 private System.Nullable<System.DateTime> _LastAccessed; 2070 2071 private bool _IsHiveEngine; 2072 2073 private EntitySet<HiveExperimentPermission> _HiveExperimentPermissions; 2074 2224 2075 private EntityRef<Job> _Job; 2225 2076 … … 2236 2087 partial void OnResourceIdsChanging(string value); 2237 2088 partial void OnResourceIdsChanged(); 2238 partial void On UserIdChanging(System.Guid value);2239 partial void On UserIdChanged();2089 partial void OnOwnerUserIdChanging(System.Guid value); 2090 partial void OnOwnerUserIdChanged(); 2240 2091 partial void OnRootJobIdChanging(System.Guid value); 2241 2092 partial void OnRootJobIdChanged(); 2242 2093 partial void OnDateCreatedChanging(System.DateTime value); 2243 2094 partial void OnDateCreatedChanged(); 2095 partial void OnLastAccessedChanging(System.Nullable<System.DateTime> value); 2096 partial void OnLastAccessedChanged(); 2097 partial void OnIsHiveEngineChanging(bool value); 2098 partial void OnIsHiveEngineChanged(); 2244 2099 #endregion 2245 2100 2246 2101 public HiveExperiment() 2247 2102 { 2103 this._HiveExperimentPermissions = new EntitySet<HiveExperimentPermission>(new Action<HiveExperimentPermission>(this.attach_HiveExperimentPermissions), new Action<HiveExperimentPermission>(this.detach_HiveExperimentPermissions)); 2248 2104 this._Job = default(EntityRef<Job>); 2249 2105 OnCreated(); … … 2331 2187 2332 2188 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier")] 2333 public System.Guid UserId2189 public System.Guid OwnerUserId 2334 2190 { 2335 2191 get … … 2341 2197 if ((this._UserId != value)) 2342 2198 { 2343 this.On UserIdChanging(value);2199 this.OnOwnerUserIdChanging(value); 2344 2200 this.SendPropertyChanging(); 2345 2201 this._UserId = value; 2346 this.SendPropertyChanged(" UserId");2347 this.On UserIdChanged();2202 this.SendPropertyChanged("OwnerUserId"); 2203 this.OnOwnerUserIdChanged(); 2348 2204 } 2349 2205 } … … 2394 2250 } 2395 2251 2252 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastAccessed", DbType="DateTime")] 2253 public System.Nullable<System.DateTime> LastAccessed 2254 { 2255 get 2256 { 2257 return this._LastAccessed; 2258 } 2259 set 2260 { 2261 if ((this._LastAccessed != value)) 2262 { 2263 this.OnLastAccessedChanging(value); 2264 this.SendPropertyChanging(); 2265 this._LastAccessed = value; 2266 this.SendPropertyChanged("LastAccessed"); 2267 this.OnLastAccessedChanged(); 2268 } 2269 } 2270 } 2271 2272 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsHiveEngine", DbType="Bit")] 2273 public bool IsHiveEngine 2274 { 2275 get 2276 { 2277 return this._IsHiveEngine; 2278 } 2279 set 2280 { 2281 if ((this._IsHiveEngine != value)) 2282 { 2283 this.OnIsHiveEngineChanging(value); 2284 this.SendPropertyChanging(); 2285 this._IsHiveEngine = value; 2286 this.SendPropertyChanged("IsHiveEngine"); 2287 this.OnIsHiveEngineChanged(); 2288 } 2289 } 2290 } 2291 2292 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="HiveExperiment_HiveExperimentPermission", Storage="_HiveExperimentPermissions", ThisKey="HiveExperimentId", OtherKey="HiveExperimentId")] 2293 public EntitySet<HiveExperimentPermission> HiveExperimentPermissions 2294 { 2295 get 2296 { 2297 return this._HiveExperimentPermissions; 2298 } 2299 set 2300 { 2301 this._HiveExperimentPermissions.Assign(value); 2302 } 2303 } 2304 2396 2305 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_HiveExperiment", Storage="_Job", ThisKey="RootJobId", OtherKey="JobId", IsForeignKey=true, DeleteRule="CASCADE")] 2397 2306 public Job RootJob … … 2431 2340 } 2432 2341 } 2342 2343 private void attach_HiveExperimentPermissions(HiveExperimentPermission entity) 2344 { 2345 this.SendPropertyChanging(); 2346 entity.HiveExperiment = this; 2347 } 2348 2349 private void detach_HiveExperimentPermissions(HiveExperimentPermission entity) 2350 { 2351 this.SendPropertyChanging(); 2352 entity.HiveExperiment = null; 2353 } 2433 2354 } 2434 2355 2435 [global::System.Data.Linq.Mapping.TableAttribute(Name=" ")]2356 [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.JobData")] 2436 2357 public partial class JobData : INotifyPropertyChanging, INotifyPropertyChanged 2437 2358 { … … 2584 2505 } 2585 2506 2586 [global::System.Data.Linq.Mapping.TableAttribute(Name=" ")]2507 [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.PluginData")] 2587 2508 public partial class PluginData : INotifyPropertyChanging, INotifyPropertyChanged 2588 2509 { … … 2758 2679 } 2759 2680 } 2681 2682 [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.StateLog")] 2683 public partial class StateLog : INotifyPropertyChanging, INotifyPropertyChanged 2684 { 2685 2686 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); 2687 2688 private System.Guid _StateLogId; 2689 2690 private global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState _State; 2691 2692 private System.DateTime _DateTime; 2693 2694 private System.Guid _JobId; 2695 2696 private System.Nullable<System.Guid> _UserId; 2697 2698 private System.Nullable<System.Guid> _SlaveId; 2699 2700 private string _Exception; 2701 2702 private EntityRef<Job> _Job; 2703 2704 private EntityRef<Resource> _Resource; 2705 2706 #region Extensibility Method Definitions 2707 partial void OnLoaded(); 2708 partial void OnValidate(System.Data.Linq.ChangeAction action); 2709 partial void OnCreated(); 2710 partial void OnStateLogIdChanging(System.Guid value); 2711 partial void OnStateLogIdChanged(); 2712 partial void OnStateChanging(global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState value); 2713 partial void OnStateChanged(); 2714 partial void OnDateTimeChanging(System.DateTime value); 2715 partial void OnDateTimeChanged(); 2716 partial void OnJobIdChanging(System.Guid value); 2717 partial void OnJobIdChanged(); 2718 partial void OnUserIdChanging(System.Nullable<System.Guid> value); 2719 partial void OnUserIdChanged(); 2720 partial void OnSlaveIdChanging(System.Nullable<System.Guid> value); 2721 partial void OnSlaveIdChanged(); 2722 partial void OnExceptionChanging(string value); 2723 partial void OnExceptionChanged(); 2724 #endregion 2725 2726 public StateLog() 2727 { 2728 this._Job = default(EntityRef<Job>); 2729 this._Resource = default(EntityRef<Resource>); 2730 OnCreated(); 2731 } 2732 2733 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StateLogId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)] 2734 public System.Guid StateLogId 2735 { 2736 get 2737 { 2738 return this._StateLogId; 2739 } 2740 set 2741 { 2742 if ((this._StateLogId != value)) 2743 { 2744 this.OnStateLogIdChanging(value); 2745 this.SendPropertyChanging(); 2746 this._StateLogId = value; 2747 this.SendPropertyChanged("StateLogId"); 2748 this.OnStateLogIdChanged(); 2749 } 2750 } 2751 } 2752 2753 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="VarChar(30) NOT NULL", CanBeNull=false)] 2754 public global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState State 2755 { 2756 get 2757 { 2758 return this._State; 2759 } 2760 set 2761 { 2762 if ((this._State != value)) 2763 { 2764 this.OnStateChanging(value); 2765 this.SendPropertyChanging(); 2766 this._State = value; 2767 this.SendPropertyChanged("State"); 2768 this.OnStateChanged(); 2769 } 2770 } 2771 } 2772 2773 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateTime", DbType="DateTime NOT NULL")] 2774 public System.DateTime DateTime 2775 { 2776 get 2777 { 2778 return this._DateTime; 2779 } 2780 set 2781 { 2782 if ((this._DateTime != value)) 2783 { 2784 this.OnDateTimeChanging(value); 2785 this.SendPropertyChanging(); 2786 this._DateTime = value; 2787 this.SendPropertyChanged("DateTime"); 2788 this.OnDateTimeChanged(); 2789 } 2790 } 2791 } 2792 2793 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL")] 2794 public System.Guid JobId 2795 { 2796 get 2797 { 2798 return this._JobId; 2799 } 2800 set 2801 { 2802 if ((this._JobId != value)) 2803 { 2804 if (this._Job.HasLoadedOrAssignedValue) 2805 { 2806 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); 2807 } 2808 this.OnJobIdChanging(value); 2809 this.SendPropertyChanging(); 2810 this._JobId = value; 2811 this.SendPropertyChanged("JobId"); 2812 this.OnJobIdChanged(); 2813 } 2814 } 2815 } 2816 2817 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier")] 2818 public System.Nullable<System.Guid> UserId 2819 { 2820 get 2821 { 2822 return this._UserId; 2823 } 2824 set 2825 { 2826 if ((this._UserId != value)) 2827 { 2828 this.OnUserIdChanging(value); 2829 this.SendPropertyChanging(); 2830 this._UserId = value; 2831 this.SendPropertyChanged("UserId"); 2832 this.OnUserIdChanged(); 2833 } 2834 } 2835 } 2836 2837 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SlaveId", DbType="UniqueIdentifier")] 2838 public System.Nullable<System.Guid> SlaveId 2839 { 2840 get 2841 { 2842 return this._SlaveId; 2843 } 2844 set 2845 { 2846 if ((this._SlaveId != value)) 2847 { 2848 if (this._Resource.HasLoadedOrAssignedValue) 2849 { 2850 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); 2851 } 2852 this.OnSlaveIdChanging(value); 2853 this.SendPropertyChanging(); 2854 this._SlaveId = value; 2855 this.SendPropertyChanged("SlaveId"); 2856 this.OnSlaveIdChanged(); 2857 } 2858 } 2859 } 2860 2861 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Exception", DbType="VarChar(MAX)", CanBeNull=false)] 2862 public string Exception 2863 { 2864 get 2865 { 2866 return this._Exception; 2867 } 2868 set 2869 { 2870 if ((this._Exception != value)) 2871 { 2872 this.OnExceptionChanging(value); 2873 this.SendPropertyChanging(); 2874 this._Exception = value; 2875 this.SendPropertyChanged("Exception"); 2876 this.OnExceptionChanged(); 2877 } 2878 } 2879 } 2880 2881 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_StateLog", Storage="_Job", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)] 2882 public Job Job 2883 { 2884 get 2885 { 2886 return this._Job.Entity; 2887 } 2888 set 2889 { 2890 Job previousValue = this._Job.Entity; 2891 if (((previousValue != value) 2892 || (this._Job.HasLoadedOrAssignedValue == false))) 2893 { 2894 this.SendPropertyChanging(); 2895 if ((previousValue != null)) 2896 { 2897 this._Job.Entity = null; 2898 previousValue.StateLogs.Remove(this); 2899 } 2900 this._Job.Entity = value; 2901 if ((value != null)) 2902 { 2903 value.StateLogs.Add(this); 2904 this._JobId = value.JobId; 2905 } 2906 else 2907 { 2908 this._JobId = default(System.Guid); 2909 } 2910 this.SendPropertyChanged("Job"); 2911 } 2912 } 2913 } 2914 2915 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_StateLog", Storage="_Resource", ThisKey="SlaveId", OtherKey="ResourceId", IsForeignKey=true)] 2916 public Resource Resource 2917 { 2918 get 2919 { 2920 return this._Resource.Entity; 2921 } 2922 set 2923 { 2924 Resource previousValue = this._Resource.Entity; 2925 if (((previousValue != value) 2926 || (this._Resource.HasLoadedOrAssignedValue == false))) 2927 { 2928 this.SendPropertyChanging(); 2929 if ((previousValue != null)) 2930 { 2931 this._Resource.Entity = null; 2932 previousValue.StateLogs.Remove(this); 2933 } 2934 this._Resource.Entity = value; 2935 if ((value != null)) 2936 { 2937 value.StateLogs.Add(this); 2938 this._SlaveId = value.ResourceId; 2939 } 2940 else 2941 { 2942 this._SlaveId = default(Nullable<System.Guid>); 2943 } 2944 this.SendPropertyChanged("Resource"); 2945 } 2946 } 2947 } 2948 2949 public event PropertyChangingEventHandler PropertyChanging; 2950 2951 public event PropertyChangedEventHandler PropertyChanged; 2952 2953 protected virtual void SendPropertyChanging() 2954 { 2955 if ((this.PropertyChanging != null)) 2956 { 2957 this.PropertyChanging(this, emptyChangingEventArgs); 2958 } 2959 } 2960 2961 protected virtual void SendPropertyChanged(String propertyName) 2962 { 2963 if ((this.PropertyChanged != null)) 2964 { 2965 this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); 2966 } 2967 } 2968 } 2969 2970 [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.HiveExperimentPermission")] 2971 public partial class HiveExperimentPermission : INotifyPropertyChanging, INotifyPropertyChanged 2972 { 2973 2974 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); 2975 2976 private System.Guid _HiveExperimentId; 2977 2978 private System.Guid _GrantedUserId; 2979 2980 private System.Guid _GrantedByUserId; 2981 2982 private global::HeuristicLab.Services.Hive.Common.DataTransfer.Permission _Permission; 2983 2984 private EntityRef<HiveExperiment> _HiveExperiment; 2985 2986 #region Extensibility Method Definitions 2987 partial void OnLoaded(); 2988 partial void OnValidate(System.Data.Linq.ChangeAction action); 2989 partial void OnCreated(); 2990 partial void OnHiveExperimentIdChanging(System.Guid value); 2991 partial void OnHiveExperimentIdChanged(); 2992 partial void OnGrantedUserIdChanging(System.Guid value); 2993 partial void OnGrantedUserIdChanged(); 2994 partial void OnGrantedByUserIdChanging(System.Guid value); 2995 partial void OnGrantedByUserIdChanged(); 2996 partial void OnPermissionChanging(global::HeuristicLab.Services.Hive.Common.DataTransfer.Permission value); 2997 partial void OnPermissionChanged(); 2998 #endregion 2999 3000 public HiveExperimentPermission() 3001 { 3002 this._HiveExperiment = default(EntityRef<HiveExperiment>); 3003 OnCreated(); 3004 } 3005 3006 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HiveExperimentId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)] 3007 public System.Guid HiveExperimentId 3008 { 3009 get 3010 { 3011 return this._HiveExperimentId; 3012 } 3013 set 3014 { 3015 if ((this._HiveExperimentId != value)) 3016 { 3017 if (this._HiveExperiment.HasLoadedOrAssignedValue) 3018 { 3019 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); 3020 } 3021 this.OnHiveExperimentIdChanging(value); 3022 this.SendPropertyChanging(); 3023 this._HiveExperimentId = value; 3024 this.SendPropertyChanged("HiveExperimentId"); 3025 this.OnHiveExperimentIdChanged(); 3026 } 3027 } 3028 } 3029 3030 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GrantedUserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)] 3031 public System.Guid GrantedUserId 3032 { 3033 get 3034 { 3035 return this._GrantedUserId; 3036 } 3037 set 3038 { 3039 if ((this._GrantedUserId != value)) 3040 { 3041 this.OnGrantedUserIdChanging(value); 3042 this.SendPropertyChanging(); 3043 this._GrantedUserId = value; 3044 this.SendPropertyChanged("GrantedUserId"); 3045 this.OnGrantedUserIdChanged(); 3046 } 3047 } 3048 } 3049 3050 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GrantedByUserId", DbType="UniqueIdentifier NOT NULL")] 3051 public System.Guid GrantedByUserId 3052 { 3053 get 3054 { 3055 return this._GrantedByUserId; 3056 } 3057 set 3058 { 3059 if ((this._GrantedByUserId != value)) 3060 { 3061 this.OnGrantedByUserIdChanging(value); 3062 this.SendPropertyChanging(); 3063 this._GrantedByUserId = value; 3064 this.SendPropertyChanged("GrantedByUserId"); 3065 this.OnGrantedByUserIdChanged(); 3066 } 3067 } 3068 } 3069 3070 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Permission", DbType="VarChar(15) NOT NULL", CanBeNull=false)] 3071 public global::HeuristicLab.Services.Hive.Common.DataTransfer.Permission Permission 3072 { 3073 get 3074 { 3075 return this._Permission; 3076 } 3077 set 3078 { 3079 if ((this._Permission != value)) 3080 { 3081 this.OnPermissionChanging(value); 3082 this.SendPropertyChanging(); 3083 this._Permission = value; 3084 this.SendPropertyChanged("Permission"); 3085 this.OnPermissionChanged(); 3086 } 3087 } 3088 } 3089 3090 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="HiveExperiment_HiveExperimentPermission", Storage="_HiveExperiment", ThisKey="HiveExperimentId", OtherKey="HiveExperimentId", IsForeignKey=true)] 3091 public HiveExperiment HiveExperiment 3092 { 3093 get 3094 { 3095 return this._HiveExperiment.Entity; 3096 } 3097 set 3098 { 3099 HiveExperiment previousValue = this._HiveExperiment.Entity; 3100 if (((previousValue != value) 3101 || (this._HiveExperiment.HasLoadedOrAssignedValue == false))) 3102 { 3103 this.SendPropertyChanging(); 3104 if ((previousValue != null)) 3105 { 3106 this._HiveExperiment.Entity = null; 3107 previousValue.HiveExperimentPermissions.Remove(this); 3108 } 3109 this._HiveExperiment.Entity = value; 3110 if ((value != null)) 3111 { 3112 value.HiveExperimentPermissions.Add(this); 3113 this._HiveExperimentId = value.HiveExperimentId; 3114 } 3115 else 3116 { 3117 this._HiveExperimentId = default(System.Guid); 3118 } 3119 this.SendPropertyChanged("HiveExperiment"); 3120 } 3121 } 3122 } 3123 3124 public event PropertyChangingEventHandler PropertyChanging; 3125 3126 public event PropertyChangedEventHandler PropertyChanged; 3127 3128 protected virtual void SendPropertyChanging() 3129 { 3130 if ((this.PropertyChanging != null)) 3131 { 3132 this.PropertyChanging(this, emptyChangingEventArgs); 3133 } 3134 } 3135 3136 protected virtual void SendPropertyChanged(String propertyName) 3137 { 3138 if ((this.PropertyChanged != null)) 3139 { 3140 this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); 3141 } 3142 } 3143 } 2760 3144 } 2761 3145 #pragma warning restore 1591 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Interfaces/IHiveDao.cs
r5404 r5511 1 1 using System; 2 2 using System.Collections.Generic; 3 using System.Linq;4 using System.Text;5 3 using System.Linq.Expressions; 6 4 7 5 namespace HeuristicLab.Services.Hive.DataAccess { 6 using HeuristicLab.Services.Hive.Common.DataTransfer; 8 7 using DT = HeuristicLab.Services.Hive.Common.DataTransfer; 9 8 … … 32 31 void UpdateHiveExperiment(DT.HiveExperiment dto); 33 32 void DeleteHiveExperiment(Guid id); 33 #endregion 34 35 #region HiveExperimentPermission Methods 36 DT.HiveExperimentPermission GetHiveExperimentPermission(Guid hiveExperimentId, Guid grantedUserId); 37 IEnumerable<DT.HiveExperimentPermission> GetHiveExperimentPermissions(Expression<Func<HiveExperimentPermission, bool>> predicate); 38 void AddHiveExperimentPermission(DT.HiveExperimentPermission dto); 39 void UpdateHiveExperimentPermission(DT.HiveExperimentPermission dto); 40 void DeleteHiveExperimentPermission(Guid hiveExperimentId, Guid grantedUserId); 34 41 #endregion 35 42 … … 80 87 81 88 #region Authorization Methods 82 bool IsUserAuthorizedForJobs(Guid userId, params Guid[] jobIds); 89 Permission GetPermissionForJob(Guid jobId, Guid userId); 90 Permission GetPermissionForExperiment(Guid experimentId, Guid userId); 91 Guid GetExperimentForJob(Guid jobId); 83 92 #endregion 84 93 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Tools/CreateHiveDatabaseApplication.cs
r5106 r5511 28 28 class CreateHiveDatabaseApplication : ApplicationBase { 29 29 30 public override void Run() { 30 public override void Run() { 31 31 using (var db = HiveDao.CreateContext()) { 32 32 if (db.DatabaseExists()) -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Tools/prepareHiveDatabase.sql
r5404 r5511 40 40 ALTER TABLE dbo.Job ALTER COLUMN JobId ADD ROWGUIDCOL; 41 41 ALTER TABLE dbo.Job WITH NOCHECK ADD CONSTRAINT [DF_Job_JobId] DEFAULT (newid()) FOR JobId; 42 GO 42 43 43 --ALTER TABLE [dbo].[Job] DROP CONSTRAINT [Slave_Job]44 --ALTER TABLE [dbo].[Job] WITH CHECK ADD CONSTRAINT [Slave_Job] FOREIGN KEY([ResourceId])45 --REFERENCES [dbo].[Resource] ([ResourceId])46 --ON UPDATE CASCADE47 --ON DELETE SET NULL 48 --GO44 ALTER TABLE [dbo].[StateLog] DROP CONSTRAINT [Job_StateLog] 45 ALTER TABLE [dbo].[StateLog] WITH CHECK ADD CONSTRAINT [Job_StateLog] FOREIGN KEY([JobId]) 46 REFERENCES [dbo].[Job] ([JobId]) 47 ON UPDATE CASCADE 48 ON DELETE CASCADE 49 GO 49 50 50 51 ALTER TABLE dbo.Plugin ALTER COLUMN PluginId ADD ROWGUIDCOL; … … 79 80 ALTER TABLE dbo.HiveExperiment ALTER COLUMN HiveExperimentId ADD ROWGUIDCOL; 80 81 ALTER TABLE dbo.HiveExperiment WITH NOCHECK ADD CONSTRAINT [DF_HiveExperiment_HiveExperimentId] DEFAULT (newid()) FOR HiveExperimentId; 82 83 ALTER TABLE dbo.StateLog ALTER COLUMN StateLogId ADD ROWGUIDCOL; 84 ALTER TABLE dbo.StateLog WITH NOCHECK ADD CONSTRAINT [DF_StateLog_StateLogId] DEFAULT (newid()) FOR StateLogId; 85 86 ALTER TABLE [dbo].[HiveExperimentPermission] DROP CONSTRAINT [HiveExperiment_HiveExperimentPermission] 87 ALTER TABLE [dbo].[HiveExperimentPermission] WITH CHECK ADD CONSTRAINT [HiveExperiment_HiveExperimentPermission] FOREIGN KEY([HiveExperimentId]) 88 REFERENCES [dbo].[HiveExperiment] ([HiveExperimentId]) 89 ON UPDATE CASCADE 90 ON DELETE CASCADE 91 GO 81 92 82 93 /* create indices */
Note: See TracChangeset
for help on using the changeset viewer.