- Timestamp:
- 04/17/18 13:38:33 (6 years ago)
- Location:
- branches/2839_HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2839_HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimProjectDao.cs
r15671 r15908 55 55 (from dimProject in db.GetTable<DimProject>() 56 56 where dimProject.ProjectId == projectId 57 select dimProject) .ToList());57 select dimProject)); 58 58 private static readonly Func<DataContext, Guid, Guid> GetLastValidIdByProjectIdQuery = 59 59 CompiledQuery.Compile((DataContext db, Guid projectId) => … … 67 67 (from dimProject in db.GetTable<DimProject>() 68 68 where dimProject.DateExpired == null 69 select dimProject) .ToList());69 select dimProject)); 70 70 #endregion 71 71 } -
branches/2839_HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/JobDao.cs
r15643 r15908 60 60 (from job in db.GetTable<Job>() 61 61 where job.State == jobState 62 select job) .ToList());62 select job)); 63 63 private static readonly Func<DataContext, JobState, IEnumerable<Guid>> GetJobIdsByStateQuery = 64 64 CompiledQuery.Compile((DataContext db, JobState jobState) => 65 65 (from job in db.GetTable<Job>() 66 66 where job.State == jobState 67 select job.JobId) .ToList());67 select job.JobId)); 68 68 private static readonly Func<DataContext, IEnumerable<Job>> GetJobsReadyForDeletionQuery = 69 69 CompiledQuery.Compile((DataContext db) => … … 75 75 || task.State == TaskState.Aborted 76 76 || task.State == TaskState.Failed).All(x => x) 77 select job) .ToList());77 select job)); 78 78 #endregion 79 79 -
branches/2839_HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/TaskDao.cs
r15666 r15908 65 65 /// <returns></returns> 66 66 public IEnumerable<Task> GetParentTasks(IEnumerable<Guid> resourceIds, int count, bool finished) { 67 68 67 var query = from t in Table 68 where t.State == TaskState.Waiting 69 69 && t.IsParentTask 70 && !t.Job.AssignedJobResources.Select(x => x.ResourceId).Except(resourceIds).Any()70 && t.Job.AssignedJobResources.All(x => resourceIds.ToList().Contains(x.ResourceId)) 71 71 && t.FinishWhenChildJobsFinished == finished 72 72 && t.ChildJobs.Any() -
branches/2839_HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HeuristicLab.Services.Hive.DataAccess-3.3.csproj
r15658 r15908 153 153 <Compile Include="Properties\AssemblyInfo.cs" /> 154 154 <None Include="Properties\AssemblyInfo.cs.frame" /> 155 <Compile Include="Settings.cs" />156 155 <Compile Include="Settings.Designer.cs"> 157 156 <AutoGen>True</AutoGen> -
branches/2839_HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml
r15671 r15908 37 37 <Column Name="HbInterval" Type="System.Int32" DbType="Int" CanBeNull="false" /> 38 38 <Column Name="OwnerUserId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" /> 39 <Association Name="Resource_AssignedProjectResource" Member="AssignedProjectResources" Storage="_AssignedResources"ThisKey="ResourceId" OtherKey="ResourceId" Type="AssignedProjectResource" />39 <Association Name="Resource_AssignedProjectResource" Member="AssignedProjectResources" ThisKey="ResourceId" OtherKey="ResourceId" Type="AssignedProjectResource" /> 40 40 <Association Name="Resource_Resource" Member="ChildResources" ThisKey="ResourceId" OtherKey="ParentResourceId" Type="Resource" /> 41 41 <Association Name="Resource_Downtime" Member="Downtimes" Storage="_UptimeCalendars" ThisKey="ResourceId" OtherKey="ResourceId" Type="Downtime" /> … … 261 261 <Column Name="StartDate" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" /> 262 262 <Column Name="EndDate" Type="System.DateTime" DbType="DateTime" CanBeNull="true" /> 263 <Association Name="Project_AssignedProjectResource" Member="AssignedProjectResources" Storage="_AssignedResources"ThisKey="ProjectId" OtherKey="ProjectId" Type="AssignedProjectResource" />263 <Association Name="Project_AssignedProjectResource" Member="AssignedProjectResources" ThisKey="ProjectId" OtherKey="ProjectId" Type="AssignedProjectResource" /> 264 264 <Association Name="Project_Job" Member="Jobs" ThisKey="ProjectId" OtherKey="ProjectId" Type="Job" /> 265 265 <Association Name="Project_Project" Member="ChildProjects" Storage="_Projects" ThisKey="ProjectId" OtherKey="ParentProjectId" Type="Project" /> … … 284 284 </Type> 285 285 </Table> 286 <Table Name=" " Member="FactProjectInfos">286 <Table Name="[statistics].FactProjectInfo" Member="FactProjectInfos"> 287 287 <Type Name="FactProjectInfo"> 288 288 <Column Name="ProjectId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" /> … … 296 296 </Type> 297 297 </Table> 298 <Table Name=" " Member="DimProjects">298 <Table Name="[statistics].DimProject" Member="DimProjects"> 299 299 <Type Name="DimProject"> 300 300 <Column Name="Id" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" /> -
branches/2839_HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs
r15760 r15908 941 941 private System.Nullable<System.Guid> _OwnerUserId; 942 942 943 private EntitySet<AssignedProjectResource> _Assigned Resources;943 private EntitySet<AssignedProjectResource> _AssignedProjectResources; 944 944 945 945 private EntitySet<Resource> _ChildResources; … … 973 973 public Resource() 974 974 { 975 this._Assigned Resources = new EntitySet<AssignedProjectResource>(new Action<AssignedProjectResource>(this.attach_AssignedResources), new Action<AssignedProjectResource>(this.detach_AssignedResources));975 this._AssignedProjectResources = new EntitySet<AssignedProjectResource>(new Action<AssignedProjectResource>(this.attach_AssignedProjectResources), new Action<AssignedProjectResource>(this.detach_AssignedProjectResources)); 976 976 this._ChildResources = new EntitySet<Resource>(new Action<Resource>(this.attach_ChildResources), new Action<Resource>(this.detach_ChildResources)); 977 977 this._UptimeCalendars = new EntitySet<Downtime>(new Action<Downtime>(this.attach_UptimeCalendars), new Action<Downtime>(this.detach_UptimeCalendars)); … … 1106 1106 } 1107 1107 1108 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedProjectResource", Storage="_Assigned Resources", ThisKey="ResourceId", OtherKey="ResourceId")]1108 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedProjectResource", Storage="_AssignedProjectResources", ThisKey="ResourceId", OtherKey="ResourceId")] 1109 1109 public EntitySet<AssignedProjectResource> AssignedProjectResources 1110 1110 { 1111 1111 get 1112 1112 { 1113 return this._Assigned Resources;1114 } 1115 set 1116 { 1117 this._Assigned Resources.Assign(value);1113 return this._AssignedProjectResources; 1114 } 1115 set 1116 { 1117 this._AssignedProjectResources.Assign(value); 1118 1118 } 1119 1119 } … … 1225 1225 } 1226 1226 1227 private void attach_Assigned Resources(AssignedProjectResource entity)1227 private void attach_AssignedProjectResources(AssignedProjectResource entity) 1228 1228 { 1229 1229 this.SendPropertyChanging(); … … 1231 1231 } 1232 1232 1233 private void detach_Assigned Resources(AssignedProjectResource entity)1233 private void detach_AssignedProjectResources(AssignedProjectResource entity) 1234 1234 { 1235 1235 this.SendPropertyChanging(); … … 5651 5651 private System.Nullable<System.DateTime> _EndDate; 5652 5652 5653 private EntitySet<AssignedProjectResource> _Assigned Resources;5653 private EntitySet<AssignedProjectResource> _AssignedProjectResources; 5654 5654 5655 5655 private EntitySet<Job> _Jobs; … … 5685 5685 public Project() 5686 5686 { 5687 this._Assigned Resources = new EntitySet<AssignedProjectResource>(new Action<AssignedProjectResource>(this.attach_AssignedResources), new Action<AssignedProjectResource>(this.detach_AssignedResources));5687 this._AssignedProjectResources = new EntitySet<AssignedProjectResource>(new Action<AssignedProjectResource>(this.attach_AssignedProjectResources), new Action<AssignedProjectResource>(this.detach_AssignedProjectResources)); 5688 5688 this._Jobs = new EntitySet<Job>(new Action<Job>(this.attach_Jobs), new Action<Job>(this.detach_Jobs)); 5689 5689 this._Projects = new EntitySet<Project>(new Action<Project>(this.attach_Projects), new Action<Project>(this.detach_Projects)); … … 5857 5857 } 5858 5858 5859 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_AssignedProjectResource", Storage="_Assigned Resources", ThisKey="ProjectId", OtherKey="ProjectId")]5859 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_AssignedProjectResource", Storage="_AssignedProjectResources", ThisKey="ProjectId", OtherKey="ProjectId")] 5860 5860 public EntitySet<AssignedProjectResource> AssignedProjectResources 5861 5861 { 5862 5862 get 5863 5863 { 5864 return this._Assigned Resources;5865 } 5866 set 5867 { 5868 this._Assigned Resources.Assign(value);5864 return this._AssignedProjectResources; 5865 } 5866 set 5867 { 5868 this._AssignedProjectResources.Assign(value); 5869 5869 } 5870 5870 } … … 5963 5963 } 5964 5964 5965 private void attach_Assigned Resources(AssignedProjectResource entity)5965 private void attach_AssignedProjectResources(AssignedProjectResource entity) 5966 5966 { 5967 5967 this.SendPropertyChanging(); … … 5969 5969 } 5970 5970 5971 private void detach_Assigned Resources(AssignedProjectResource entity)5971 private void detach_AssignedProjectResources(AssignedProjectResource entity) 5972 5972 { 5973 5973 this.SendPropertyChanging(); … … 6331 6331 } 6332 6332 6333 [global::System.Data.Linq.Mapping.TableAttribute(Name=" ")]6333 [global::System.Data.Linq.Mapping.TableAttribute(Name="[statistics].FactProjectInfo")] 6334 6334 public partial class FactProjectInfo : INotifyPropertyChanging, INotifyPropertyChanged 6335 6335 { … … 6595 6595 } 6596 6596 6597 [global::System.Data.Linq.Mapping.TableAttribute(Name=" ")]6597 [global::System.Data.Linq.Mapping.TableAttribute(Name="[statistics].DimProject")] 6598 6598 public partial class DimProject : INotifyPropertyChanging, INotifyPropertyChanged 6599 6599 {
Note: See TracChangeset
for help on using the changeset viewer.