- Timestamp:
- 12/14/17 15:08:38 (7 years ago)
- Location:
- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/ProjectDao.cs
r15508 r15527 33 33 } 34 34 35 public IEnumerable<Project> Get ProjectsByChildId(Guid id) {36 return DataContext.ExecuteQuery<Project>(Get ProjectsByChildIdQuery, id);35 public IEnumerable<Project> GetChildProjectsById(Guid id) { 36 return DataContext.ExecuteQuery<Project>(GetChildProjectsByIdQuery, id); 37 37 } 38 38 39 public IEnumerable<Guid> GetProjectIdsByChildId(Guid id) { 40 return DataContext.ExecuteQuery<Guid>(GetProjectIdsByChildIdQuery, id); 39 public IEnumerable<Guid> GetChildProjectIdsById(Guid id) { 40 return DataContext.ExecuteQuery<Guid>(GetChildProjectIdsByIdQuery, id); 41 } 42 43 public IEnumerable<Project> GetParentProjectsById(Guid id) { 44 return DataContext.ExecuteQuery<Project>(GetParentProjectsByIdQuery, id); 45 } 46 47 public IEnumerable<Guid> GetParentProjectIdsById(Guid id) { 48 return DataContext.ExecuteQuery<Guid>(GetParentProjectIdsByIdQuery, id); 49 } 50 51 public IEnumerable<Project> GetCurrentAndParentProjectsById(Guid id) { 52 return DataContext.ExecuteQuery<Project>(GetCurrentAndParentProjectsByIdQuery, id); 53 } 54 55 public IEnumerable<Guid> GetCurrentAndParentProjectIdsById(Guid id) { 56 return DataContext.ExecuteQuery<Guid>(GetCurrentAndParentProjectIdsByIdQuery, id); 41 57 } 42 58 … … 50 66 51 67 #region String queries 52 private const string Get ProjectsByChildIdQuery = @"53 68 private const string GetChildProjectsByIdQuery = @" 69 WITH ptree AS 54 70 ( 55 71 SELECT ProjectId, ParentProjectId 56 72 FROM [Project] 57 73 UNION ALL 58 74 SELECT pt.ProjectId, p.ParentProjectId … … 62 78 SELECT DISTINCT pro.* 63 79 FROM ptree, [Project] pro 64 WHERE ptree.P rojectId = {0}65 AND ptree.ParentProjectId = pro.ProjectId80 WHERE ptree.ParentProjectId = {0} 81 AND ptree.ProjectId = pro.ProjectId 66 82 "; 67 private const string Get ProjectIdsByChildIdQuery = @"83 private const string GetChildProjectIdsByIdQuery = @" 68 84 WITH ptree AS 85 ( 86 SELECT ProjectId, ParentProjectId 87 FROM [Project] 88 UNION ALL 89 SELECT pt.ProjectId, r.ParentProjectId 90 FROM [Project] r 91 JOIN ptree pt ON pt.ParentProjectId = r.ProjectId AND r.ParentProjectId <> r.ProjectId AND pt.ParentProjectId <> pt.ProjectId 92 ) 93 SELECT DISTINCT ptree.ProjectId 94 FROM ptree 95 WHERE ptree.ParentProjectId = {0} 96 "; 97 private const string GetParentProjectsByIdQuery = @" 98 WITH pbranch AS 69 99 ( 70 100 SELECT ProjectId, ParentProjectId 71 101 FROM [Project] 72 102 UNION ALL 73 SELECT p t.ProjectId, p.ParentProjectId103 SELECT pb.ProjectId, p.ParentProjectId 74 104 FROM [Project] p 75 JOIN p tree pt ON pt.ParentProjectId = p.ProjectId AND p.ParentProjectId <> p.ProjectId AND pt.ParentProjectId <> pt.ProjectId105 JOIN pbranch pb ON pb.ParentProjectId = p.ProjectId AND p.ParentProjectId <> p.ProjectId AND pb.ParentProjectId <> pb.ProjectId 76 106 ) 77 SELECT DISTINCT ptree.ParentProjectId 78 FROM ptree 79 WHERE ptree.ProjectId = {0} 107 SELECT DISTINCT pro.* 108 FROM pbranch, [Project] pro 109 WHERE pbranch.ProjectId = {0} 110 AND pbranch.ParentProjectId = pro.ProjectId 111 "; 112 private const string GetParentProjectIdsByIdQuery = @" 113 WITH pbranch AS 114 ( 115 SELECT ProjectId, ParentProjectId 116 FROM [Project] 117 UNION ALL 118 SELECT pb.ProjectId, p.ParentProjectId 119 FROM [Project] p 120 JOIN pbranch pb ON pb.ParentProjectId = p.ProjectId AND p.ParentProjectId <> p.ProjectId AND pb.ParentProjectId <> pb.ProjectId 121 ) 122 SELECT DISTINCT pbranch.ParentProjectId 123 FROM pbranch 124 WHERE pbranch.ProjectId = {0} 125 "; 126 private const string GetCurrentAndParentProjectsByIdQuery = @" 127 WITH pbranch AS 128 ( 129 SELECT ProjectId, ParentProjectId 130 FROM Project 131 WHERE ProjectId = {0} 132 UNION ALL 133 SELECT p.ProjectId, p.ParentProjectId 134 FROM Project p 135 JOIN pbranch pb ON pb.ParentProjectId = p.ProjectId 136 ) 137 SELECT DISTINCT pro.* 138 FROM pbranch, Project pro 139 WHERE pbranch.ProjectId = pro.ProjectId 140 "; 141 private const string GetCurrentAndParentProjectIdsByIdQuery = @" 142 WITH pbranch AS 143 ( 144 SELECT ProjectId, ParentProjectId 145 FROM Project 146 WHERE ProjectId = {0} 147 UNION ALL 148 SELECT p.ProjectId, p.ParentProjectId 149 FROM Project p 150 JOIN pbranch pb ON pb.ParentProjectId = p.ProjectId 151 ) 152 SELECT DISTINCT pbranch.ProjectId 153 FROM pbranch 80 154 "; 81 155 #endregion -
branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/ResourceDao.cs
r15503 r15527 41 41 } 42 42 43 public IEnumerable<Resource> Get ResourcesByParentId(Guid id) {44 return DataContext.ExecuteQuery<Resource>(Get ResourcesByParentIdQuery, id);43 public IEnumerable<Resource> GetChildResourcesById(Guid id) { 44 return DataContext.ExecuteQuery<Resource>(GetChildResourcesByIdQuery, id); 45 45 } 46 46 47 public IEnumerable<Guid> Get ResourceIdsByParentId(Guid id) {48 return DataContext.ExecuteQuery<Guid>(Get ResourceIdsByParentIdQuery, id);47 public IEnumerable<Guid> GetChildResourceIdsById(Guid id) { 48 return DataContext.ExecuteQuery<Guid>(GetChildResourceIdsByIdQuery, id); 49 49 } 50 50 51 public IEnumerable<Resource> Get ResourcesByChildId(Guid id) {52 return DataContext.ExecuteQuery<Resource>(Get ResourcesByChildIdQuery, id);51 public IEnumerable<Resource> GetParentResourcesById(Guid id) { 52 return DataContext.ExecuteQuery<Resource>(GetParentResourcesByIdQuery, id); 53 53 } 54 54 55 public IEnumerable<Guid> GetResourceIdsByChildId(Guid id) { 56 return DataContext.ExecuteQuery<Guid>(GetResourceIdsByChildIdQuery, id); 55 public IEnumerable<Guid> GetParentResourceIdsById(Guid id) { 56 return DataContext.ExecuteQuery<Guid>(GetParentResourceIdsByIdQuery, id); 57 } 58 59 public IEnumerable<Resource> GetCurrentAndParentResourcesById(Guid id) { 60 return DataContext.ExecuteQuery<Resource>(GetCurrentAndParentResourcesByIdQuery, id); 61 } 62 63 public IEnumerable<Guid> GetCurrentAndParentResourceIdsById(Guid id) { 64 return DataContext.ExecuteQuery<Guid>(GetCurrentAndParentResourceIdsByIdQuery, id); 57 65 } 58 66 … … 72 80 73 81 #region String queries 74 private const string Get ResourcesByParentIdQuery = @"82 private const string GetChildResourcesByIdQuery = @" 75 83 WITH rtree AS 76 84 ( … … 84 92 SELECT DISTINCT res.* 85 93 FROM rtree, [Resource] res 86 WHERE rtree.ParentResourceId = ({0})94 WHERE rtree.ParentResourceId = {0} 87 95 AND rtree.ResourceId = res.ResourceId 88 96 "; 89 private const string Get ResourceIdsByParentIdQuery = @"97 private const string GetChildResourceIdsByIdQuery = @" 90 98 WITH rtree AS 91 99 ( … … 99 107 SELECT DISTINCT rtree.ResourceId 100 108 FROM rtree 101 WHERE rtree.ParentResourceId = ({0})109 WHERE rtree.ParentResourceId = {0} 102 110 "; 103 private const string Get ResourcesByChildIdQuery = @"104 WITH r treeAS111 private const string GetParentResourcesByIdQuery = @" 112 WITH rbranch AS 105 113 ( 106 114 SELECT ResourceId, ParentResourceId 107 115 FROM [Resource] 108 116 UNION ALL 109 SELECT r t.ResourceId, r.ParentResourceId117 SELECT rb.ResourceId, r.ParentResourceId 110 118 FROM [Resource] r 111 JOIN r tree rt ON rt.ParentResourceId = r.ResourceId AND r.ParentResourceId <> r.ResourceId AND rt.ParentResourceId <> rt.ResourceId119 JOIN rbranch rb ON rb.ParentResourceId = r.ResourceId AND r.ParentResourceId <> r.ResourceId AND rb.ParentResourceId <> rb.ResourceId 112 120 ) 113 121 SELECT DISTINCT res.* 114 FROM r tree, [Resource] res115 WHERE r tree.ResourceId = ({0})116 AND r tree.ParentResourceId = res.ResourceId122 FROM rbranch, [Resource] res 123 WHERE rbranch.ResourceId = {0} 124 AND rbranch.ParentResourceId = res.ResourceId 117 125 "; 118 private const string Get ResourceIdsByChildIdQuery = @"119 WITH r treeAS126 private const string GetParentResourceIdsByIdQuery = @" 127 WITH rbranch AS 120 128 ( 121 129 SELECT ResourceId, ParentResourceId 122 130 FROM [Resource] 123 131 UNION ALL 124 SELECT r t.ResourceId, r.ParentResourceId132 SELECT rb.ResourceId, r.ParentResourceId 125 133 FROM [Resource] r 126 JOIN r tree rt ON rt.ParentResourceId = r.ResourceId AND r.ParentResourceId <> r.ResourceId AND rt.ParentResourceId <> rt.ResourceId134 JOIN rbranch rb ON rb.ParentResourceId = r.ResourceId AND r.ParentResourceId <> r.ResourceId AND rb.ParentResourceId <> rb.ResourceId 127 135 ) 128 SELECT DISTINCT rtree.ParentResourceId 129 FROM rtree 130 WHERE rtree.ResourceId = ({0}) 136 SELECT DISTINCT rbranch.ParentResourceId 137 FROM rbranch 138 WHERE rbranch.ResourceId = {0} 139 "; 140 private const string GetCurrentAndParentResourcesByIdQuery = @" 141 WITH rbranch AS 142 ( 143 SELECT ResourceId, ParentResourceId 144 FROM [Resource] 145 WHERE ResourceId = {0} 146 UNION ALL 147 SELECT r.ResourceId, r.ParentResourceId 148 FROM [Resource] r 149 JOIN rbranch rb ON rb.ParentResourceId = r.ResourceId 150 ) 151 SELECT DISTINCT res.* 152 FROM rbranch, [Resource] res 153 WHERE rbranch.ResourceId = res.ResourceId 154 "; 155 private const string GetCurrentAndParentResourceIdsByIdQuery = @" 156 WITH rbranch AS 157 ( 158 SELECT ResourceId, ParentResourceId 159 FROM [Resource] 160 WHERE ResourceId = {0} 161 UNION ALL 162 SELECT r.ResourceId, r.ParentResourceId 163 FROM [Resource] r 164 JOIN rbranch rb ON rb.ParentResourceId = r.ResourceId 165 ) 166 SELECT DISTINCT rbranch.ResourceId 167 FROM rbranch 131 168 "; 132 169 #endregion -
branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml
r15526 r15527 4 4 <Column Name="ResourceId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" /> 5 5 <Column Name="ProjectId" Storage="_JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" /> 6 <Association Name="Resource_Assigned Resource" Member="Resource" ThisKey="ResourceId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" DeleteRule="CASCADE" />7 <Association Name="Project_Assigned Resource" Member="Project" ThisKey="ProjectId" OtherKey="ProjectId" Type="Project" IsForeignKey="true" DeleteRule="CASCADE" />6 <Association Name="Resource_AssignedProjectResource" Member="Resource" ThisKey="ResourceId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" DeleteRule="CASCADE" /> 7 <Association Name="Project_AssignedProjectResource" Member="Project" ThisKey="ProjectId" OtherKey="ProjectId" Type="Project" IsForeignKey="true" DeleteRule="CASCADE" /> 8 8 </Type> 9 9 </Table> … … 37 37 <Column Name="HbInterval" Type="System.Int32" DbType="Int" CanBeNull="false" /> 38 38 <Column Name="OwnerUserId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" /> 39 <Association Name="Resource_Assigned Resource" Member="AssignedProjectResources" Storage="_AssignedResources" ThisKey="ResourceId" OtherKey="ResourceId" Type="AssignedProjectResource" />39 <Association Name="Resource_AssignedProjectResource" Member="AssignedProjectResources" Storage="_AssignedResources" ThisKey="ResourceId" OtherKey="ResourceId" Type="AssignedProjectResource" /> 40 40 <Association Name="Resource_Resource" Member="ChildResources" ThisKey="ResourceId" OtherKey="ParentResourceId" Type="Resource" /> 41 41 <Association Name="Resource_Downtime" Member="Downtimes" Storage="_UptimeCalendars" ThisKey="ResourceId" OtherKey="ResourceId" Type="Downtime" /> 42 42 <Association Name="Resource_StateLog" Member="StateLogs" ThisKey="ResourceId" OtherKey="SlaveId" Type="StateLog" /> 43 <Association Name="Resource_ResourcePermission" Member="ResourcePermissions" ThisKey="ResourceId" OtherKey="ResourceId" Type="ResourcePermission" />44 43 <Association Name="Resource_AssignedTaskResource" Member="AssignedTaskResources" ThisKey="ResourceId" OtherKey="ResourceId" Type="AssignedTaskResource" /> 45 44 <Association Name="Resource_Resource" Member="ParentResource" ThisKey="ParentResourceId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" /> … … 103 102 <Column Name="Name" Type="System.String" DbType="VarChar(MAX)" CanBeNull="false" /> 104 103 <Column Name="Description" Type="System.String" DbType="VarChar(MAX)" CanBeNull="true" /> 105 <Column Name="ResourceIds" Type="System.String" DbType="VarChar(MAX)" CanBeNull="true" />106 104 <Column Name="OwnerUserId" Storage="_UserId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="false" /> 107 105 <Column Name="DateCreated" Type="System.DateTime" DbType="DateTime" CanBeNull="false" /> … … 155 153 <Column Name="LifecycleId" Type="System.Int32" DbType="Int" IsPrimaryKey="true" CanBeNull="false" /> 156 154 <Column Name="LastCleanup" Type="System.DateTime" DbType="DateTime" CanBeNull="false" /> 157 </Type>158 </Table>159 <Table Name="dbo.ResourcePermission" Member="ResourcePermissions">160 <Type Name="ResourcePermission">161 <Column Name="ResourceId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" />162 <Column Name="GrantedUserId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" />163 <Column Name="GrantedByUserId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />164 <Association Name="Resource_ResourcePermission" Member="Resource" ThisKey="ResourceId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" />165 155 </Type> 166 156 </Table> … … 268 258 <Column Name="StartDate" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" /> 269 259 <Column Name="EndDate" Type="System.DateTime" DbType="DateTime" CanBeNull="true" /> 270 <Association Name="Project_Assigned Resource" Member="AssignedProjectResources" Storage="_AssignedResources" ThisKey="ProjectId" OtherKey="ProjectId" Type="AssignedProjectResource" />260 <Association Name="Project_AssignedProjectResource" Member="AssignedProjectResources" Storage="_AssignedResources" ThisKey="ProjectId" OtherKey="ProjectId" Type="AssignedProjectResource" /> 271 261 <Association Name="Project_Job" Member="Jobs" ThisKey="ProjectId" OtherKey="ProjectId" Type="Job" /> 272 262 <Association Name="Project_Project" Member="ChildProjects" Storage="_Projects" ThisKey="ProjectId" OtherKey="ParentProjectId" Type="Project" /> -
branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout
r15526 r15527 39 39 </nestedChildShapes> 40 40 </classShape> 41 <classShape Id="e6f840cc-2968-4be1-b234-eef624ccacbb" absoluteBounds="4.125, 2.625, 2, 2.1554996744791666">41 <classShape Id="e6f840cc-2968-4be1-b234-eef624ccacbb" absoluteBounds="4.125, 2.625, 2, 1.9631982421874996"> 42 42 <DataClassMoniker Name="/HiveDataContext/Job" /> 43 43 <nestedChildShapes> 44 <elementListCompartment Id="0c65d4e1-256a-4a91-9a57-392f25e4de7f" absoluteBounds="4.1400000000000006, 3.0850000000000009, 1.9700000000000002, 1. 5954996744791665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />44 <elementListCompartment Id="0c65d4e1-256a-4a91-9a57-392f25e4de7f" absoluteBounds="4.1400000000000006, 3.0850000000000009, 1.9700000000000002, 1.4031982421875" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> 45 45 </nestedChildShapes> 46 46 </classShape> … … 69 69 </nodes> 70 70 </inheritanceConnector> 71 <associationConnector edgePoints="[(13.25 : 2.15469482421875); (15.71875 : 2.15469482421875); (15.71875 : 8.25)]" manuallyRouted="true" fixedFrom="NotFixed" fixedTo="NotFixed">72 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_AssignedResource" />73 <nodes>74 <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" />75 <classShapeMoniker Id="a929c9dc-69f4-4488-ba1c-a2342bf81d89" />76 </nodes>77 </associationConnector>78 71 <classShape Id="6bc13f26-f9a8-4597-b054-35be34190d12" absoluteBounds="4.125, 1, 2, 1.3862939453125"> 79 72 <DataClassMoniker Name="/HiveDataContext/TaskData" /> … … 95 88 </nodes> 96 89 </associationConnector> 97 <associationConnector edgePoints="[(8.875 : 6.56814697265625); (8.5 : 6.56814697265625)]" fixedFrom=" Algorithm" fixedTo="Algorithm">90 <associationConnector edgePoints="[(8.875 : 6.56814697265625); (8.5 : 6.56814697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 98 91 <AssociationMoniker Name="/HiveDataContext/Plugin/Plugin_RequiredPlugin" /> 99 92 <nodes> … … 162 155 </nodes> 163 156 </associationConnector> 164 <associationConnector edgePoints="[(6.5 : 2.50564697265625); (3.75 : 2.50564697265625)]" fixedFrom=" NotFixed" fixedTo="NotFixed">157 <associationConnector edgePoints="[(6.5 : 2.50564697265625); (3.75 : 2.50564697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 165 158 <AssociationMoniker Name="/HiveDataContext/Task/Task_StateLog" /> 166 159 <nodes> … … 169 162 </nodes> 170 163 </associationConnector> 171 <associationConnector edgePoints="[(6.125 : 3.37100341796875); (6.5 : 3.37100341796875)]" fixedFrom=" NotFixed" fixedTo="NotFixed">164 <associationConnector edgePoints="[(6.125 : 3.37100341796875); (6.5 : 3.37100341796875)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 172 165 <AssociationMoniker Name="/HiveDataContext/Job/Job_Task" /> 173 166 <nodes> … … 176 169 </nodes> 177 170 </associationConnector> 178 <associationConnector edgePoints="[(4.125 : 4. 20274983723958); (3.75 : 4.20274983723958)]" fixedFrom="NotFixed" fixedTo="NotFixed">171 <associationConnector edgePoints="[(4.125 : 4.10659912109375); (3.75 : 4.10659912109375)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 179 172 <AssociationMoniker Name="/HiveDataContext/Job/Job_JobPermission" /> 180 173 <nodes> … … 183 176 </nodes> 184 177 </associationConnector> 185 <classShape Id="a3f352be-9f15-4e73-8d44-3e8ac02fb4cf" absoluteBounds="11.25, 3.875, 2, 1.3862939453124996">186 <DataClassMoniker Name="/HiveDataContext/ResourcePermission" />187 <nestedChildShapes>188 <elementListCompartment Id="45e2f1a8-8a1e-4647-b649-10ec55976ab4" absoluteBounds="11.265, 4.335, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />189 </nestedChildShapes>190 </classShape>191 <associationConnector edgePoints="[(12.5942481820367 : 2.9631982421875); (12.5942481820367 : 3.875)]" fixedFrom="NotFixed" fixedTo="NotFixed">192 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_ResourcePermission" />193 <nodes>194 <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" />195 <classShapeMoniker Id="a3f352be-9f15-4e73-8d44-3e8ac02fb4cf" />196 </nodes>197 </associationConnector>198 178 <classShape Id="f9e8867f-fd15-4a72-8ca4-4f02cd3f141f" absoluteBounds="4.125, 5.5, 2, 1.1939925130208327"> 199 179 <DataClassMoniker Name="/HiveDataContext/UserPriority" /> … … 299 279 </nodes> 300 280 </associationConnector> 301 <associationConnector edgePoints="[(13.25 : 8.84699625651042); (13.875 : 8.84699625651042)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 302 <AssociationMoniker Name="/HiveDataContext/Project/Project_AssignedResource" /> 303 <nodes> 304 <classShapeMoniker Id="30778876-b5f6-4a97-9ec7-792011973d75" /> 305 <classShapeMoniker Id="a929c9dc-69f4-4488-ba1c-a2342bf81d89" /> 306 </nodes> 307 </associationConnector> 308 <associationConnector edgePoints="[(11.25 : 9.42390055338542); (10.375 : 9.42390055338542); (10.375 : 8); (4 : 8); (4 : 5.15549967447917); (5.125 : 5.15549967447917); (5.125 : 4.78049967447917)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 281 <associationConnector edgePoints="[(11.25 : 9.42390055338542); (10.375 : 9.42390055338542); (10.375 : 8); (4 : 8); (4 : 4.9631982421875); (5.125 : 4.9631982421875); (5.125 : 4.5881982421875)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 309 282 <AssociationMoniker Name="/HiveDataContext/Project/Project_Job" /> 310 283 <nodes> … … 326 299 </nodes> 327 300 </associationConnector> 328 <associationConnector edgePoints="[(12.25 : 2.9631982421875); (12.25 : 3.8125); (11.1875 : 3.8125); (11.1875 :4.97199625651042); (10.875 : 4.97199625651042)]" fixedFrom="Algorithm" fixedTo="Algorithm">301 <associationConnector edgePoints="[(12.25 : 2.9631982421875); (12.25 : 4.97199625651042); (10.875 : 4.97199625651042)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 329 302 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_AssignedTaskResource" /> 330 303 <nodes> 331 304 <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" /> 332 305 <classShapeMoniker Id="72ac5c1b-0fdf-43a1-bbe7-3774893b40af" /> 306 </nodes> 307 </associationConnector> 308 <associationConnector edgePoints="[(13.25 : 2.15469482421875); (15.71875 : 2.15469482421875); (15.71875 : 8.25)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 309 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_AssignedProjectResource" /> 310 <nodes> 311 <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" /> 312 <classShapeMoniker Id="a929c9dc-69f4-4488-ba1c-a2342bf81d89" /> 313 </nodes> 314 </associationConnector> 315 <associationConnector edgePoints="[(13.25 : 8.84699625651042); (13.875 : 8.84699625651042)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 316 <AssociationMoniker Name="/HiveDataContext/Project/Project_AssignedProjectResource" /> 317 <nodes> 318 <classShapeMoniker Id="30778876-b5f6-4a97-9ec7-792011973d75" /> 319 <classShapeMoniker Id="a929c9dc-69f4-4488-ba1c-a2342bf81d89" /> 333 320 </nodes> 334 321 </associationConnector> -
branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs
r15526 r15527 67 67 partial void UpdateLifecycle(Lifecycle instance); 68 68 partial void DeleteLifecycle(Lifecycle instance); 69 partial void InsertResourcePermission(ResourcePermission instance);70 partial void UpdateResourcePermission(ResourcePermission instance);71 partial void DeleteResourcePermission(ResourcePermission instance);72 69 partial void InsertUserPriority(UserPriority instance); 73 70 partial void UpdateUserPriority(UserPriority instance); … … 222 219 } 223 220 224 public System.Data.Linq.Table<ResourcePermission> ResourcePermissions225 {226 get227 {228 return this.GetTable<ResourcePermission>();229 }230 }231 232 221 public System.Data.Linq.Table<UserPriority> UserPriorities 233 222 { … … 938 927 private EntitySet<StateLog> _StateLogs; 939 928 940 private EntitySet<ResourcePermission> _ResourcePermissions;941 942 929 private EntitySet<AssignedTaskResource> _AssignedTaskResources; 943 930 … … 968 955 this._UptimeCalendars = new EntitySet<Downtime>(new Action<Downtime>(this.attach_UptimeCalendars), new Action<Downtime>(this.detach_UptimeCalendars)); 969 956 this._StateLogs = new EntitySet<StateLog>(new Action<StateLog>(this.attach_StateLogs), new Action<StateLog>(this.detach_StateLogs)); 970 this._ResourcePermissions = new EntitySet<ResourcePermission>(new Action<ResourcePermission>(this.attach_ResourcePermissions), new Action<ResourcePermission>(this.detach_ResourcePermissions));971 957 this._AssignedTaskResources = new EntitySet<AssignedTaskResource>(new Action<AssignedTaskResource>(this.attach_AssignedTaskResources), new Action<AssignedTaskResource>(this.detach_AssignedTaskResources)); 972 958 this._ParentResource = default(EntityRef<Resource>); … … 1150 1136 } 1151 1137 1152 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_ResourcePermission", Storage="_ResourcePermissions", ThisKey="ResourceId", OtherKey="ResourceId")]1153 public EntitySet<ResourcePermission> ResourcePermissions1154 {1155 get1156 {1157 return this._ResourcePermissions;1158 }1159 set1160 {1161 this._ResourcePermissions.Assign(value);1162 }1163 }1164 1165 1138 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedTaskResource", Storage="_AssignedTaskResources", ThisKey="ResourceId", OtherKey="ResourceId")] 1166 1139 public EntitySet<AssignedTaskResource> AssignedTaskResources … … 1273 1246 1274 1247 private void detach_StateLogs(StateLog entity) 1275 {1276 this.SendPropertyChanging();1277 entity.Resource = null;1278 }1279 1280 private void attach_ResourcePermissions(ResourcePermission entity)1281 {1282 this.SendPropertyChanging();1283 entity.Resource = this;1284 }1285 1286 private void detach_ResourcePermissions(ResourcePermission entity)1287 1248 { 1288 1249 this.SendPropertyChanging(); … … 2480 2441 private string _Description; 2481 2442 2482 private string _ResourceIds;2483 2484 2443 private System.Guid _UserId; 2485 2444 … … 2504 2463 partial void OnDescriptionChanging(string value); 2505 2464 partial void OnDescriptionChanged(); 2506 partial void OnResourceIdsChanging(string value);2507 partial void OnResourceIdsChanged();2508 2465 partial void OnOwnerUserIdChanging(System.Guid value); 2509 2466 partial void OnOwnerUserIdChanged(); … … 2578 2535 this.SendPropertyChanged("Description"); 2579 2536 this.OnDescriptionChanged(); 2580 }2581 }2582 }2583 2584 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceIds", DbType="VarChar(MAX)")]2585 public string ResourceIds2586 {2587 get2588 {2589 return this._ResourceIds;2590 }2591 set2592 {2593 if ((this._ResourceIds != value))2594 {2595 this.OnResourceIdsChanging(value);2596 this.SendPropertyChanging();2597 this._ResourceIds = value;2598 this.SendPropertyChanged("ResourceIds");2599 this.OnResourceIdsChanged();2600 2537 } 2601 2538 } … … 3621 3558 this.SendPropertyChanged("LastCleanup"); 3622 3559 this.OnLastCleanupChanged(); 3623 }3624 }3625 }3626 3627 public event PropertyChangingEventHandler PropertyChanging;3628 3629 public event PropertyChangedEventHandler PropertyChanged;3630 3631 protected virtual void SendPropertyChanging()3632 {3633 if ((this.PropertyChanging != null))3634 {3635 this.PropertyChanging(this, emptyChangingEventArgs);3636 }3637 }3638 3639 protected virtual void SendPropertyChanged(String propertyName)3640 {3641 if ((this.PropertyChanged != null))3642 {3643 this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));3644 }3645 }3646 }3647 3648 [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ResourcePermission")]3649 public partial class ResourcePermission : INotifyPropertyChanging, INotifyPropertyChanged3650 {3651 3652 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);3653 3654 private System.Guid _ResourceId;3655 3656 private System.Guid _GrantedUserId;3657 3658 private System.Guid _GrantedByUserId;3659 3660 private EntityRef<Resource> _Resource;3661 3662 #region Extensibility Method Definitions3663 partial void OnLoaded();3664 partial void OnValidate(System.Data.Linq.ChangeAction action);3665 partial void OnCreated();3666 partial void OnResourceIdChanging(System.Guid value);3667 partial void OnResourceIdChanged();3668 partial void OnGrantedUserIdChanging(System.Guid value);3669 partial void OnGrantedUserIdChanged();3670 partial void OnGrantedByUserIdChanging(System.Guid value);3671 partial void OnGrantedByUserIdChanged();3672 #endregion3673 3674 public ResourcePermission()3675 {3676 this._Resource = default(EntityRef<Resource>);3677 OnCreated();3678 }3679 3680 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]3681 public System.Guid ResourceId3682 {3683 get3684 {3685 return this._ResourceId;3686 }3687 set3688 {3689 if ((this._ResourceId != value))3690 {3691 if (this._Resource.HasLoadedOrAssignedValue)3692 {3693 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();3694 }3695 this.OnResourceIdChanging(value);3696 this.SendPropertyChanging();3697 this._ResourceId = value;3698 this.SendPropertyChanged("ResourceId");3699 this.OnResourceIdChanged();3700 }3701 }3702 }3703 3704 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GrantedUserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]3705 public System.Guid GrantedUserId3706 {3707 get3708 {3709 return this._GrantedUserId;3710 }3711 set3712 {3713 if ((this._GrantedUserId != value))3714 {3715 this.OnGrantedUserIdChanging(value);3716 this.SendPropertyChanging();3717 this._GrantedUserId = value;3718 this.SendPropertyChanged("GrantedUserId");3719 this.OnGrantedUserIdChanged();3720 }3721 }3722 }3723 3724 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GrantedByUserId", DbType="UniqueIdentifier NOT NULL")]3725 public System.Guid GrantedByUserId3726 {3727 get3728 {3729 return this._GrantedByUserId;3730 }3731 set3732 {3733 if ((this._GrantedByUserId != value))3734 {3735 this.OnGrantedByUserIdChanging(value);3736 this.SendPropertyChanging();3737 this._GrantedByUserId = value;3738 this.SendPropertyChanged("GrantedByUserId");3739 this.OnGrantedByUserIdChanged();3740 }3741 }3742 }3743 3744 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_ResourcePermission", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true)]3745 public Resource Resource3746 {3747 get3748 {3749 return this._Resource.Entity;3750 }3751 set3752 {3753 Resource previousValue = this._Resource.Entity;3754 if (((previousValue != value)3755 || (this._Resource.HasLoadedOrAssignedValue == false)))3756 {3757 this.SendPropertyChanging();3758 if ((previousValue != null))3759 {3760 this._Resource.Entity = null;3761 previousValue.ResourcePermissions.Remove(this);3762 }3763 this._Resource.Entity = value;3764 if ((value != null))3765 {3766 value.ResourcePermissions.Add(this);3767 this._ResourceId = value.ResourceId;3768 }3769 else3770 {3771 this._ResourceId = default(System.Guid);3772 }3773 this.SendPropertyChanged("Resource");3774 3560 } 3775 3561 }
Note: See TracChangeset
for help on using the changeset viewer.