Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Interfaces/IHiveDao.cs @ 5593

Last change on this file since 5593 was 5593, checked in by cneumuel, 12 years ago

#1233

  • changed the way lifecycle methods are called. The new service method TriggerLifecycle checks when the latest cleanup was made and performs one (if necessary). This can also be called by an external program (like a windows task)
  • robustified logging
File size: 4.1 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq.Expressions;
4
5namespace HeuristicLab.Services.Hive.DataAccess {
6  using HeuristicLab.Services.Hive.Common.DataTransfer;
7  using DT = HeuristicLab.Services.Hive.Common.DataTransfer;
8
9  public interface IHiveDao {
10    #region Job Methods
11    DT.Job GetJob(Guid id);
12    IEnumerable<DT.Job> GetJobs(Expression<Func<Job, bool>> predicate);
13    Guid AddJob(DT.Job dto);
14    void UpdateJob(DT.Job dto);
15    void DeleteJob(Guid id);
16    IEnumerable<DT.Job> GetWaitingJobs(DT.Slave slave, int count);
17    IEnumerable<DT.Job> GetParentJobs(IEnumerable<Guid> resourceIds, int count, bool finished);
18    #endregion
19
20    #region JobData Methods
21    DT.JobData GetJobData(Guid id);
22    IEnumerable<DT.JobData> GetJobDatas(Expression<Func<JobData, bool>> predicate);
23    Guid AddJobData(DT.JobData dto);
24    void UpdateJobData(DT.JobData dto);
25    void DeleteJobData(Guid id);
26    #endregion
27
28    #region StateLog Methods
29    DT.StateLog GetStateLog(Guid id);
30    IEnumerable<DT.StateLog> GetStateLogs(Expression<Func<StateLog, bool>> predicate);
31    Guid AddStateLog(DT.StateLog dto);
32    void UpdateStateLog(DT.StateLog dto);
33    void DeleteStateLog(Guid id);
34    #endregion
35
36    #region HiveExperiment Methods
37    DT.HiveExperiment GetHiveExperiment(Guid id);
38    IEnumerable<DT.HiveExperiment> GetHiveExperiments(Expression<Func<HiveExperiment, bool>> predicate);
39    Guid AddHiveExperiment(DT.HiveExperiment dto);
40    void UpdateHiveExperiment(DT.HiveExperiment dto);
41    void DeleteHiveExperiment(Guid id);
42    #endregion
43
44    #region HiveExperimentPermission Methods
45    DT.HiveExperimentPermission GetHiveExperimentPermission(Guid hiveExperimentId, Guid grantedUserId);
46    IEnumerable<DT.HiveExperimentPermission> GetHiveExperimentPermissions(Expression<Func<HiveExperimentPermission, bool>> predicate);
47    void AddHiveExperimentPermission(DT.HiveExperimentPermission dto);
48    void UpdateHiveExperimentPermission(DT.HiveExperimentPermission dto);
49    void DeleteHiveExperimentPermission(Guid hiveExperimentId, Guid grantedUserId);
50    #endregion
51
52    #region Plugin Methods
53    DT.Plugin GetPlugin(Guid id);
54    IEnumerable<DT.Plugin> GetPlugins(Expression<Func<Plugin, bool>> predicate);
55    Guid AddPlugin(DT.Plugin dto);
56    void UpdatePlugin(DT.Plugin dto);
57    void DeletePlugin(Guid id);
58    #endregion
59
60    #region PluginData Methods
61    DT.PluginData GetPluginData(Guid id);
62    IEnumerable<DT.PluginData> GetPluginDatas(Expression<Func<PluginData, bool>> predicate);
63    Guid AddPluginData(DT.PluginData dto);
64    void UpdatePluginData(DT.PluginData dto);
65    void DeletePluginData(Guid id);
66    #endregion
67
68    #region Calendar Methods
69    #endregion
70
71    #region Slave Methods
72    DT.Slave GetSlave(Guid id);
73    IEnumerable<DT.Slave> GetSlaves(Expression<Func<Slave, bool>> predicate);
74    Guid AddSlave(DT.Slave dto);
75    void UpdateSlave(DT.Slave dto);
76    void DeleteSlave(Guid id);
77    #endregion
78
79    #region SlaveGroup Methods
80    DT.SlaveGroup GetSlaveGroup(Guid id);
81    IEnumerable<DT.SlaveGroup> GetSlaveGroups(Expression<Func<SlaveGroup, bool>> predicate);
82    Guid AddSlaveGroup(DT.SlaveGroup dto);
83    void UpdateSlaveGroup(DT.SlaveGroup dto);
84    void DeleteSlaveGroup(Guid id);
85    #endregion
86
87    #region Resource Methods
88    DT.Resource GetResource(Guid id);
89    IEnumerable<DT.Resource> GetResources(Expression<Func<Resource, bool>> predicate);
90    Guid AddResource(DT.Resource dto);
91    void UpdateResource(DT.Resource dto);
92    void DeleteResource(Guid id);
93    void AssignJobToResource(Guid jobId, Guid resourceId);
94    IEnumerable<DT.Resource> GetAssignedResources(Guid jobId);
95    #endregion
96
97    #region Authorization Methods
98    Permission GetPermissionForJob(Guid jobId, Guid userId);
99    Permission GetPermissionForExperiment(Guid experimentId, Guid userId);
100    Guid GetExperimentForJob(Guid jobId);
101    #endregion
102
103    #region Lifecycle Methods
104    DateTime GetLastCleanup();
105    void SetLastCleanup(DateTime datetime);
106    #endregion
107  }
108}
Note: See TracBrowser for help on using the repository browser.