Changeset 1758
- Timestamp:
- 05/08/09 12:42:03 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.DataAccess.ADOHelper/3.2/ManyToManyRelationHelper.cs
r1729 r1758 10 10 { 11 11 ITableAdapterWrapper<AdapterT, ManyToManyRelation, RowT> tableAdapterWrapper; 12 12 13 private int childIndex; 14 13 15 public ManyToManyRelationHelper( 14 ITableAdapterWrapper<AdapterT, ManyToManyRelation, RowT> tableAdapterWrapper) { 16 ITableAdapterWrapper<AdapterT, ManyToManyRelation, RowT> tableAdapterWrapper, 17 int childIndex) { 15 18 this.tableAdapterWrapper = tableAdapterWrapper; 19 this.childIndex = childIndex; 16 20 } 17 21 … … 24 28 public void UpdateRelationships(Guid objectA, 25 29 IList<Guid> relationships, int childIndex) { 26 UpdateRelationships(objectA, relationships, null , childIndex);30 UpdateRelationships(objectA, relationships, null); 27 31 } 28 32 29 33 public void UpdateRelationships(Guid objectA, 30 34 IList<Guid> relationships, 31 IList<object> additionalAttributes , int childIndex) {35 IList<object> additionalAttributes) { 32 36 //firstly check for created references 33 37 IList<Guid> existing = 34 this.GetRelationships(objectA , childIndex);38 this.GetRelationships(objectA); 35 39 36 40 foreach (Guid relationship in relationships) { … … 63 67 foreach (Guid relationship in deleted) { 64 68 RowT toDelete = 65 FindRow(objectA, relationship , childIndex);69 FindRow(objectA, relationship); 66 70 if (toDelete != null) { 67 71 toDelete.Delete(); … … 71 75 } 72 76 73 public IList<Guid> GetRelationships(Guid objectA , int childIndex) {77 public IList<Guid> GetRelationships(Guid objectA) { 74 78 IList<Guid> result = 75 79 new List<Guid>(); … … 85 89 } 86 90 87 private RowT FindRow(Guid objectA, Guid objectB , int childIndex) {91 private RowT FindRow(Guid objectA, Guid objectB) { 88 92 IEnumerable<RowT> rows = 89 93 tableAdapterWrapper.FindById(objectA); -
trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/3.2/ClientGroupAdapter.cs
r1756 r1758 51 51 manyToManyRelationHelper = 52 52 new ManyToManyRelationHelper<dsHiveServerTableAdapters.ClientGroup_ResourceTableAdapter, 53 dsHiveServer.ClientGroup_ResourceRow>(new ClientGroup_ResourceAdapterWrapper() );53 dsHiveServer.ClientGroup_ResourceRow>(new ClientGroup_ResourceAdapterWrapper(), 1); 54 54 } 55 55 … … 86 86 87 87 ICollection<Guid> resources = 88 ManyToManyRelationHelper.GetRelationships(clientGroup.Id , 1);88 ManyToManyRelationHelper.GetRelationships(clientGroup.Id); 89 89 90 90 clientGroup.Resources.Clear(); -
trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/3.2/JobAdapter.cs
r1729 r1758 51 51 manyToManyRelationHelper = 52 52 new ManyToManyRelationHelper<dsHiveServerTableAdapters.RequiredPluginsTableAdapter, 53 dsHiveServer.RequiredPluginsRow>(new RequiredPluginsAdapterWrapper() );53 dsHiveServer.RequiredPluginsRow>(new RequiredPluginsAdapterWrapper(), 1); 54 54 } 55 55 … … 164 164 165 165 ICollection<Guid> requiredPlugins = 166 ManyToManyRelationHelper.GetRelationships(job.Id , 1);166 ManyToManyRelationHelper.GetRelationships(job.Id); 167 167 168 168 job.PluginsNeeded.Clear(); -
trunk/sources/HeuristicLab.Security.ADODataAccess/3.2/UserGroupAdapter.cs
r1729 r1758 28 28 manyToManyRelationHelper = 29 29 new ManyToManyRelationHelper<dsSecurityTableAdapters.PermissionOwner_UserGroupTableAdapter, 30 dsSecurity.PermissionOwner_UserGroupRow>(new PermissionOwner_UserGroupAdapterWrapper() );30 dsSecurity.PermissionOwner_UserGroupRow>(new PermissionOwner_UserGroupAdapterWrapper(), 0); 31 31 } 32 32 … … 67 67 68 68 ICollection<Guid> permissionOwners = 69 ManyToManyRelationHelper.GetRelationships(group.Id , 0);69 ManyToManyRelationHelper.GetRelationships(group.Id); 70 70 71 71 group.Members.Clear();
Note: See TracChangeset
for help on using the changeset viewer.