Changeset 12691 for branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Manager/PersistenceManager.cs
- Timestamp:
- 07/08/15 15:51:32 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Manager/PersistenceManager.cs
r12468 r12691 35 35 36 36 #region Hive daos 37 38 private AssignedResourceDao assignedResourceDao; 37 39 public AssignedResourceDao AssignedResourceDao { 38 get { return new AssignedResourceDao(dataContext); } 39 } 40 40 get { return assignedResourceDao ?? (assignedResourceDao = new AssignedResourceDao(dataContext)); } 41 } 42 43 private DowntimeDao downtimeDao; 41 44 public DowntimeDao DowntimeDao { 42 get { return new DowntimeDao(dataContext); } 43 } 44 45 get { return downtimeDao ?? (downtimeDao = new DowntimeDao(dataContext)); } 46 } 47 48 private JobDao jobDao; 45 49 public JobDao JobDao { 46 get { return new JobDao(dataContext); } 47 } 48 50 get { return jobDao ?? (jobDao = new JobDao(dataContext)); } 51 } 52 53 private JobPermissionDao jobPermissionDao; 49 54 public JobPermissionDao JobPermissionDao { 50 get { return new JobPermissionDao(dataContext); } 51 } 52 55 get { return jobPermissionDao ?? (jobPermissionDao = new JobPermissionDao(dataContext)); } 56 } 57 58 private LifecycleDao lifecycleDao; 53 59 public LifecycleDao LifecycleDao { 54 get { return new LifecycleDao(dataContext); } 55 } 56 60 get { return lifecycleDao ?? (lifecycleDao = new LifecycleDao(dataContext)); } 61 } 62 63 private PluginDao pluginDao; 57 64 public PluginDao PluginDao { 58 get { return new PluginDao(dataContext); } 59 } 60 65 get { return pluginDao ?? (pluginDao = new PluginDao(dataContext)); } 66 } 67 68 private PluginDataDao pluginDataDao; 61 69 public PluginDataDao PluginDataDao { 62 get { return new PluginDataDao(dataContext); } 63 } 64 70 get { return pluginDataDao ?? (pluginDataDao = new PluginDataDao(dataContext)); } 71 } 72 73 private RequiredPluginDao requiredPluginDao; 65 74 public RequiredPluginDao RequiredPluginDao { 66 get { return new RequiredPluginDao(dataContext); } 67 } 68 75 get { return requiredPluginDao ?? (requiredPluginDao = new RequiredPluginDao(dataContext)); } 76 } 77 78 private ResourceDao resourceDao; 69 79 public ResourceDao ResourceDao { 70 get { return new ResourceDao(dataContext); } 71 } 72 80 get { return resourceDao ?? (resourceDao = new ResourceDao(dataContext)); } 81 } 82 83 private ResourcePermissionDao resourcePermissionDao; 73 84 public ResourcePermissionDao ResourcePermissionDao { 74 get { return new ResourcePermissionDao(dataContext); } 75 } 76 85 get { return resourcePermissionDao ?? (resourcePermissionDao = new ResourcePermissionDao(dataContext)); } 86 } 87 88 private SlaveDao slaveDao; 77 89 public SlaveDao SlaveDao { 78 get { return new SlaveDao(dataContext); } 79 } 80 90 get { return slaveDao ?? (slaveDao = new SlaveDao(dataContext)); } 91 } 92 93 private SlaveGroupDao slaveGroupDao; 81 94 public SlaveGroupDao SlaveGroupDao { 82 get { return new SlaveGroupDao(dataContext); } 83 } 84 95 get { return slaveGroupDao ?? (slaveGroupDao = new SlaveGroupDao(dataContext)); } 96 } 97 98 private StateLogDao stateLogDao; 85 99 public StateLogDao StateLogDao { 86 get { return new StateLogDao(dataContext); } 87 } 88 100 get { return stateLogDao ?? (stateLogDao = new StateLogDao(dataContext)); } 101 } 102 103 private TaskDao taskDao; 89 104 public TaskDao TaskDao { 90 get { return new TaskDao(dataContext); } 91 } 92 105 get { return taskDao ?? (taskDao = new TaskDao(dataContext)); } 106 } 107 108 private TaskDataDao taskDataDao; 93 109 public TaskDataDao TaskDataDao { 94 get { return new TaskDataDao(dataContext); } 95 } 96 110 get { return taskDataDao ?? (taskDataDao = new TaskDataDao(dataContext)); } 111 } 112 113 private UserPriorityDao userPriorityDao; 97 114 public UserPriorityDao UserPriorityDao { 98 get { return new UserPriorityDao(dataContext); }115 get { return userPriorityDao ?? (userPriorityDao = new UserPriorityDao(dataContext)); } 99 116 } 100 117 #endregion 101 118 102 119 #region HiveStatistics daos 120 121 private DimClientDao dimClientDao; 103 122 public DimClientDao DimClientDao { 104 get { return new DimClientDao(dataContext); } 105 } 106 123 get { return dimClientDao ?? (dimClientDao = new DimClientDao(dataContext)); } 124 } 125 126 private DimJobDao dimJobDao; 107 127 public DimJobDao DimJobDao { 108 get { return new DimJobDao(dataContext); } 109 } 110 128 get { return dimJobDao ?? (dimJobDao = new DimJobDao(dataContext)); } 129 } 130 131 private DimTimeDao dimTimeDao; 111 132 public DimTimeDao DimTimeDao { 112 get { return new DimTimeDao(dataContext); } 113 } 114 133 get { return dimTimeDao ?? (dimTimeDao = new DimTimeDao(dataContext)); } 134 } 135 136 private DimUserDao dimUserDao; 115 137 public DimUserDao DimUserDao { 116 get { return new DimUserDao(dataContext); } 117 } 118 138 get { return dimUserDao ?? (dimUserDao = new DimUserDao(dataContext)); } 139 } 140 141 private FactClientInfoDao factClientInfoDao; 119 142 public FactClientInfoDao FactClientInfoDao { 120 get { return new FactClientInfoDao(dataContext); } 121 } 122 143 get { return factClientInfoDao ?? (factClientInfoDao = new FactClientInfoDao(dataContext)); } 144 } 145 146 private FactTaskDao factTaskDao; 123 147 public FactTaskDao FactTaskDao { 124 get { return new FactTaskDao(dataContext); }148 get { return factTaskDao ?? (factTaskDao = new FactTaskDao(dataContext)); } 125 149 } 126 150 #endregion … … 130 154 if (longRunning) context.CommandTimeout = (int)Settings.Default.LongRunningDatabaseCommandTimeout.TotalSeconds; 131 155 dataContext = context; 156 } 157 158 public PersistenceManager(DataContext dataContext) { 159 this.dataContext = dataContext; 132 160 } 133 161 … … 179 207 180 208 public void Dispose() { 181 if (dataContext != null) {182 dataContext.Dispose();183 }209 //if (dataContext != null) { 210 // dataContext.Dispose(); 211 //} 184 212 } 185 213 }
Note: See TracChangeset
for help on using the changeset viewer.