Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/07/17 10:21:08 (7 years ago)
Author:
jkarder
Message:

#2839: worked on database model

Location:
branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos
Files:
1 added
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/AssignedTaskResourceDao.cs

    r15410 r15411  
    2525
    2626namespace HeuristicLab.Services.Hive.DataAccess.Daos {
    27   public class AssignedResourceDao : GenericDao<Guid, AssignedResource> {
    28     public AssignedResourceDao(DataContext dataContext) : base(dataContext) { }
     27  public class AssignedTaskResourceDao : GenericDao<Guid, AssignedTaskResource> {
     28    public AssignedTaskResourceDao(DataContext dataContext) : base(dataContext) { }
    2929
    30     public override AssignedResource GetById(Guid id) {
     30    public override AssignedTaskResource GetById(Guid id) {
    3131      throw new NotImplementedException();
    3232    }
    3333
    34     public IQueryable<AssignedResource> GetByTaskId(Guid taskId) {
     34    public IQueryable<AssignedTaskResource> GetByTaskId(Guid taskId) {
    3535      return Table.Where(x => x.TaskId == taskId);
    3636    }
     
    5151      )
    5252      SELECT COUNT(ar.TaskId)
    53       FROM pr JOIN AssignedResources ar ON pr.ResourceId = ar.ResourceId
     53      FROM pr JOIN AssignedTaskResources ar ON pr.ResourceId = ar.ResourceId
    5454      WHERE ar.TaskId = {1}
    5555    ";
  • branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/TaskDao.cs

    r14185 r15411  
    2727namespace HeuristicLab.Services.Hive.DataAccess.Daos {
    2828  public class TaskDao : GenericDao<Guid, Task> {
    29     private Table<AssignedResource> AssignedResourceTable {
    30       get { return DataContext.GetTable<AssignedResource>(); }
     29    private Table<AssignedTaskResource> AssignedTaskResourceTable {
     30      get { return DataContext.GetTable<AssignedTaskResource>(); }
    3131    }
    3232
     
    6565    /// <returns></returns>
    6666    public IEnumerable<Task> GetParentTasks(IEnumerable<Guid> resourceIds, int count, bool finished) {
    67       var query = from ar in AssignedResourceTable
     67      var query = from ar in AssignedTaskResourceTable
    6868                  where resourceIds.Contains(ar.ResourceId)
    6969                     && ar.Task.State == TaskState.Waiting
     
    106106      )
    107107      SELECT DISTINCT t.TaskId, t.JobId, t.Priority
    108       FROM pr JOIN AssignedResources ar ON ar.ResourceId = pr.ResourceId
     108      FROM pr JOIN AssignedTaskResources ar ON ar.ResourceId = pr.ResourceId
    109109          JOIN Task t ON t.TaskId = ar.TaskId
    110110      WHERE NOT (t.IsParentTask = 1 AND t.FinishWhenChildJobsFinished = 1)
Note: See TracChangeset for help on using the changeset viewer.