1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using System.Linq.Expressions;
|
---|
6 |
|
---|
7 | namespace HeuristicLab.Services.Hive.DataAccess {
|
---|
8 | using DT = HeuristicLab.Services.Hive.Common.DataTransfer;
|
---|
9 |
|
---|
10 | public interface IHiveDao {
|
---|
11 | #region Job Methods
|
---|
12 | DT.Job GetJob(Guid id);
|
---|
13 | IEnumerable<DT.Job> GetJobs(Expression<Func<Job, bool>> predicate);
|
---|
14 | Guid AddJob(DT.Job dto);
|
---|
15 | void UpdateJob(DT.Job dto);
|
---|
16 | void DeleteJob(Guid id);
|
---|
17 | IEnumerable<DT.Job> GetWaitingJobs(DT.Slave slave);
|
---|
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 HiveExperiment Methods
|
---|
29 | DT.HiveExperiment GetHiveExperiment(Guid id);
|
---|
30 | IEnumerable<DT.HiveExperiment> GetHiveExperiments(Expression<Func<HiveExperiment, bool>> predicate);
|
---|
31 | Guid AddHiveExperiment(DT.HiveExperiment dto);
|
---|
32 | void UpdateHiveExperiment(DT.HiveExperiment dto);
|
---|
33 | void DeleteHiveExperiment(Guid id);
|
---|
34 | #endregion
|
---|
35 |
|
---|
36 | #region Plugin Methods
|
---|
37 | DT.Plugin GetPlugin(Guid id);
|
---|
38 | IEnumerable<DT.Plugin> GetPlugins(Expression<Func<Plugin, bool>> predicate);
|
---|
39 | Guid AddPlugin(DT.Plugin dto);
|
---|
40 | void UpdatePlugin(DT.Plugin dto);
|
---|
41 | void DeletePlugin(Guid id);
|
---|
42 | #endregion
|
---|
43 |
|
---|
44 | #region PluginData Methods
|
---|
45 | DT.PluginData GetPluginData(Guid id);
|
---|
46 | IEnumerable<DT.PluginData> GetPluginDatas(Expression<Func<PluginData, bool>> predicate);
|
---|
47 | Guid AddPluginData(DT.PluginData dto);
|
---|
48 | void UpdatePluginData(DT.PluginData dto);
|
---|
49 | void DeletePluginData(Guid id);
|
---|
50 | #endregion
|
---|
51 |
|
---|
52 | #region Calendar Methods
|
---|
53 | #endregion
|
---|
54 |
|
---|
55 | #region Slave Methods
|
---|
56 | DT.Slave GetSlave(Guid id);
|
---|
57 | IEnumerable<DT.Slave> GetSlaves(Expression<Func<Slave, bool>> predicate);
|
---|
58 | Guid AddSlave(DT.Slave dto);
|
---|
59 | void UpdateSlave(DT.Slave dto);
|
---|
60 | void DeleteSlave(Guid id);
|
---|
61 | #endregion
|
---|
62 |
|
---|
63 | #region SlaveGroup Methods
|
---|
64 | DT.SlaveGroup GetSlaveGroup(Guid id);
|
---|
65 | IEnumerable<DT.SlaveGroup> GetSlaveGroups(Expression<Func<SlaveGroup, bool>> predicate);
|
---|
66 | Guid AddSlaveGroup(DT.SlaveGroup dto);
|
---|
67 | void UpdateSlaveGroup(DT.SlaveGroup dto);
|
---|
68 | void DeleteSlaveGroup(Guid id);
|
---|
69 | #endregion
|
---|
70 |
|
---|
71 | #region Resource Methods
|
---|
72 | DT.Resource GetResource(Guid id);
|
---|
73 | IEnumerable<DT.Resource> GetResources(Expression<Func<Resource, bool>> predicate);
|
---|
74 | Guid AddResource(DT.Resource dto);
|
---|
75 | void UpdateResource(DT.Resource dto);
|
---|
76 | void DeleteResource(Guid id);
|
---|
77 | void AssignJobToResource(Guid jobId, Guid resourceId);
|
---|
78 | IEnumerable<DT.Resource> GetAssignedResources(Guid jobId);
|
---|
79 | #endregion
|
---|
80 |
|
---|
81 | #region Authorization Methods
|
---|
82 | bool IsUserAuthorizedForJobs(Guid userId, params Guid[] jobIds);
|
---|
83 | #endregion
|
---|
84 | }
|
---|
85 | }
|
---|