Changeset 2066 for trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/3.2/dsHiveServer.Designer.cs
- Timestamp:
- 06/19/09 13:05:47 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/3.2/dsHiveServer.Designer.cs
r2001 r2066 76 76 private global::System.Data.DataRelation relationR_37; 77 77 78 private global::System.Data.DataRelation relationR_44; 79 78 80 private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; 79 81 … … 454 456 this.relationR_56 = this.Relations["R_56"]; 455 457 this.relationR_37 = this.Relations["R_37"]; 458 this.relationR_44 = this.Relations["R_44"]; 456 459 } 457 460 … … 541 544 this.tableClient.ClientConfigIdColumn}, false); 542 545 this.Relations.Add(this.relationR_37); 546 this.relationR_44 = new global::System.Data.DataRelation("R_44", new global::System.Data.DataColumn[] { 547 this.tableJob.JobIdColumn}, new global::System.Data.DataColumn[] { 548 this.tableJob.ParentJobIdColumn}, false); 549 this.Relations.Add(this.relationR_44); 543 550 } 544 551 … … 1938 1945 1939 1946 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 1940 public JobRow AddJobRow(System.Guid JobId, System.Guid ParentJobId, string JobState, ClientRow parentClientRowByR_21, double Percentage, byte[] SerializedJob, System.DateTime DateCreated, System.DateTime DateCalculated, int Priority, ProjectRow parentProjectRowByR_49, System.Guid UserId, int CoresNeeded, int MemoryNeeded) {1947 public JobRow AddJobRow(System.Guid JobId, JobRow parentJobRowByR_44, string JobState, ClientRow parentClientRowByR_21, double Percentage, byte[] SerializedJob, System.DateTime DateCreated, System.DateTime DateCalculated, int Priority, ProjectRow parentProjectRowByR_49, System.Guid UserId, int CoresNeeded, int MemoryNeeded) { 1941 1948 JobRow rowJobRow = ((JobRow)(this.NewRow())); 1942 1949 object[] columnValuesArray = new object[] { 1943 1950 JobId, 1944 ParentJobId,1951 null, 1945 1952 JobState, 1946 1953 null, … … 1954 1961 CoresNeeded, 1955 1962 MemoryNeeded}; 1963 if ((parentJobRowByR_44 != null)) { 1964 columnValuesArray[1] = parentJobRowByR_44[0]; 1965 } 1956 1966 if ((parentClientRowByR_21 != null)) { 1957 1967 columnValuesArray[3] = parentClientRowByR_21[0]; … … 4457 4467 4458 4468 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 4469 public JobRow JobRowParent { 4470 get { 4471 return ((JobRow)(this.GetParentRow(this.Table.ParentRelations["R_44"]))); 4472 } 4473 set { 4474 this.SetParentRow(value, this.Table.ParentRelations["R_44"]); 4475 } 4476 } 4477 4478 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 4459 4479 public bool IsParentJobIdNull() { 4460 4480 return this.IsNull(this.tableJob.ParentJobIdColumn); … … 4603 4623 else { 4604 4624 return ((AssignedResourcesRow[])(base.GetChildRows(this.Table.ChildRelations["R_56"]))); 4625 } 4626 } 4627 4628 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 4629 public JobRow[] GetJobRows() { 4630 if ((this.Table.ChildRelations["R_44"] == null)) { 4631 return new JobRow[0]; 4632 } 4633 else { 4634 return ((JobRow[])(base.GetChildRows(this.Table.ChildRelations["R_44"]))); 4605 4635 } 4606 4636 } … … 7402 7432 this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); 7403 7433 this._adapter.DeleteCommand.Connection = this.Connection; 7404 this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Job] WHERE (([JobId] = @Original_JobId) AND ((@IsNull_ParentJobId = 1 AND [ParentJobId] IS NULL) OR ([ParentJobId] = @Original_ParentJobId)) AND ((@IsNull_ JobState = 1 AND [JobState] IS NULL) OR ([JobState] = @Original_JobState)) AND ((@IsNull_ResourceId = 1 AND [ResourceId] IS NULL) OR ([ResourceId] = @Original_ResourceId)) AND ((@IsNull_Percentage = 1 AND [Percentage] IS NULL) OR ([Percentage] = @Original_Percentage)) AND ((@IsNull_DateCreated = 1 AND [DateCreated] IS NULL) OR ([DateCreated] = @Original_DateCreated)) AND ((@IsNull_DateCalculated = 1 AND [DateCalculated] IS NULL) OR ([DateCalculated] = @Original_DateCalculated)) AND ((@IsNull_Priority = 1 AND [Priority] IS NULL) OR ([Priority] = @Original_Priority)) AND ((@IsNull_ProjectId = 1 AND [ProjectId] IS NULL) OR ([ProjectId] = @Original_ProjectId)) AND ((@IsNull_UserId = 1 AND [UserId] IS NULL) OR ([UserId] = @Original_UserId)) AND ((@IsNull_CoresNeeded = 1 AND [CoresNeeded] IS NULL) OR ([CoresNeeded] = @Original_CoresNeeded)) AND ((@IsNull_MemoryNeeded = 1 AND [MemoryNeeded] IS NULL) OR ([MemoryNeeded] = @Original_MemoryNeeded)))";7434 this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Job] WHERE (([JobId] = @Original_JobId) AND ((@IsNull_ParentJobId = 1 AND [ParentJobId] IS NULL) OR ([ParentJobId] = @Original_ParentJobId)) AND ((@IsNull_ResourceId = 1 AND [ResourceId] IS NULL) OR ([ResourceId] = @Original_ResourceId)) AND ((@IsNull_Percentage = 1 AND [Percentage] IS NULL) OR ([Percentage] = @Original_Percentage)) AND ((@IsNull_DateCreated = 1 AND [DateCreated] IS NULL) OR ([DateCreated] = @Original_DateCreated)) AND ((@IsNull_DateCalculated = 1 AND [DateCalculated] IS NULL) OR ([DateCalculated] = @Original_DateCalculated)) AND ((@IsNull_Priority = 1 AND [Priority] IS NULL) OR ([Priority] = @Original_Priority)) AND ((@IsNull_ProjectId = 1 AND [ProjectId] IS NULL) OR ([ProjectId] = @Original_ProjectId)) AND ((@IsNull_UserId = 1 AND [UserId] IS NULL) OR ([UserId] = @Original_UserId)) AND ((@IsNull_CoresNeeded = 1 AND [CoresNeeded] IS NULL) OR ([CoresNeeded] = @Original_CoresNeeded)) AND ((@IsNull_MemoryNeeded = 1 AND [MemoryNeeded] IS NULL) OR ([MemoryNeeded] = @Original_MemoryNeeded)))"; 7405 7435 this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; 7406 7436 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_JobId", global::System.Data.SqlDbType.UniqueIdentifier, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); 7407 7437 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ParentJobId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ParentJobId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); 7408 7438 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ParentJobId", global::System.Data.SqlDbType.UniqueIdentifier, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ParentJobId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); 7409 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_JobState", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobState", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));7410 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_JobState", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobState", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));7411 7439 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ResourceId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ResourceId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); 7412 7440 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ResourceId", global::System.Data.SqlDbType.UniqueIdentifier, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ResourceId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); … … 7430 7458 this._adapter.InsertCommand.Connection = this.Connection; 7431 7459 this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Job] ([JobId], [ParentJobId], [JobState], [ResourceId], [Percentage], [SerializedJob], [DateCreated], [DateCalculated], [Priority], [ProjectId], [UserId], [CoresNeeded], [MemoryNeeded]) VALUES (@JobId, @ParentJobId, @JobState, @ResourceId, @Percentage, @SerializedJob, @DateCreated, @DateCalculated, @Priority, @ProjectId, @UserId, @CoresNeeded, @MemoryNeeded); 7432 SELECT JobId, ParentJobId, JobState, ResourceId, Percentage, SerializedJob, DateCreated, DateCalculated, Priority, ProjectId, UserId, CoresNeeded, MemoryNeeded FROM Job WHERE (JobId = @JobId) ORDER BY Priority";7460 WITH ClientGroups(ClientGroupId) AS (SELECT ClientGroupId FROM ClientGroup_Resource WHERE (ResourceId = @ResourceId) UNION ALL SELECT g.ClientGroupId FROM ClientGroup_Resource AS g INNER JOIN ClientGroups AS gr ON gr.ClientGroupId = g.ResourceId) SELECT JobId, ParentJobId, JobState, ResourceId, Percentage, SerializedJob, DateCreated, DateCalculated, Priority, ProjectId, UserId, CoresNeeded, MemoryNeeded FROM Job WHERE (JobId = @JobId) ORDER BY Priority"; 7433 7461 this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; 7434 7462 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@JobId", global::System.Data.SqlDbType.UniqueIdentifier, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); … … 7453 7481 "[CoresNeeded] = @CoresNeeded, [MemoryNeeded] = @MemoryNeeded WHERE (([JobId] = @" + 7454 7482 "Original_JobId) AND ((@IsNull_ParentJobId = 1 AND [ParentJobId] IS NULL) OR ([Pa" + 7455 "rentJobId] = @Original_ParentJobId)) AND ((@IsNull_JobState = 1 AND [JobState] I" + 7456 "S NULL) OR ([JobState] = @Original_JobState)) AND ((@IsNull_ResourceId = 1 AND [" + 7457 "ResourceId] IS NULL) OR ([ResourceId] = @Original_ResourceId)) AND ((@IsNull_Per" + 7458 "centage = 1 AND [Percentage] IS NULL) OR ([Percentage] = @Original_Percentage)) " + 7459 "AND ((@IsNull_DateCreated = 1 AND [DateCreated] IS NULL) OR ([DateCreated] = @Or" + 7460 "iginal_DateCreated)) AND ((@IsNull_DateCalculated = 1 AND [DateCalculated] IS NU" + 7461 "LL) OR ([DateCalculated] = @Original_DateCalculated)) AND ((@IsNull_Priority = 1" + 7462 " AND [Priority] IS NULL) OR ([Priority] = @Original_Priority)) AND ((@IsNull_Pro" + 7463 "jectId = 1 AND [ProjectId] IS NULL) OR ([ProjectId] = @Original_ProjectId)) AND " + 7464 "((@IsNull_UserId = 1 AND [UserId] IS NULL) OR ([UserId] = @Original_UserId)) AND" + 7465 " ((@IsNull_CoresNeeded = 1 AND [CoresNeeded] IS NULL) OR ([CoresNeeded] = @Origi" + 7466 "nal_CoresNeeded)) AND ((@IsNull_MemoryNeeded = 1 AND [MemoryNeeded] IS NULL) OR " + 7467 "([MemoryNeeded] = @Original_MemoryNeeded)));\r\nSELECT JobId, ParentJobId, JobStat" + 7468 "e, ResourceId, Percentage, SerializedJob, DateCreated, DateCalculated, Priority," + 7469 " ProjectId, UserId, CoresNeeded, MemoryNeeded FROM Job WHERE (JobId = @JobId) OR" + 7470 "DER BY Priority"; 7483 "rentJobId] = @Original_ParentJobId)) AND ((@IsNull_ResourceId = 1 AND [ResourceI" + 7484 "d] IS NULL) OR ([ResourceId] = @Original_ResourceId)) AND ((@IsNull_Percentage =" + 7485 " 1 AND [Percentage] IS NULL) OR ([Percentage] = @Original_Percentage)) AND ((@Is" + 7486 "Null_DateCreated = 1 AND [DateCreated] IS NULL) OR ([DateCreated] = @Original_Da" + 7487 "teCreated)) AND ((@IsNull_DateCalculated = 1 AND [DateCalculated] IS NULL) OR ([" + 7488 "DateCalculated] = @Original_DateCalculated)) AND ((@IsNull_Priority = 1 AND [Pri" + 7489 "ority] IS NULL) OR ([Priority] = @Original_Priority)) AND ((@IsNull_ProjectId = " + 7490 "1 AND [ProjectId] IS NULL) OR ([ProjectId] = @Original_ProjectId)) AND ((@IsNull" + 7491 "_UserId = 1 AND [UserId] IS NULL) OR ([UserId] = @Original_UserId)) AND ((@IsNul" + 7492 "l_CoresNeeded = 1 AND [CoresNeeded] IS NULL) OR ([CoresNeeded] = @Original_Cores" + 7493 "Needed)) AND ((@IsNull_MemoryNeeded = 1 AND [MemoryNeeded] IS NULL) OR ([MemoryN" + 7494 "eeded] = @Original_MemoryNeeded)));\r\nWITH ClientGroups(ClientGroupId) AS (SELECT" + 7495 " ClientGroupId FROM ClientGroup_Resource WHERE (ResourceId = @ResourceId) UNION " + 7496 "ALL SELECT g.ClientGroupId FROM ClientGroup_Resource AS g INNER JOIN ClientGroup" + 7497 "s AS gr ON gr.ClientGroupId = g.ResourceId) SELECT JobId, ParentJobId, JobState," + 7498 " ResourceId, Percentage, SerializedJob, DateCreated, DateCalculated, Priority, P" + 7499 "rojectId, UserId, CoresNeeded, MemoryNeeded FROM Job WHERE (JobId = @JobId) ORDE" + 7500 "R BY Priority"; 7471 7501 this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; 7472 7502 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@JobId", global::System.Data.SqlDbType.UniqueIdentifier, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); … … 7486 7516 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ParentJobId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ParentJobId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); 7487 7517 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ParentJobId", global::System.Data.SqlDbType.UniqueIdentifier, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ParentJobId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); 7488 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_JobState", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobState", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));7489 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_JobState", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobState", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));7490 7518 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ResourceId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ResourceId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); 7491 7519 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ResourceId", global::System.Data.SqlDbType.UniqueIdentifier, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ResourceId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); … … 7519 7547 this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); 7520 7548 this._commandCollection[0].Connection = this.Connection; 7521 this._commandCollection[0].CommandText = "SELECT * FROM dbo.Job WHERE JobState = @State AND CoresNeeded <= @CoresNeeded AND" + 7522 " MemoryNeeded <= @MemoryNeeded ORDER BY Priority"; 7549 this._commandCollection[0].CommandText = @"WITH ClientGroups(ClientGroupId) 7550 AS 7551 ( 7552 -- Anchor member definition 7553 SELECT ClientGroupId 7554 FROM ClientGroup_Resource 7555 WHERE ResourceId = @ResourceId 7556 UNION ALL 7557 -- Recursive member definition 7558 SELECT g.ClientGroupId 7559 FROM ClientGroup_Resource AS g 7560 INNER JOIN ClientGroups AS gr 7561 ON gr.ClientGroupId = g.ResourceId 7562 ) 7563 7564 SELECT * FROM dbo.Job WHERE JobState =@State AND CoresNeeded <= @CoresNeeded 7565 AND MemoryNeeded <= @MemoryNeeded AND 7566 ( 7567 -- no assigned resources - can be executed everywhere 7568 NOT EXISTS (SELECT * FROM AssignedResources 7569 WHERE JobId = Job.JobId) 7570 7571 -- the resource itself is assigned to the job 7572 OR EXISTS ((SELECT * FROM AssignedResources 7573 WHERE JobId = Job.JobId 7574 AND ResourceId = @ResourceId)) 7575 7576 -- a group of the resource is assigned to the job 7577 OR EXISTS ((SELECT * FROM AssignedResources 7578 WHERE JobId = Job.JobId AND 7579 ResourceId IN (SELECT * FROM ClientGroups)))) 7580 ORDER BY Priority"; 7523 7581 this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; 7524 this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@State", global::System.Data.SqlDbType.VarChar, 18, global::System.Data.ParameterDirection.Input, 0, 0, "JobState", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));7582 this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@State", global::System.Data.SqlDbType.VarChar, 2147483647, global::System.Data.ParameterDirection.Input, 0, 0, "JobState", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 7525 7583 this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CoresNeeded", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "CoresNeeded", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 7526 7584 this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MemoryNeeded", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "MemoryNeeded", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 7585 this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ResourceId", global::System.Data.SqlDbType.UniqueIdentifier, 16, global::System.Data.ParameterDirection.Input, 0, 0, "ResourceId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 7527 7586 this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); 7528 7587 this._commandCollection[1].Connection = this.Connection; … … 7533 7592 this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); 7534 7593 this._commandCollection[2].Connection = this.Connection; 7535 this._commandCollection[2].CommandText = @"SELECT CoresNeeded, DateCalculated, DateCreated, JobId, JobState, MemoryNeeded, ParentJobId, Percentage, Priority, ProjectId, ResourceId, SerializedJob, UserId FROM Job WHERE ( (JobState = 'calculating') OR (JobState = 'abort') OR (JobState = 'requestSnapshot ') OR (JobState = 'requestSnapshotSent')) AND (ResourceId = @ResourceId)";7594 this._commandCollection[2].CommandText = @"SELECT CoresNeeded, DateCalculated, DateCreated, JobId, JobState, MemoryNeeded, ParentJobId, Percentage, Priority, ProjectId, ResourceId, SerializedJob, UserId FROM Job WHERE (JobState = 'calculating' OR JobState = 'abort' OR JobState = 'requestSnapshot ' OR JobState = 'requestSnapshotSent') AND (ResourceId = @ResourceId)"; 7536 7595 this._commandCollection[2].CommandType = global::System.Data.CommandType.Text; 7537 7596 this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ResourceId", global::System.Data.SqlDbType.UniqueIdentifier, 16, global::System.Data.ParameterDirection.Input, 0, 0, "ResourceId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); … … 7566 7625 this._commandCollection[7] = new global::System.Data.SqlClient.SqlCommand(); 7567 7626 this._commandCollection[7].Connection = this.Connection; 7568 this._commandCollection[7].CommandText = "SELECT * FROM dbo.Job WHERE ProjectId = @ProjectId"; 7627 this._commandCollection[7].CommandText = "SELECT CoresNeeded, DateCalculated, DateCreated, JobId, JobState, MemoryNeeded, P" + 7628 "arentJobId, Percentage, Priority, ProjectId, ResourceId, SerializedJob, UserId F" + 7629 "ROM Job WHERE (ProjectId = @ProjectId)"; 7569 7630 this._commandCollection[7].CommandType = global::System.Data.CommandType.Text; 7570 7631 this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProjectId", global::System.Data.SqlDbType.UniqueIdentifier, 16, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); … … 7588 7649 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 7589 7650 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] 7590 public virtual int FillByStateCoresMemory (dsHiveServer.JobDataTable dataTable, string State, global::System.Nullable<int> CoresNeeded, global::System.Nullable<int> MemoryNeeded) {7651 public virtual int FillByStateCoresMemoryResource(dsHiveServer.JobDataTable dataTable, string State, global::System.Nullable<int> CoresNeeded, global::System.Nullable<int> MemoryNeeded, System.Guid ResourceId) { 7591 7652 this.Adapter.SelectCommand = this.CommandCollection[0]; 7592 7653 if ((State == null)) { … … 7608 7669 this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; 7609 7670 } 7671 this.Adapter.SelectCommand.Parameters[3].Value = ((System.Guid)(ResourceId)); 7610 7672 if ((this.ClearBeforeFill == true)) { 7611 7673 dataTable.Clear(); … … 7618 7680 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 7619 7681 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] 7620 public virtual dsHiveServer.JobDataTable GetDataByStateCoresMemory (string State, global::System.Nullable<int> CoresNeeded, global::System.Nullable<int> MemoryNeeded) {7682 public virtual dsHiveServer.JobDataTable GetDataByStateCoresMemoryResource(string State, global::System.Nullable<int> CoresNeeded, global::System.Nullable<int> MemoryNeeded, System.Guid ResourceId) { 7621 7683 this.Adapter.SelectCommand = this.CommandCollection[0]; 7622 7684 if ((State == null)) { … … 7638 7700 this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; 7639 7701 } 7702 this.Adapter.SelectCommand.Parameters[3].Value = ((System.Guid)(ResourceId)); 7640 7703 dsHiveServer.JobDataTable dataTable = new dsHiveServer.JobDataTable(); 7641 7704 this.Adapter.Fill(dataTable); … … 7945 8008 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 7946 8009 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] 7947 public virtual int Delete(System.Guid Original_JobId, global::System.Nullable<global::System.Guid> Original_ParentJobId, string Original_JobState,global::System.Nullable<global::System.Guid> Original_ResourceId, global::System.Nullable<double> Original_Percentage, global::System.Nullable<global::System.DateTime> Original_DateCreated, global::System.Nullable<global::System.DateTime> Original_DateCalculated, global::System.Nullable<int> Original_Priority, global::System.Nullable<global::System.Guid> Original_ProjectId, global::System.Nullable<global::System.Guid> Original_UserId, global::System.Nullable<int> Original_CoresNeeded, global::System.Nullable<int> Original_MemoryNeeded) {8010 public virtual int Delete(System.Guid Original_JobId, global::System.Nullable<global::System.Guid> Original_ParentJobId, global::System.Nullable<global::System.Guid> Original_ResourceId, global::System.Nullable<double> Original_Percentage, global::System.Nullable<global::System.DateTime> Original_DateCreated, global::System.Nullable<global::System.DateTime> Original_DateCalculated, global::System.Nullable<int> Original_Priority, global::System.Nullable<global::System.Guid> Original_ProjectId, global::System.Nullable<global::System.Guid> Original_UserId, global::System.Nullable<int> Original_CoresNeeded, global::System.Nullable<int> Original_MemoryNeeded) { 7948 8011 this.Adapter.DeleteCommand.Parameters[0].Value = ((System.Guid)(Original_JobId)); 7949 8012 if ((Original_ParentJobId.HasValue == true)) { … … 7955 8018 this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; 7956 8019 } 7957 if ((Original_JobState == null)) { 8020 if ((Original_ResourceId.HasValue == true)) { 8021 this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); 8022 this.Adapter.DeleteCommand.Parameters[4].Value = ((System.Guid)(Original_ResourceId.Value)); 8023 } 8024 else { 7958 8025 this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); 7959 8026 this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value; 7960 8027 } 7961 else { 7962 this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); 7963 this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_JobState)); 7964 } 7965 if ((Original_ResourceId.HasValue == true)) { 8028 if ((Original_Percentage.HasValue == true)) { 7966 8029 this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); 7967 this.Adapter.DeleteCommand.Parameters[6].Value = (( System.Guid)(Original_ResourceId.Value));8030 this.Adapter.DeleteCommand.Parameters[6].Value = ((double)(Original_Percentage.Value)); 7968 8031 } 7969 8032 else { … … 7971 8034 this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value; 7972 8035 } 7973 if ((Original_ Percentage.HasValue == true)) {8036 if ((Original_DateCreated.HasValue == true)) { 7974 8037 this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0)); 7975 this.Adapter.DeleteCommand.Parameters[8].Value = (( double)(Original_Percentage.Value));8038 this.Adapter.DeleteCommand.Parameters[8].Value = ((System.DateTime)(Original_DateCreated.Value)); 7976 8039 } 7977 8040 else { … … 7979 8042 this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value; 7980 8043 } 7981 if ((Original_DateC reated.HasValue == true)) {8044 if ((Original_DateCalculated.HasValue == true)) { 7982 8045 this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0)); 7983 this.Adapter.DeleteCommand.Parameters[10].Value = ((System.DateTime)(Original_DateC reated.Value));8046 this.Adapter.DeleteCommand.Parameters[10].Value = ((System.DateTime)(Original_DateCalculated.Value)); 7984 8047 } 7985 8048 else { … … 7987 8050 this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value; 7988 8051 } 7989 if ((Original_ DateCalculated.HasValue == true)) {8052 if ((Original_Priority.HasValue == true)) { 7990 8053 this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0)); 7991 this.Adapter.DeleteCommand.Parameters[12].Value = (( System.DateTime)(Original_DateCalculated.Value));8054 this.Adapter.DeleteCommand.Parameters[12].Value = ((int)(Original_Priority.Value)); 7992 8055 } 7993 8056 else { … … 7995 8058 this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value; 7996 8059 } 7997 if ((Original_Pr iority.HasValue == true)) {8060 if ((Original_ProjectId.HasValue == true)) { 7998 8061 this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0)); 7999 this.Adapter.DeleteCommand.Parameters[14].Value = (( int)(Original_Priority.Value));8062 this.Adapter.DeleteCommand.Parameters[14].Value = ((System.Guid)(Original_ProjectId.Value)); 8000 8063 } 8001 8064 else { … … 8003 8066 this.Adapter.DeleteCommand.Parameters[14].Value = global::System.DBNull.Value; 8004 8067 } 8005 if ((Original_ ProjectId.HasValue == true)) {8068 if ((Original_UserId.HasValue == true)) { 8006 8069 this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(0)); 8007 this.Adapter.DeleteCommand.Parameters[16].Value = ((System.Guid)(Original_ ProjectId.Value));8070 this.Adapter.DeleteCommand.Parameters[16].Value = ((System.Guid)(Original_UserId.Value)); 8008 8071 } 8009 8072 else { … … 8011 8074 this.Adapter.DeleteCommand.Parameters[16].Value = global::System.DBNull.Value; 8012 8075 } 8013 if ((Original_ UserId.HasValue == true)) {8076 if ((Original_CoresNeeded.HasValue == true)) { 8014 8077 this.Adapter.DeleteCommand.Parameters[17].Value = ((object)(0)); 8015 this.Adapter.DeleteCommand.Parameters[18].Value = (( System.Guid)(Original_UserId.Value));8078 this.Adapter.DeleteCommand.Parameters[18].Value = ((int)(Original_CoresNeeded.Value)); 8016 8079 } 8017 8080 else { … … 8019 8082 this.Adapter.DeleteCommand.Parameters[18].Value = global::System.DBNull.Value; 8020 8083 } 8021 if ((Original_ CoresNeeded.HasValue == true)) {8084 if ((Original_MemoryNeeded.HasValue == true)) { 8022 8085 this.Adapter.DeleteCommand.Parameters[19].Value = ((object)(0)); 8023 this.Adapter.DeleteCommand.Parameters[20].Value = ((int)(Original_ CoresNeeded.Value));8086 this.Adapter.DeleteCommand.Parameters[20].Value = ((int)(Original_MemoryNeeded.Value)); 8024 8087 } 8025 8088 else { 8026 8089 this.Adapter.DeleteCommand.Parameters[19].Value = ((object)(1)); 8027 8090 this.Adapter.DeleteCommand.Parameters[20].Value = global::System.DBNull.Value; 8028 }8029 if ((Original_MemoryNeeded.HasValue == true)) {8030 this.Adapter.DeleteCommand.Parameters[21].Value = ((object)(0));8031 this.Adapter.DeleteCommand.Parameters[22].Value = ((int)(Original_MemoryNeeded.Value));8032 }8033 else {8034 this.Adapter.DeleteCommand.Parameters[21].Value = ((object)(1));8035 this.Adapter.DeleteCommand.Parameters[22].Value = global::System.DBNull.Value;8036 8091 } 8037 8092 global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; … … 8163 8218 System.Guid Original_JobId, 8164 8219 global::System.Nullable<global::System.Guid> Original_ParentJobId, 8165 string Original_JobState,8166 8220 global::System.Nullable<global::System.Guid> Original_ResourceId, 8167 8221 global::System.Nullable<double> Original_Percentage, … … 8255 8309 this.Adapter.UpdateCommand.Parameters[15].Value = global::System.DBNull.Value; 8256 8310 } 8257 if ((Original_JobState == null)) { 8311 if ((Original_ResourceId.HasValue == true)) { 8312 this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(0)); 8313 this.Adapter.UpdateCommand.Parameters[17].Value = ((System.Guid)(Original_ResourceId.Value)); 8314 } 8315 else { 8258 8316 this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(1)); 8259 8317 this.Adapter.UpdateCommand.Parameters[17].Value = global::System.DBNull.Value; 8260 8318 } 8261 else { 8262 this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(0)); 8263 this.Adapter.UpdateCommand.Parameters[17].Value = ((string)(Original_JobState)); 8264 } 8265 if ((Original_ResourceId.HasValue == true)) { 8319 if ((Original_Percentage.HasValue == true)) { 8266 8320 this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(0)); 8267 this.Adapter.UpdateCommand.Parameters[19].Value = (( System.Guid)(Original_ResourceId.Value));8321 this.Adapter.UpdateCommand.Parameters[19].Value = ((double)(Original_Percentage.Value)); 8268 8322 } 8269 8323 else { … … 8271 8325 this.Adapter.UpdateCommand.Parameters[19].Value = global::System.DBNull.Value; 8272 8326 } 8273 if ((Original_ Percentage.HasValue == true)) {8327 if ((Original_DateCreated.HasValue == true)) { 8274 8328 this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(0)); 8275 this.Adapter.UpdateCommand.Parameters[21].Value = (( double)(Original_Percentage.Value));8329 this.Adapter.UpdateCommand.Parameters[21].Value = ((System.DateTime)(Original_DateCreated.Value)); 8276 8330 } 8277 8331 else { … … 8279 8333 this.Adapter.UpdateCommand.Parameters[21].Value = global::System.DBNull.Value; 8280 8334 } 8281 if ((Original_DateC reated.HasValue == true)) {8335 if ((Original_DateCalculated.HasValue == true)) { 8282 8336 this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(0)); 8283 this.Adapter.UpdateCommand.Parameters[23].Value = ((System.DateTime)(Original_DateC reated.Value));8337 this.Adapter.UpdateCommand.Parameters[23].Value = ((System.DateTime)(Original_DateCalculated.Value)); 8284 8338 } 8285 8339 else { … … 8287 8341 this.Adapter.UpdateCommand.Parameters[23].Value = global::System.DBNull.Value; 8288 8342 } 8289 if ((Original_ DateCalculated.HasValue == true)) {8343 if ((Original_Priority.HasValue == true)) { 8290 8344 this.Adapter.UpdateCommand.Parameters[24].Value = ((object)(0)); 8291 this.Adapter.UpdateCommand.Parameters[25].Value = (( System.DateTime)(Original_DateCalculated.Value));8345 this.Adapter.UpdateCommand.Parameters[25].Value = ((int)(Original_Priority.Value)); 8292 8346 } 8293 8347 else { … … 8295 8349 this.Adapter.UpdateCommand.Parameters[25].Value = global::System.DBNull.Value; 8296 8350 } 8297 if ((Original_Pr iority.HasValue == true)) {8351 if ((Original_ProjectId.HasValue == true)) { 8298 8352 this.Adapter.UpdateCommand.Parameters[26].Value = ((object)(0)); 8299 this.Adapter.UpdateCommand.Parameters[27].Value = (( int)(Original_Priority.Value));8353 this.Adapter.UpdateCommand.Parameters[27].Value = ((System.Guid)(Original_ProjectId.Value)); 8300 8354 } 8301 8355 else { … … 8303 8357 this.Adapter.UpdateCommand.Parameters[27].Value = global::System.DBNull.Value; 8304 8358 } 8305 if ((Original_ ProjectId.HasValue == true)) {8359 if ((Original_UserId.HasValue == true)) { 8306 8360 this.Adapter.UpdateCommand.Parameters[28].Value = ((object)(0)); 8307 this.Adapter.UpdateCommand.Parameters[29].Value = ((System.Guid)(Original_ ProjectId.Value));8361 this.Adapter.UpdateCommand.Parameters[29].Value = ((System.Guid)(Original_UserId.Value)); 8308 8362 } 8309 8363 else { … … 8311 8365 this.Adapter.UpdateCommand.Parameters[29].Value = global::System.DBNull.Value; 8312 8366 } 8313 if ((Original_ UserId.HasValue == true)) {8367 if ((Original_CoresNeeded.HasValue == true)) { 8314 8368 this.Adapter.UpdateCommand.Parameters[30].Value = ((object)(0)); 8315 this.Adapter.UpdateCommand.Parameters[31].Value = (( System.Guid)(Original_UserId.Value));8369 this.Adapter.UpdateCommand.Parameters[31].Value = ((int)(Original_CoresNeeded.Value)); 8316 8370 } 8317 8371 else { … … 8319 8373 this.Adapter.UpdateCommand.Parameters[31].Value = global::System.DBNull.Value; 8320 8374 } 8321 if ((Original_ CoresNeeded.HasValue == true)) {8375 if ((Original_MemoryNeeded.HasValue == true)) { 8322 8376 this.Adapter.UpdateCommand.Parameters[32].Value = ((object)(0)); 8323 this.Adapter.UpdateCommand.Parameters[33].Value = ((int)(Original_ CoresNeeded.Value));8377 this.Adapter.UpdateCommand.Parameters[33].Value = ((int)(Original_MemoryNeeded.Value)); 8324 8378 } 8325 8379 else { 8326 8380 this.Adapter.UpdateCommand.Parameters[32].Value = ((object)(1)); 8327 8381 this.Adapter.UpdateCommand.Parameters[33].Value = global::System.DBNull.Value; 8328 }8329 if ((Original_MemoryNeeded.HasValue == true)) {8330 this.Adapter.UpdateCommand.Parameters[34].Value = ((object)(0));8331 this.Adapter.UpdateCommand.Parameters[35].Value = ((int)(Original_MemoryNeeded.Value));8332 }8333 else {8334 this.Adapter.UpdateCommand.Parameters[34].Value = ((object)(1));8335 this.Adapter.UpdateCommand.Parameters[35].Value = global::System.DBNull.Value;8336 8382 } 8337 8383 global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; … … 8369 8415 System.Guid Original_JobId, 8370 8416 global::System.Nullable<global::System.Guid> Original_ParentJobId, 8371 string Original_JobState,8372 8417 global::System.Nullable<global::System.Guid> Original_ResourceId, 8373 8418 global::System.Nullable<double> Original_Percentage, … … 8379 8424 global::System.Nullable<int> Original_CoresNeeded, 8380 8425 global::System.Nullable<int> Original_MemoryNeeded) { 8381 return this.Update(Original_JobId, ParentJobId, JobState, ResourceId, Percentage, SerializedJob, DateCreated, DateCalculated, Priority, ProjectId, UserId, CoresNeeded, MemoryNeeded, Original_JobId, Original_ParentJobId, Original_ JobState, Original_ResourceId, Original_Percentage, Original_DateCreated, Original_DateCalculated, Original_Priority, Original_ProjectId, Original_UserId, Original_CoresNeeded, Original_MemoryNeeded);8426 return this.Update(Original_JobId, ParentJobId, JobState, ResourceId, Percentage, SerializedJob, DateCreated, DateCalculated, Priority, ProjectId, UserId, CoresNeeded, MemoryNeeded, Original_JobId, Original_ParentJobId, Original_ResourceId, Original_Percentage, Original_DateCreated, Original_DateCalculated, Original_Priority, Original_ProjectId, Original_UserId, Original_CoresNeeded, Original_MemoryNeeded); 8382 8427 } 8383 8428 } … … 11053 11098 if (((updatedRows != null) 11054 11099 && (0 < updatedRows.Length))) { 11100 this.SortSelfReferenceRows(updatedRows, dataSet.Relations["R_44"], false); 11055 11101 result = (result + this._jobTableAdapter.Update(updatedRows)); 11056 11102 allChangedRows.AddRange(updatedRows); … … 11154 11200 if (((addedRows != null) 11155 11201 && (0 < addedRows.Length))) { 11202 this.SortSelfReferenceRows(addedRows, dataSet.Relations["R_44"], false); 11156 11203 result = (result + this._jobTableAdapter.Update(addedRows)); 11157 11204 allAddedRows.AddRange(addedRows); … … 11235 11282 if (((deletedRows != null) 11236 11283 && (0 < deletedRows.Length))) { 11284 this.SortSelfReferenceRows(deletedRows, dataSet.Relations["R_44"], true); 11237 11285 result = (result + this._jobTableAdapter.Update(deletedRows)); 11238 11286 allChangedRows.AddRange(deletedRows);
Note: See TracChangeset
for help on using the changeset viewer.