Changeset 2083 for trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/3.2/dsHiveServer.Designer.cs
- Timestamp:
- 06/23/09 12:32:03 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/3.2/dsHiveServer.Designer.cs
r2066 r2083 2 2 // <auto-generated> 3 3 // This code was generated by a tool. 4 // Runtime Version:2.0.50727.30 824 // Runtime Version:2.0.50727.3053 5 5 // 6 6 // Changes to this file may cause incorrect behavior and will be lost if … … 1779 1779 private global::System.Data.DataColumn columnPercentage; 1780 1780 1781 private global::System.Data.DataColumn columnSerializedJob;1782 1783 1781 private global::System.Data.DataColumn columnDateCreated; 1784 1782 … … 1861 1859 1862 1860 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 1863 public global::System.Data.DataColumn SerializedJobColumn {1864 get {1865 return this.columnSerializedJob;1866 }1867 }1868 1869 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]1870 1861 public global::System.Data.DataColumn DateCreatedColumn { 1871 1862 get { … … 1945 1936 1946 1937 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 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) {1938 public JobRow AddJobRow(System.Guid JobId, JobRow parentJobRowByR_44, string JobState, ClientRow parentClientRowByR_21, double Percentage, System.DateTime DateCreated, System.DateTime DateCalculated, int Priority, ProjectRow parentProjectRowByR_49, System.Guid UserId, int CoresNeeded, int MemoryNeeded) { 1948 1939 JobRow rowJobRow = ((JobRow)(this.NewRow())); 1949 1940 object[] columnValuesArray = new object[] { … … 1953 1944 null, 1954 1945 Percentage, 1955 SerializedJob,1956 1946 DateCreated, 1957 1947 DateCalculated, … … 1968 1958 } 1969 1959 if ((parentProjectRowByR_49 != null)) { 1970 columnValuesArray[ 9] = parentProjectRowByR_49[0];1960 columnValuesArray[8] = parentProjectRowByR_49[0]; 1971 1961 } 1972 1962 rowJobRow.ItemArray = columnValuesArray; … … 2000 1990 this.columnResourceId = base.Columns["ResourceId"]; 2001 1991 this.columnPercentage = base.Columns["Percentage"]; 2002 this.columnSerializedJob = base.Columns["SerializedJob"];2003 1992 this.columnDateCreated = base.Columns["DateCreated"]; 2004 1993 this.columnDateCalculated = base.Columns["DateCalculated"]; … … 2022 2011 this.columnPercentage = new global::System.Data.DataColumn("Percentage", typeof(double), null, global::System.Data.MappingType.Element); 2023 2012 base.Columns.Add(this.columnPercentage); 2024 this.columnSerializedJob = new global::System.Data.DataColumn("SerializedJob", typeof(byte[]), null, global::System.Data.MappingType.Element);2025 base.Columns.Add(this.columnSerializedJob);2026 2013 this.columnDateCreated = new global::System.Data.DataColumn("DateCreated", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); 2027 2014 base.Columns.Add(this.columnDateCreated); … … 4327 4314 4328 4315 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 4329 public byte[] SerializedJob {4330 get {4331 try {4332 return ((byte[])(this[this.tableJob.SerializedJobColumn]));4333 }4334 catch (global::System.InvalidCastException e) {4335 throw new global::System.Data.StrongTypingException("The value for column \'SerializedJob\' in table \'Job\' is DBNull.", e);4336 }4337 }4338 set {4339 this[this.tableJob.SerializedJobColumn] = value;4340 }4341 }4342 4343 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]4344 4316 public System.DateTime DateCreated { 4345 4317 get { … … 4514 4486 public void SetPercentageNull() { 4515 4487 this[this.tableJob.PercentageColumn] = global::System.Convert.DBNull; 4516 }4517 4518 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]4519 public bool IsSerializedJobNull() {4520 return this.IsNull(this.tableJob.SerializedJobColumn);4521 }4522 4523 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]4524 public void SetSerializedJobNull() {4525 this[this.tableJob.SerializedJobColumn] = global::System.Convert.DBNull;4526 4488 } 4527 4489 … … 7421 7383 tableMapping.ColumnMappings.Add("ResourceId", "ResourceId"); 7422 7384 tableMapping.ColumnMappings.Add("Percentage", "Percentage"); 7423 tableMapping.ColumnMappings.Add("SerializedJob", "SerializedJob");7424 7385 tableMapping.ColumnMappings.Add("DateCreated", "DateCreated"); 7425 7386 tableMapping.ColumnMappings.Add("DateCalculated", "DateCalculated"); … … 7432 7393 this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); 7433 7394 this._adapter.DeleteCommand.Connection = this.Connection; 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)))";7395 this._adapter.DeleteCommand.CommandText = @"DELETE FROM [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)))"; 7435 7396 this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; 7436 7397 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, "", "", "")); … … 7457 7418 this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); 7458 7419 this._adapter.InsertCommand.Connection = this.Connection; 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);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";7420 this._adapter.InsertCommand.CommandText = @"INSERT INTO [Job] ([JobId], [ParentJobId], [ResourceId], [JobState], [Percentage], [DateCreated], [DateCalculated], [Priority], [ProjectId], [UserId], [CoresNeeded], [MemoryNeeded]) VALUES (@JobId, @ParentJobId, @ResourceId, @JobState, @Percentage, @DateCreated, @DateCalculated, @Priority, @ProjectId, @UserId, @CoresNeeded, @MemoryNeeded); 7421 SELECT JobId, ParentJobId, ResourceId, JobState, Percentage, DateCreated, DateCalculated, Priority, ProjectId, UserId, CoresNeeded, MemoryNeeded FROM Job WHERE (JobId = @JobId)"; 7461 7422 this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; 7462 7423 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, "", "", "")); 7463 7424 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ParentJobId", global::System.Data.SqlDbType.UniqueIdentifier, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ParentJobId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 7425 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ResourceId", global::System.Data.SqlDbType.UniqueIdentifier, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ResourceId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 7464 7426 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@JobState", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobState", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 7465 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ResourceId", global::System.Data.SqlDbType.UniqueIdentifier, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ResourceId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));7466 7427 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Percentage", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Percentage", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 7467 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SerializedJob", global::System.Data.SqlDbType.VarBinary, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SerializedJob", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));7468 7428 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DateCreated", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateCreated", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 7469 7429 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DateCalculated", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateCalculated", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); … … 7475 7435 this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); 7476 7436 this._adapter.UpdateCommand.Connection = this.Connection; 7477 this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[Job] SET [JobId] = @JobId, [ParentJobId] = @ParentJobId, [JobState]" + 7478 " = @JobState, [ResourceId] = @ResourceId, [Percentage] = @Percentage, [Serialize" + 7479 "dJob] = @SerializedJob, [DateCreated] = @DateCreated, [DateCalculated] = @DateCa" + 7480 "lculated, [Priority] = @Priority, [ProjectId] = @ProjectId, [UserId] = @UserId, " + 7481 "[CoresNeeded] = @CoresNeeded, [MemoryNeeded] = @MemoryNeeded WHERE (([JobId] = @" + 7482 "Original_JobId) AND ((@IsNull_ParentJobId = 1 AND [ParentJobId] IS NULL) OR ([Pa" + 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"; 7437 this._adapter.UpdateCommand.CommandText = "UPDATE [Job] SET [JobId] = @JobId, [ParentJobId] = @ParentJobId, [ResourceId] = @" + 7438 "ResourceId, [JobState] = @JobState, [Percentage] = @Percentage, [DateCreated] = " + 7439 "@DateCreated, [DateCalculated] = @DateCalculated, [Priority] = @Priority, [Proje" + 7440 "ctId] = @ProjectId, [UserId] = @UserId, [CoresNeeded] = @CoresNeeded, [MemoryNee" + 7441 "ded] = @MemoryNeeded WHERE (([JobId] = @Original_JobId) AND ((@IsNull_ParentJobI" + 7442 "d = 1 AND [ParentJobId] IS NULL) OR ([ParentJobId] = @Original_ParentJobId)) AND" + 7443 " ((@IsNull_ResourceId = 1 AND [ResourceId] IS NULL) OR ([ResourceId] = @Original" + 7444 "_ResourceId)) AND ((@IsNull_Percentage = 1 AND [Percentage] IS NULL) OR ([Percen" + 7445 "tage] = @Original_Percentage)) AND ((@IsNull_DateCreated = 1 AND [DateCreated] I" + 7446 "S NULL) OR ([DateCreated] = @Original_DateCreated)) AND ((@IsNull_DateCalculated" + 7447 " = 1 AND [DateCalculated] IS NULL) OR ([DateCalculated] = @Original_DateCalculat" + 7448 "ed)) AND ((@IsNull_Priority = 1 AND [Priority] IS NULL) OR ([Priority] = @Origin" + 7449 "al_Priority)) AND ((@IsNull_ProjectId = 1 AND [ProjectId] IS NULL) OR ([ProjectI" + 7450 "d] = @Original_ProjectId)) AND ((@IsNull_UserId = 1 AND [UserId] IS NULL) OR ([U" + 7451 "serId] = @Original_UserId)) AND ((@IsNull_CoresNeeded = 1 AND [CoresNeeded] IS N" + 7452 "ULL) OR ([CoresNeeded] = @Original_CoresNeeded)) AND ((@IsNull_MemoryNeeded = 1 " + 7453 "AND [MemoryNeeded] IS NULL) OR ([MemoryNeeded] = @Original_MemoryNeeded)));\r\nSEL" + 7454 "ECT JobId, ParentJobId, ResourceId, JobState, Percentage, DateCreated, DateCalcu" + 7455 "lated, Priority, ProjectId, UserId, CoresNeeded, MemoryNeeded FROM Job WHERE (Jo" + 7456 "bId = @JobId)"; 7501 7457 this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; 7502 7458 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, "", "", "")); 7503 7459 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ParentJobId", global::System.Data.SqlDbType.UniqueIdentifier, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ParentJobId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 7460 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ResourceId", global::System.Data.SqlDbType.UniqueIdentifier, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ResourceId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 7504 7461 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@JobState", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobState", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 7505 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ResourceId", global::System.Data.SqlDbType.UniqueIdentifier, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ResourceId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));7506 7462 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Percentage", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Percentage", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 7507 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SerializedJob", global::System.Data.SqlDbType.VarBinary, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SerializedJob", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));7508 7463 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DateCreated", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateCreated", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 7509 7464 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DateCalculated", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateCalculated", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); … … 7544 7499 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 7545 7500 private void InitCommandCollection() { 7546 this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1 0];7501 this._commandCollection = new global::System.Data.SqlClient.SqlCommand[12]; 7547 7502 this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); 7548 7503 this._commandCollection[0].Connection = this.Connection; 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"; 7504 this._commandCollection[0].CommandText = "SELECT JobId, ParentJobId, ResourceId, JobState, Percentage, DateCreated, Dat" + 7505 "eCalculated, Priority, ProjectId, UserId, CoresNeeded, MemoryNeeded\r\nFROM " + 7506 " Job"; 7581 7507 this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; 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, "", "", ""));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, "", "", ""));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, "", "", ""));7586 7508 this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); 7587 7509 this._commandCollection[1].Connection = this.Connection; 7588 this._commandCollection[1].CommandText = "SELECT CoresNeeded, DateCalculated, DateCreated, JobId, JobState, MemoryNeeded, P" + 7589 "arentJobId, Percentage, Priority, ProjectId, ResourceId, SerializedJob, UserId F" + 7590 "ROM Job"; 7510 this._commandCollection[1].CommandText = @"SELECT CoresNeeded, DateCalculated, DateCreated, JobId, JobState, MemoryNeeded, ParentJobId, Percentage, Priority, ProjectId, ResourceId, UserId FROM Job WHERE (JobState = 'calculating' OR JobState = 'abort' OR JobState = 'requestSnapshot ' OR JobState = 'requestSnapshotSent') AND (ResourceId = @ResourceId)"; 7591 7511 this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; 7512 this._commandCollection[1].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, "", "", "")); 7592 7513 this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); 7593 7514 this._commandCollection[2].Connection = this.Connection; 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)"; 7515 this._commandCollection[2].CommandText = "SELECT CoresNeeded, DateCalculated, DateCreated, JobId, JobState, MemoryNeeded, P" + 7516 "arentJobId, Percentage, Priority, ProjectId, ResourceId, UserId FROM Job WHERE (" + 7517 "ResourceId = @ResourceId)"; 7595 7518 this._commandCollection[2].CommandType = global::System.Data.CommandType.Text; 7596 7519 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, "", "", "")); … … 7598 7521 this._commandCollection[3].Connection = this.Connection; 7599 7522 this._commandCollection[3].CommandText = "SELECT CoresNeeded, DateCalculated, DateCreated, JobId, JobState, MemoryNeeded, P" + 7600 "arentJobId, Percentage, Priority, ProjectId, ResourceId, SerializedJob, UserId F" +7601 " ROM Job WHERE (ResourceId = @ResourceId)";7523 "arentJobId, Percentage, Priority, ProjectId, ResourceId, UserId FROM Job WHERE (" + 7524 "JobId = @Id)"; 7602 7525 this._commandCollection[3].CommandType = global::System.Data.CommandType.Text; 7603 this._commandCollection[3].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, "", "", ""));7526 this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.UniqueIdentifier, 16, global::System.Data.ParameterDirection.Input, 0, 0, "JobId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 7604 7527 this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); 7605 7528 this._commandCollection[4].Connection = this.Connection; 7606 7529 this._commandCollection[4].CommandText = "SELECT CoresNeeded, DateCalculated, DateCreated, JobId, JobState, MemoryNeeded, P" + 7607 "arentJobId, Percentage, Priority, ProjectId, ResourceId, SerializedJob, UserId F" +7608 " ROM Job WHERE (JobId = @Id)";7530 "arentJobId, Percentage, Priority, ProjectId, ResourceId, UserId FROM Job WHERE (" + 7531 "JobId = @Id)"; 7609 7532 this._commandCollection[4].CommandType = global::System.Data.CommandType.Text; 7610 7533 this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.UniqueIdentifier, 16, global::System.Data.ParameterDirection.Input, 0, 0, "JobId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); … … 7612 7535 this._commandCollection[5].Connection = this.Connection; 7613 7536 this._commandCollection[5].CommandText = "SELECT CoresNeeded, DateCalculated, DateCreated, JobId, JobState, MemoryNeeded, P" + 7614 "arentJobId, Percentage, Priority, ProjectId, ResourceId, SerializedJob, UserId F" +7615 " ROM Job WHERE (JobId = @Id)";7537 "arentJobId, Percentage, Priority, ProjectId, ResourceId, UserId FROM Job WHERE (" + 7538 "ParentJobId = @Id)"; 7616 7539 this._commandCollection[5].CommandType = global::System.Data.CommandType.Text; 7617 this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.UniqueIdentifier, 16, global::System.Data.ParameterDirection.Input, 0, 0, " JobId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));7540 this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.UniqueIdentifier, 16, global::System.Data.ParameterDirection.Input, 0, 0, "ParentJobId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 7618 7541 this._commandCollection[6] = new global::System.Data.SqlClient.SqlCommand(); 7619 7542 this._commandCollection[6].Connection = this.Connection; 7620 7543 this._commandCollection[6].CommandText = "SELECT CoresNeeded, DateCalculated, DateCreated, JobId, JobState, MemoryNeeded, P" + 7621 "arentJobId, Percentage, Priority, ProjectId, ResourceId, SerializedJob, UserId F" +7622 " ROM Job WHERE (ParentJobId = @Id)";7544 "arentJobId, Percentage, Priority, ProjectId, ResourceId, UserId FROM Job WHERE (" + 7545 "ProjectId = @ProjectId)"; 7623 7546 this._commandCollection[6].CommandType = global::System.Data.CommandType.Text; 7624 this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ Id", global::System.Data.SqlDbType.UniqueIdentifier, 16, global::System.Data.ParameterDirection.Input, 0, 0, "ParentJobId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));7547 this._commandCollection[6].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, "", "", "")); 7625 7548 this._commandCollection[7] = new global::System.Data.SqlClient.SqlCommand(); 7626 7549 this._commandCollection[7].Connection = this.Connection; 7627 7550 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)";7551 "arentJobId, Percentage, Priority, ProjectId, ResourceId, UserId FROM Job WHERE (" + 7552 "JobState = @State)"; 7630 7553 this._commandCollection[7].CommandType = global::System.Data.CommandType.Text; 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, "", "", ""));7554 this._commandCollection[7].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, "", "", "")); 7632 7555 this._commandCollection[8] = new global::System.Data.SqlClient.SqlCommand(); 7633 7556 this._commandCollection[8].Connection = this.Connection; 7634 this._commandCollection[8].CommandText = "SELECT CoresNeeded, DateCalculated, DateCreated, JobId, JobState, MemoryNeeded, P" + 7635 "arentJobId, Percentage, Priority, ProjectId, ResourceId, SerializedJob, UserId F" + 7636 "ROM Job WHERE (JobState = @State)"; 7557 this._commandCollection[8].CommandText = @"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 CoresNeeded, DateCalculated, DateCreated, JobId, JobState, MemoryNeeded, ParentJobId, Percentage, Priority, ProjectId, ResourceId, UserId FROM Job WHERE (JobState = @State) AND (CoresNeeded <= @CoresNeeded) AND (MemoryNeeded <= @MemoryNeeded) AND (NOT EXISTS (SELECT ResourceId, JobId FROM AssignedResources WHERE (JobId = Job.JobId))) OR (JobState = @State) AND (CoresNeeded <= @CoresNeeded) AND (MemoryNeeded <= @MemoryNeeded) AND EXISTS (SELECT ResourceId, JobId FROM AssignedResources AS AssignedResources_2 WHERE (JobId = Job.JobId) AND (ResourceId = @ResourceId)) OR (JobState = @State) AND (CoresNeeded <= @CoresNeeded) AND (MemoryNeeded <= @MemoryNeeded) AND EXISTS (SELECT ResourceId, JobId FROM AssignedResources AS AssignedResources_1 WHERE (JobId = Job.JobId) AND (ResourceId IN (SELECT ClientGroupId FROM ClientGroups AS ClientGroups_1))) ORDER BY Priority"; 7637 7558 this._commandCollection[8].CommandType = global::System.Data.CommandType.Text; 7638 this._commandCollection[8].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, "", "", "")); 7559 this._commandCollection[8].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, "", "", "")); 7560 this._commandCollection[8].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, "", "", "")); 7561 this._commandCollection[8].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, "", "", "")); 7562 this._commandCollection[8].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, "", "", "")); 7639 7563 this._commandCollection[9] = new global::System.Data.SqlClient.SqlCommand(); 7640 7564 this._commandCollection[9].Connection = this.Connection; 7641 7565 this._commandCollection[9].CommandText = "SELECT CoresNeeded, DateCalculated, DateCreated, JobId, JobState, MemoryNeeded, P" + 7642 "arentJobId, Percentage, Priority, ProjectId, ResourceId, SerializedJob, UserId F" +7643 " ROM Job WHERE (UserId = @UserId)";7566 "arentJobId, Percentage, Priority, ProjectId, ResourceId, UserId FROM Job WHERE (" + 7567 "UserId = @UserId)"; 7644 7568 this._commandCollection[9].CommandType = global::System.Data.CommandType.Text; 7645 7569 this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UserId", global::System.Data.SqlDbType.UniqueIdentifier, 16, global::System.Data.ParameterDirection.Input, 0, 0, "UserId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 7570 this._commandCollection[10] = new global::System.Data.SqlClient.SqlCommand(); 7571 this._commandCollection[10].Connection = this.Connection; 7572 this._commandCollection[10].CommandText = "SELECT SerializedJob FROM Job WHERE JobId = @JobId"; 7573 this._commandCollection[10].CommandType = global::System.Data.CommandType.Text; 7574 this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@JobId", global::System.Data.SqlDbType.UniqueIdentifier, 16, global::System.Data.ParameterDirection.Input, 0, 0, "JobId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 7575 this._commandCollection[11] = new global::System.Data.SqlClient.SqlCommand(); 7576 this._commandCollection[11].Connection = this.Connection; 7577 this._commandCollection[11].CommandText = "UPDATE Job SET SerializedJob = @SerializedJob WHERE JobId = @JobId"; 7578 this._commandCollection[11].CommandType = global::System.Data.CommandType.Text; 7579 this._commandCollection[11].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SerializedJob", global::System.Data.SqlDbType.VarBinary, 2147483647, global::System.Data.ParameterDirection.Input, 0, 0, "SerializedJob", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 7580 this._commandCollection[11].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@JobId", global::System.Data.SqlDbType.UniqueIdentifier, 16, global::System.Data.ParameterDirection.Input, 0, 0, "JobId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); 7646 7581 } 7647 7582 … … 7649 7584 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 7650 7585 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] 7651 public virtual int Fill ByStateCoresMemoryResource(dsHiveServer.JobDataTable dataTable, string State, global::System.Nullable<int> CoresNeeded, global::System.Nullable<int> MemoryNeeded, System.Guid ResourceId) {7586 public virtual int Fill(dsHiveServer.JobDataTable dataTable) { 7652 7587 this.Adapter.SelectCommand = this.CommandCollection[0]; 7653 if ((State == null)) {7654 this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value;7655 }7656 else {7657 this.Adapter.SelectCommand.Parameters[0].Value = ((string)(State));7658 }7659 if ((CoresNeeded.HasValue == true)) {7660 this.Adapter.SelectCommand.Parameters[1].Value = ((int)(CoresNeeded.Value));7661 }7662 else {7663 this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;7664 }7665 if ((MemoryNeeded.HasValue == true)) {7666 this.Adapter.SelectCommand.Parameters[2].Value = ((int)(MemoryNeeded.Value));7667 }7668 else {7669 this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value;7670 }7671 this.Adapter.SelectCommand.Parameters[3].Value = ((System.Guid)(ResourceId));7672 7588 if ((this.ClearBeforeFill == true)) { 7673 7589 dataTable.Clear(); … … 7680 7596 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 7681 7597 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] 7682 public virtual dsHiveServer.JobDataTable GetData ByStateCoresMemoryResource(string State, global::System.Nullable<int> CoresNeeded, global::System.Nullable<int> MemoryNeeded, System.Guid ResourceId) {7598 public virtual dsHiveServer.JobDataTable GetData() { 7683 7599 this.Adapter.SelectCommand = this.CommandCollection[0]; 7684 if ((State == null)) {7685 this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value;7686 }7687 else {7688 this.Adapter.SelectCommand.Parameters[0].Value = ((string)(State));7689 }7690 if ((CoresNeeded.HasValue == true)) {7691 this.Adapter.SelectCommand.Parameters[1].Value = ((int)(CoresNeeded.Value));7692 }7693 else {7694 this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;7695 }7696 if ((MemoryNeeded.HasValue == true)) {7697 this.Adapter.SelectCommand.Parameters[2].Value = ((int)(MemoryNeeded.Value));7698 }7699 else {7700 this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value;7701 }7702 this.Adapter.SelectCommand.Parameters[3].Value = ((System.Guid)(ResourceId));7703 7600 dsHiveServer.JobDataTable dataTable = new dsHiveServer.JobDataTable(); 7704 7601 this.Adapter.Fill(dataTable); … … 7709 7606 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 7710 7607 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)] 7711 public virtual int Fill (dsHiveServer.JobDataTable dataTable) {7608 public virtual int FillByCalculatingClient(dsHiveServer.JobDataTable dataTable, global::System.Nullable<global::System.Guid> ResourceId) { 7712 7609 this.Adapter.SelectCommand = this.CommandCollection[1]; 7610 if ((ResourceId.HasValue == true)) { 7611 this.Adapter.SelectCommand.Parameters[0].Value = ((System.Guid)(ResourceId.Value)); 7612 } 7613 else { 7614 this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; 7615 } 7713 7616 if ((this.ClearBeforeFill == true)) { 7714 7617 dataTable.Clear(); … … 7721 7624 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 7722 7625 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] 7723 public virtual dsHiveServer.JobDataTable GetData () {7626 public virtual dsHiveServer.JobDataTable GetDataByCalculatingClient(global::System.Nullable<global::System.Guid> ResourceId) { 7724 7627 this.Adapter.SelectCommand = this.CommandCollection[1]; 7628 if ((ResourceId.HasValue == true)) { 7629 this.Adapter.SelectCommand.Parameters[0].Value = ((System.Guid)(ResourceId.Value)); 7630 } 7631 else { 7632 this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; 7633 } 7725 7634 dsHiveServer.JobDataTable dataTable = new dsHiveServer.JobDataTable(); 7726 7635 this.Adapter.Fill(dataTable); … … 7731 7640 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 7732 7641 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)] 7733 public virtual int FillByC alculatingClient(dsHiveServer.JobDataTable dataTable, global::System.Nullable<global::System.Guid> ResourceId) {7642 public virtual int FillByClient(dsHiveServer.JobDataTable dataTable, global::System.Nullable<global::System.Guid> ResourceId) { 7734 7643 this.Adapter.SelectCommand = this.CommandCollection[2]; 7735 7644 if ((ResourceId.HasValue == true)) { … … 7749 7658 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 7750 7659 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] 7751 public virtual dsHiveServer.JobDataTable GetDataByC alculatingClient(global::System.Nullable<global::System.Guid> ResourceId) {7660 public virtual dsHiveServer.JobDataTable GetDataByClient(global::System.Nullable<global::System.Guid> ResourceId) { 7752 7661 this.Adapter.SelectCommand = this.CommandCollection[2]; 7753 7662 if ((ResourceId.HasValue == true)) { … … 7765 7674 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 7766 7675 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)] 7767 public virtual int FillBy Client(dsHiveServer.JobDataTable dataTable, global::System.Nullable<global::System.Guid> ResourceId) {7676 public virtual int FillById(dsHiveServer.JobDataTable dataTable, System.Guid Id) { 7768 7677 this.Adapter.SelectCommand = this.CommandCollection[3]; 7769 if ((ResourceId.HasValue == true)) { 7770 this.Adapter.SelectCommand.Parameters[0].Value = ((System.Guid)(ResourceId.Value)); 7771 } 7772 else { 7773 this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; 7774 } 7678 this.Adapter.SelectCommand.Parameters[0].Value = ((System.Guid)(Id)); 7775 7679 if ((this.ClearBeforeFill == true)) { 7776 7680 dataTable.Clear(); … … 7783 7687 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 7784 7688 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] 7785 public virtual dsHiveServer.JobDataTable GetDataBy Client(global::System.Nullable<global::System.Guid> ResourceId) {7689 public virtual dsHiveServer.JobDataTable GetDataById(System.Guid Id) { 7786 7690 this.Adapter.SelectCommand = this.CommandCollection[3]; 7787 if ((ResourceId.HasValue == true)) { 7788 this.Adapter.SelectCommand.Parameters[0].Value = ((System.Guid)(ResourceId.Value)); 7789 } 7790 else { 7791 this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; 7792 } 7691 this.Adapter.SelectCommand.Parameters[0].Value = ((System.Guid)(Id)); 7793 7692 dsHiveServer.JobDataTable dataTable = new dsHiveServer.JobDataTable(); 7794 7693 this.Adapter.Fill(dataTable); … … 7799 7698 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 7800 7699 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)] 7801 public virtual int FillBy Id(dsHiveServer.JobDataTable dataTable, System.Guid Id) {7700 public virtual int FillByJob(dsHiveServer.JobDataTable dataTable, System.Guid Id) { 7802 7701 this.Adapter.SelectCommand = this.CommandCollection[4]; 7803 7702 this.Adapter.SelectCommand.Parameters[0].Value = ((System.Guid)(Id)); … … 7812 7711 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 7813 7712 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] 7814 public virtual dsHiveServer.JobDataTable GetDataBy Id(System.Guid Id) {7713 public virtual dsHiveServer.JobDataTable GetDataByJob(System.Guid Id) { 7815 7714 this.Adapter.SelectCommand = this.CommandCollection[4]; 7816 7715 this.Adapter.SelectCommand.Parameters[0].Value = ((System.Guid)(Id)); … … 7823 7722 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 7824 7723 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)] 7825 public virtual int FillBy Job(dsHiveServer.JobDataTable dataTable, System.GuidId) {7724 public virtual int FillByParentJob(dsHiveServer.JobDataTable dataTable, global::System.Nullable<global::System.Guid> Id) { 7826 7725 this.Adapter.SelectCommand = this.CommandCollection[5]; 7827 this.Adapter.SelectCommand.Parameters[0].Value = ((System.Guid)(Id)); 7726 if ((Id.HasValue == true)) { 7727 this.Adapter.SelectCommand.Parameters[0].Value = ((System.Guid)(Id.Value)); 7728 } 7729 else { 7730 this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; 7731 } 7828 7732 if ((this.ClearBeforeFill == true)) { 7829 7733 dataTable.Clear(); … … 7836 7740 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 7837 7741 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] 7838 public virtual dsHiveServer.JobDataTable GetDataBy Job(System.GuidId) {7742 public virtual dsHiveServer.JobDataTable GetDataByParentJob(global::System.Nullable<global::System.Guid> Id) { 7839 7743 this.Adapter.SelectCommand = this.CommandCollection[5]; 7840 this.Adapter.SelectCommand.Parameters[0].Value = ((System.Guid)(Id)); 7744 if ((Id.HasValue == true)) { 7745 this.Adapter.SelectCommand.Parameters[0].Value = ((System.Guid)(Id.Value)); 7746 } 7747 else { 7748 this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; 7749 } 7841 7750 dsHiveServer.JobDataTable dataTable = new dsHiveServer.JobDataTable(); 7842 7751 this.Adapter.Fill(dataTable); … … 7847 7756 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 7848 7757 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)] 7849 public virtual int FillByP arentJob(dsHiveServer.JobDataTable dataTable, global::System.Nullable<global::System.Guid>Id) {7758 public virtual int FillByProjectId(dsHiveServer.JobDataTable dataTable, global::System.Nullable<global::System.Guid> ProjectId) { 7850 7759 this.Adapter.SelectCommand = this.CommandCollection[6]; 7851 if (( Id.HasValue == true)) {7852 this.Adapter.SelectCommand.Parameters[0].Value = ((System.Guid)( Id.Value));7760 if ((ProjectId.HasValue == true)) { 7761 this.Adapter.SelectCommand.Parameters[0].Value = ((System.Guid)(ProjectId.Value)); 7853 7762 } 7854 7763 else { … … 7865 7774 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 7866 7775 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] 7867 public virtual dsHiveServer.JobDataTable GetDataByP arentJob(global::System.Nullable<global::System.Guid>Id) {7776 public virtual dsHiveServer.JobDataTable GetDataByProjectId(global::System.Nullable<global::System.Guid> ProjectId) { 7868 7777 this.Adapter.SelectCommand = this.CommandCollection[6]; 7869 if (( Id.HasValue == true)) {7870 this.Adapter.SelectCommand.Parameters[0].Value = ((System.Guid)( Id.Value));7778 if ((ProjectId.HasValue == true)) { 7779 this.Adapter.SelectCommand.Parameters[0].Value = ((System.Guid)(ProjectId.Value)); 7871 7780 } 7872 7781 else { … … 7881 7790 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 7882 7791 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)] 7883 public virtual int FillBy ProjectId(dsHiveServer.JobDataTable dataTable, global::System.Nullable<global::System.Guid> ProjectId) {7792 public virtual int FillByState(dsHiveServer.JobDataTable dataTable, string State) { 7884 7793 this.Adapter.SelectCommand = this.CommandCollection[7]; 7885 if ((ProjectId.HasValue == true)) { 7886 this.Adapter.SelectCommand.Parameters[0].Value = ((System.Guid)(ProjectId.Value)); 7887 } 7888 else { 7794 if ((State == null)) { 7889 7795 this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; 7796 } 7797 else { 7798 this.Adapter.SelectCommand.Parameters[0].Value = ((string)(State)); 7890 7799 } 7891 7800 if ((this.ClearBeforeFill == true)) { … … 7899 7808 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 7900 7809 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] 7901 public virtual dsHiveServer.JobDataTable GetDataBy ProjectId(global::System.Nullable<global::System.Guid> ProjectId) {7810 public virtual dsHiveServer.JobDataTable GetDataByState(string State) { 7902 7811 this.Adapter.SelectCommand = this.CommandCollection[7]; 7903 if ((ProjectId.HasValue == true)) { 7904 this.Adapter.SelectCommand.Parameters[0].Value = ((System.Guid)(ProjectId.Value)); 7905 } 7906 else { 7812 if ((State == null)) { 7907 7813 this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; 7814 } 7815 else { 7816 this.Adapter.SelectCommand.Parameters[0].Value = ((string)(State)); 7908 7817 } 7909 7818 dsHiveServer.JobDataTable dataTable = new dsHiveServer.JobDataTable(); … … 7915 7824 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 7916 7825 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)] 7917 public virtual int FillByState (dsHiveServer.JobDataTable dataTable, string State) {7826 public virtual int FillByStateCoresMemoryResource(dsHiveServer.JobDataTable dataTable, string State, global::System.Nullable<int> CoresNeeded, global::System.Nullable<int> MemoryNeeded, System.Guid ResourceId) { 7918 7827 this.Adapter.SelectCommand = this.CommandCollection[8]; 7919 7828 if ((State == null)) { … … 7923 7832 this.Adapter.SelectCommand.Parameters[0].Value = ((string)(State)); 7924 7833 } 7834 if ((CoresNeeded.HasValue == true)) { 7835 this.Adapter.SelectCommand.Parameters[1].Value = ((int)(CoresNeeded.Value)); 7836 } 7837 else { 7838 this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; 7839 } 7840 if ((MemoryNeeded.HasValue == true)) { 7841 this.Adapter.SelectCommand.Parameters[2].Value = ((int)(MemoryNeeded.Value)); 7842 } 7843 else { 7844 this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; 7845 } 7846 this.Adapter.SelectCommand.Parameters[3].Value = ((System.Guid)(ResourceId)); 7925 7847 if ((this.ClearBeforeFill == true)) { 7926 7848 dataTable.Clear(); … … 7933 7855 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 7934 7856 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] 7935 public virtual dsHiveServer.JobDataTable GetDataByState (string State) {7857 public virtual dsHiveServer.JobDataTable GetDataByStateCoresMemoryResource(string State, global::System.Nullable<int> CoresNeeded, global::System.Nullable<int> MemoryNeeded, System.Guid ResourceId) { 7936 7858 this.Adapter.SelectCommand = this.CommandCollection[8]; 7937 7859 if ((State == null)) { … … 7941 7863 this.Adapter.SelectCommand.Parameters[0].Value = ((string)(State)); 7942 7864 } 7865 if ((CoresNeeded.HasValue == true)) { 7866 this.Adapter.SelectCommand.Parameters[1].Value = ((int)(CoresNeeded.Value)); 7867 } 7868 else { 7869 this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; 7870 } 7871 if ((MemoryNeeded.HasValue == true)) { 7872 this.Adapter.SelectCommand.Parameters[2].Value = ((int)(MemoryNeeded.Value)); 7873 } 7874 else { 7875 this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; 7876 } 7877 this.Adapter.SelectCommand.Parameters[3].Value = ((System.Guid)(ResourceId)); 7943 7878 dsHiveServer.JobDataTable dataTable = new dsHiveServer.JobDataTable(); 7944 7879 this.Adapter.Fill(dataTable); … … 8109 8044 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 8110 8045 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] 8111 public virtual int Insert(System.Guid JobId, global::System.Nullable<global::System.Guid> ParentJobId, string JobState, global::System.Nullable<global::System.Guid> ResourceId, global::System.Nullable<double> Percentage, byte[] SerializedJob, global::System.Nullable<global::System.DateTime> DateCreated, global::System.Nullable<global::System.DateTime> DateCalculated, global::System.Nullable<int> Priority, global::System.Nullable<global::System.Guid> ProjectId, global::System.Nullable<global::System.Guid> UserId, global::System.Nullable<int> CoresNeeded, global::System.Nullable<int> MemoryNeeded) {8046 public virtual int Insert(System.Guid JobId, global::System.Nullable<global::System.Guid> ParentJobId, global::System.Nullable<global::System.Guid> ResourceId, string JobState, global::System.Nullable<double> Percentage, global::System.Nullable<global::System.DateTime> DateCreated, global::System.Nullable<global::System.DateTime> DateCalculated, global::System.Nullable<int> Priority, global::System.Nullable<global::System.Guid> ProjectId, global::System.Nullable<global::System.Guid> UserId, global::System.Nullable<int> CoresNeeded, global::System.Nullable<int> MemoryNeeded) { 8112 8047 this.Adapter.InsertCommand.Parameters[0].Value = ((System.Guid)(JobId)); 8113 8048 if ((ParentJobId.HasValue == true)) { … … 8117 8052 this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; 8118 8053 } 8054 if ((ResourceId.HasValue == true)) { 8055 this.Adapter.InsertCommand.Parameters[2].Value = ((System.Guid)(ResourceId.Value)); 8056 } 8057 else { 8058 this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; 8059 } 8119 8060 if ((JobState == null)) { 8120 this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value;8121 }8122 else {8123 this.Adapter.InsertCommand.Parameters[2].Value = ((string)(JobState));8124 }8125 if ((ResourceId.HasValue == true)) {8126 this.Adapter.InsertCommand.Parameters[3].Value = ((System.Guid)(ResourceId.Value));8127 }8128 else {8129 8061 this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; 8062 } 8063 else { 8064 this.Adapter.InsertCommand.Parameters[3].Value = ((string)(JobState)); 8130 8065 } 8131 8066 if ((Percentage.HasValue == true)) { … … 8135 8070 this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; 8136 8071 } 8137 if ((SerializedJob == null)) { 8072 if ((DateCreated.HasValue == true)) { 8073 this.Adapter.InsertCommand.Parameters[5].Value = ((System.DateTime)(DateCreated.Value)); 8074 } 8075 else { 8138 8076 this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value; 8139 8077 } 8140 else { 8141 this.Adapter.InsertCommand.Parameters[5].Value = ((byte[])(SerializedJob)); 8142 } 8143 if ((DateCreated.HasValue == true)) { 8144 this.Adapter.InsertCommand.Parameters[6].Value = ((System.DateTime)(DateCreated.Value)); 8078 if ((DateCalculated.HasValue == true)) { 8079 this.Adapter.InsertCommand.Parameters[6].Value = ((System.DateTime)(DateCalculated.Value)); 8145 8080 } 8146 8081 else { 8147 8082 this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value; 8148 8083 } 8149 if (( DateCalculated.HasValue == true)) {8150 this.Adapter.InsertCommand.Parameters[7].Value = (( System.DateTime)(DateCalculated.Value));8084 if ((Priority.HasValue == true)) { 8085 this.Adapter.InsertCommand.Parameters[7].Value = ((int)(Priority.Value)); 8151 8086 } 8152 8087 else { 8153 8088 this.Adapter.InsertCommand.Parameters[7].Value = global::System.DBNull.Value; 8154 8089 } 8155 if ((Pr iority.HasValue == true)) {8156 this.Adapter.InsertCommand.Parameters[8].Value = (( int)(Priority.Value));8090 if ((ProjectId.HasValue == true)) { 8091 this.Adapter.InsertCommand.Parameters[8].Value = ((System.Guid)(ProjectId.Value)); 8157 8092 } 8158 8093 else { 8159 8094 this.Adapter.InsertCommand.Parameters[8].Value = global::System.DBNull.Value; 8160 8095 } 8161 if (( ProjectId.HasValue == true)) {8162 this.Adapter.InsertCommand.Parameters[9].Value = ((System.Guid)( ProjectId.Value));8096 if ((UserId.HasValue == true)) { 8097 this.Adapter.InsertCommand.Parameters[9].Value = ((System.Guid)(UserId.Value)); 8163 8098 } 8164 8099 else { 8165 8100 this.Adapter.InsertCommand.Parameters[9].Value = global::System.DBNull.Value; 8166 8101 } 8167 if (( UserId.HasValue == true)) {8168 this.Adapter.InsertCommand.Parameters[10].Value = (( System.Guid)(UserId.Value));8102 if ((CoresNeeded.HasValue == true)) { 8103 this.Adapter.InsertCommand.Parameters[10].Value = ((int)(CoresNeeded.Value)); 8169 8104 } 8170 8105 else { 8171 8106 this.Adapter.InsertCommand.Parameters[10].Value = global::System.DBNull.Value; 8172 8107 } 8173 if (( CoresNeeded.HasValue == true)) {8174 this.Adapter.InsertCommand.Parameters[11].Value = ((int)( CoresNeeded.Value));8108 if ((MemoryNeeded.HasValue == true)) { 8109 this.Adapter.InsertCommand.Parameters[11].Value = ((int)(MemoryNeeded.Value)); 8175 8110 } 8176 8111 else { 8177 8112 this.Adapter.InsertCommand.Parameters[11].Value = global::System.DBNull.Value; 8178 }8179 if ((MemoryNeeded.HasValue == true)) {8180 this.Adapter.InsertCommand.Parameters[12].Value = ((int)(MemoryNeeded.Value));8181 }8182 else {8183 this.Adapter.InsertCommand.Parameters[12].Value = global::System.DBNull.Value;8184 8113 } 8185 8114 global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; … … 8205 8134 System.Guid JobId, 8206 8135 global::System.Nullable<global::System.Guid> ParentJobId, 8136 global::System.Nullable<global::System.Guid> ResourceId, 8207 8137 string JobState, 8208 global::System.Nullable<global::System.Guid> ResourceId,8209 8138 global::System.Nullable<double> Percentage, 8210 byte[] SerializedJob,8211 8139 global::System.Nullable<global::System.DateTime> DateCreated, 8212 8140 global::System.Nullable<global::System.DateTime> DateCalculated, … … 8234 8162 this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; 8235 8163 } 8164 if ((ResourceId.HasValue == true)) { 8165 this.Adapter.UpdateCommand.Parameters[2].Value = ((System.Guid)(ResourceId.Value)); 8166 } 8167 else { 8168 this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; 8169 } 8236 8170 if ((JobState == null)) { 8237 this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value;8238 }8239 else {8240 this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(JobState));8241 }8242 if ((ResourceId.HasValue == true)) {8243 this.Adapter.UpdateCommand.Parameters[3].Value = ((System.Guid)(ResourceId.Value));8244 }8245 else {8246 8171 this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; 8172 } 8173 else { 8174 this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(JobState)); 8247 8175 } 8248 8176 if ((Percentage.HasValue == true)) { … … 8252 8180 this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; 8253 8181 } 8254 if ((SerializedJob == null)) { 8182 if ((DateCreated.HasValue == true)) { 8183 this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(DateCreated.Value)); 8184 } 8185 else { 8255 8186 this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; 8256 8187 } 8257 else { 8258 this.Adapter.UpdateCommand.Parameters[5].Value = ((byte[])(SerializedJob)); 8259 } 8260 if ((DateCreated.HasValue == true)) { 8261 this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(DateCreated.Value)); 8188 if ((DateCalculated.HasValue == true)) { 8189 this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(DateCalculated.Value)); 8262 8190 } 8263 8191 else { 8264 8192 this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; 8265 8193 } 8266 if (( DateCalculated.HasValue == true)) {8267 this.Adapter.UpdateCommand.Parameters[7].Value = (( System.DateTime)(DateCalculated.Value));8194 if ((Priority.HasValue == true)) { 8195 this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Priority.Value)); 8268 8196 } 8269 8197 else { 8270 8198 this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value; 8271 8199 } 8272 if ((Pr iority.HasValue == true)) {8273 this.Adapter.UpdateCommand.Parameters[8].Value = (( int)(Priority.Value));8200 if ((ProjectId.HasValue == true)) { 8201 this.Adapter.UpdateCommand.Parameters[8].Value = ((System.Guid)(ProjectId.Value)); 8274 8202 } 8275 8203 else { 8276 8204 this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value; 8277 8205 } 8278 if (( ProjectId.HasValue == true)) {8279 this.Adapter.UpdateCommand.Parameters[9].Value = ((System.Guid)( ProjectId.Value));8206 if ((UserId.HasValue == true)) { 8207 this.Adapter.UpdateCommand.Parameters[9].Value = ((System.Guid)(UserId.Value)); 8280 8208 } 8281 8209 else { 8282 8210 this.Adapter.UpdateCommand.Parameters[9].Value = global::System.DBNull.Value; 8283 8211 } 8284 if (( UserId.HasValue == true)) {8285 this.Adapter.UpdateCommand.Parameters[10].Value = (( System.Guid)(UserId.Value));8212 if ((CoresNeeded.HasValue == true)) { 8213 this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(CoresNeeded.Value)); 8286 8214 } 8287 8215 else { 8288 8216 this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value; 8289 8217 } 8290 if (( CoresNeeded.HasValue == true)) {8291 this.Adapter.UpdateCommand.Parameters[11].Value = ((int)( CoresNeeded.Value));8218 if ((MemoryNeeded.HasValue == true)) { 8219 this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(MemoryNeeded.Value)); 8292 8220 } 8293 8221 else { 8294 8222 this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value; 8295 8223 } 8296 if ((MemoryNeeded.HasValue == true)) { 8297 this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(MemoryNeeded.Value)); 8298 } 8299 else { 8300 this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value; 8301 } 8302 this.Adapter.UpdateCommand.Parameters[13].Value = ((System.Guid)(Original_JobId)); 8224 this.Adapter.UpdateCommand.Parameters[12].Value = ((System.Guid)(Original_JobId)); 8303 8225 if ((Original_ParentJobId.HasValue == true)) { 8304 this.Adapter.UpdateCommand.Parameters[1 4].Value = ((object)(0));8305 this.Adapter.UpdateCommand.Parameters[1 5].Value = ((System.Guid)(Original_ParentJobId.Value));8306 } 8307 else { 8308 this.Adapter.UpdateCommand.Parameters[1 4].Value = ((object)(1));8309 this.Adapter.UpdateCommand.Parameters[1 5].Value = global::System.DBNull.Value;8226 this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0)); 8227 this.Adapter.UpdateCommand.Parameters[14].Value = ((System.Guid)(Original_ParentJobId.Value)); 8228 } 8229 else { 8230 this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1)); 8231 this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value; 8310 8232 } 8311 8233 if ((Original_ResourceId.HasValue == true)) { 8312 this.Adapter.UpdateCommand.Parameters[1 6].Value = ((object)(0));8313 this.Adapter.UpdateCommand.Parameters[1 7].Value = ((System.Guid)(Original_ResourceId.Value));8314 } 8315 else { 8316 this.Adapter.UpdateCommand.Parameters[1 6].Value = ((object)(1));8317 this.Adapter.UpdateCommand.Parameters[1 7].Value = global::System.DBNull.Value;8234 this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0)); 8235 this.Adapter.UpdateCommand.Parameters[16].Value = ((System.Guid)(Original_ResourceId.Value)); 8236 } 8237 else { 8238 this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1)); 8239 this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value; 8318 8240 } 8319 8241 if ((Original_Percentage.HasValue == true)) { 8320 this.Adapter.UpdateCommand.Parameters[1 8].Value = ((object)(0));8321 this.Adapter.UpdateCommand.Parameters[1 9].Value = ((double)(Original_Percentage.Value));8322 } 8323 else { 8324 this.Adapter.UpdateCommand.Parameters[1 8].Value = ((object)(1));8325 this.Adapter.UpdateCommand.Parameters[1 9].Value = global::System.DBNull.Value;8242 this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0)); 8243 this.Adapter.UpdateCommand.Parameters[18].Value = ((double)(Original_Percentage.Value)); 8244 } 8245 else { 8246 this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1)); 8247 this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value; 8326 8248 } 8327 8249 if ((Original_DateCreated.HasValue == true)) { 8328 this.Adapter.UpdateCommand.Parameters[ 20].Value = ((object)(0));8329 this.Adapter.UpdateCommand.Parameters[2 1].Value = ((System.DateTime)(Original_DateCreated.Value));8330 } 8331 else { 8332 this.Adapter.UpdateCommand.Parameters[ 20].Value = ((object)(1));8333 this.Adapter.UpdateCommand.Parameters[2 1].Value = global::System.DBNull.Value;8250 this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(0)); 8251 this.Adapter.UpdateCommand.Parameters[20].Value = ((System.DateTime)(Original_DateCreated.Value)); 8252 } 8253 else { 8254 this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(1)); 8255 this.Adapter.UpdateCommand.Parameters[20].Value = global::System.DBNull.Value; 8334 8256 } 8335 8257 if ((Original_DateCalculated.HasValue == true)) { 8336 this.Adapter.UpdateCommand.Parameters[2 2].Value = ((object)(0));8337 this.Adapter.UpdateCommand.Parameters[2 3].Value = ((System.DateTime)(Original_DateCalculated.Value));8338 } 8339 else { 8340 this.Adapter.UpdateCommand.Parameters[2 2].Value = ((object)(1));8341 this.Adapter.UpdateCommand.Parameters[2 3].Value = global::System.DBNull.Value;8258 this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(0)); 8259 this.Adapter.UpdateCommand.Parameters[22].Value = ((System.DateTime)(Original_DateCalculated.Value)); 8260 } 8261 else { 8262 this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(1)); 8263 this.Adapter.UpdateCommand.Parameters[22].Value = global::System.DBNull.Value; 8342 8264 } 8343 8265 if ((Original_Priority.HasValue == true)) { 8344 this.Adapter.UpdateCommand.Parameters[2 4].Value = ((object)(0));8345 this.Adapter.UpdateCommand.Parameters[2 5].Value = ((int)(Original_Priority.Value));8346 } 8347 else { 8348 this.Adapter.UpdateCommand.Parameters[2 4].Value = ((object)(1));8349 this.Adapter.UpdateCommand.Parameters[2 5].Value = global::System.DBNull.Value;8266 this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(0)); 8267 this.Adapter.UpdateCommand.Parameters[24].Value = ((int)(Original_Priority.Value)); 8268 } 8269 else { 8270 this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(1)); 8271 this.Adapter.UpdateCommand.Parameters[24].Value = global::System.DBNull.Value; 8350 8272 } 8351 8273 if ((Original_ProjectId.HasValue == true)) { 8352 this.Adapter.UpdateCommand.Parameters[2 6].Value = ((object)(0));8353 this.Adapter.UpdateCommand.Parameters[2 7].Value = ((System.Guid)(Original_ProjectId.Value));8354 } 8355 else { 8356 this.Adapter.UpdateCommand.Parameters[2 6].Value = ((object)(1));8357 this.Adapter.UpdateCommand.Parameters[2 7].Value = global::System.DBNull.Value;8274 this.Adapter.UpdateCommand.Parameters[25].Value = ((object)(0)); 8275 this.Adapter.UpdateCommand.Parameters[26].Value = ((System.Guid)(Original_ProjectId.Value)); 8276 } 8277 else { 8278 this.Adapter.UpdateCommand.Parameters[25].Value = ((object)(1)); 8279 this.Adapter.UpdateCommand.Parameters[26].Value = global::System.DBNull.Value; 8358 8280 } 8359 8281 if ((Original_UserId.HasValue == true)) { 8360 this.Adapter.UpdateCommand.Parameters[2 8].Value = ((object)(0));8361 this.Adapter.UpdateCommand.Parameters[2 9].Value = ((System.Guid)(Original_UserId.Value));8362 } 8363 else { 8364 this.Adapter.UpdateCommand.Parameters[2 8].Value = ((object)(1));8365 this.Adapter.UpdateCommand.Parameters[2 9].Value = global::System.DBNull.Value;8282 this.Adapter.UpdateCommand.Parameters[27].Value = ((object)(0)); 8283 this.Adapter.UpdateCommand.Parameters[28].Value = ((System.Guid)(Original_UserId.Value)); 8284 } 8285 else { 8286 this.Adapter.UpdateCommand.Parameters[27].Value = ((object)(1)); 8287 this.Adapter.UpdateCommand.Parameters[28].Value = global::System.DBNull.Value; 8366 8288 } 8367 8289 if ((Original_CoresNeeded.HasValue == true)) { 8368 this.Adapter.UpdateCommand.Parameters[ 30].Value = ((object)(0));8369 this.Adapter.UpdateCommand.Parameters[3 1].Value = ((int)(Original_CoresNeeded.Value));8370 } 8371 else { 8372 this.Adapter.UpdateCommand.Parameters[ 30].Value = ((object)(1));8373 this.Adapter.UpdateCommand.Parameters[3 1].Value = global::System.DBNull.Value;8290 this.Adapter.UpdateCommand.Parameters[29].Value = ((object)(0)); 8291 this.Adapter.UpdateCommand.Parameters[30].Value = ((int)(Original_CoresNeeded.Value)); 8292 } 8293 else { 8294 this.Adapter.UpdateCommand.Parameters[29].Value = ((object)(1)); 8295 this.Adapter.UpdateCommand.Parameters[30].Value = global::System.DBNull.Value; 8374 8296 } 8375 8297 if ((Original_MemoryNeeded.HasValue == true)) { 8376 this.Adapter.UpdateCommand.Parameters[3 2].Value = ((object)(0));8377 this.Adapter.UpdateCommand.Parameters[3 3].Value = ((int)(Original_MemoryNeeded.Value));8378 } 8379 else { 8380 this.Adapter.UpdateCommand.Parameters[3 2].Value = ((object)(1));8381 this.Adapter.UpdateCommand.Parameters[3 3].Value = global::System.DBNull.Value;8298 this.Adapter.UpdateCommand.Parameters[31].Value = ((object)(0)); 8299 this.Adapter.UpdateCommand.Parameters[32].Value = ((int)(Original_MemoryNeeded.Value)); 8300 } 8301 else { 8302 this.Adapter.UpdateCommand.Parameters[31].Value = ((object)(1)); 8303 this.Adapter.UpdateCommand.Parameters[32].Value = global::System.DBNull.Value; 8382 8304 } 8383 8305 global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; … … 8402 8324 public virtual int Update( 8403 8325 global::System.Nullable<global::System.Guid> ParentJobId, 8326 global::System.Nullable<global::System.Guid> ResourceId, 8404 8327 string JobState, 8405 global::System.Nullable<global::System.Guid> ResourceId,8406 8328 global::System.Nullable<double> Percentage, 8407 byte[] SerializedJob,8408 8329 global::System.Nullable<global::System.DateTime> DateCreated, 8409 8330 global::System.Nullable<global::System.DateTime> DateCalculated, … … 8424 8345 global::System.Nullable<int> Original_CoresNeeded, 8425 8346 global::System.Nullable<int> 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); 8347 return this.Update(Original_JobId, ParentJobId, ResourceId, JobState, Percentage, 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); 8348 } 8349 8350 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 8351 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 8352 public virtual byte[] GetSerializedJobById(System.Guid JobId) { 8353 global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[10]; 8354 command.Parameters[0].Value = ((System.Guid)(JobId)); 8355 global::System.Data.ConnectionState previousConnectionState = command.Connection.State; 8356 if (((command.Connection.State & global::System.Data.ConnectionState.Open) 8357 != global::System.Data.ConnectionState.Open)) { 8358 command.Connection.Open(); 8359 } 8360 object returnValue; 8361 try { 8362 returnValue = command.ExecuteScalar(); 8363 } 8364 finally { 8365 if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { 8366 command.Connection.Close(); 8367 } 8368 } 8369 if (((returnValue == null) 8370 || (returnValue.GetType() == typeof(global::System.DBNull)))) { 8371 return null; 8372 } 8373 else { 8374 return ((byte[])(returnValue)); 8375 } 8376 } 8377 8378 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 8379 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 8380 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, false)] 8381 public virtual int UpdateSerializedJob(byte[] SerializedJob, System.Guid JobId) { 8382 global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[11]; 8383 if ((SerializedJob == null)) { 8384 command.Parameters[0].Value = global::System.DBNull.Value; 8385 } 8386 else { 8387 command.Parameters[0].Value = ((byte[])(SerializedJob)); 8388 } 8389 command.Parameters[1].Value = ((System.Guid)(JobId)); 8390 global::System.Data.ConnectionState previousConnectionState = command.Connection.State; 8391 if (((command.Connection.State & global::System.Data.ConnectionState.Open) 8392 != global::System.Data.ConnectionState.Open)) { 8393 command.Connection.Open(); 8394 } 8395 int returnValue; 8396 try { 8397 returnValue = command.ExecuteNonQuery(); 8398 } 8399 finally { 8400 if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { 8401 command.Connection.Close(); 8402 } 8403 } 8404 return returnValue; 8427 8405 } 8428 8406 }
Note: See TracChangeset
for help on using the changeset viewer.