Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/DAL.cs @ 9215

Last change on this file since 9215 was 9215, checked in by fschoepp, 11 years ago

#1888:

  • Janitor is now working as expected in Windows Azure
  • Added basic support for experiments (draggable experiments)
  • Added methods to save/read experiments from TableStorage
  • The job status can now be retrieved by using the GetTasks/GetTaskData methods
  • Added a class to convert JSON-objects to Algorithm instances
  • Web page: Added experiment button to navigation
File size: 1.5 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.Services.Optimization.ControllerService.Model;
6
7namespace HeuristicLab.Services.Optimization.ControllerService.Interfaces {
8  public class StringEntry {
9    public string Key { get; set; }
10    public string Text { get; set; }   
11  };
12
13  public interface IScenarioDao {
14    bool Add(ScenarioEntity entity);
15    bool DeleteByName(string scenarioName);
16    ScenarioEntity FindByName(string scenarioName);
17    IEnumerable<ScenarioEntity> GetAllEntities();
18  }
19
20  public interface IExperimentDao {
21    bool Add(string username, Experiment experiment);
22    bool DeleteByName(string username, string experiment);
23    Experiment FindByName(string username, string experiment);
24    IEnumerable<Experiment> GetExperiments(string user);
25  }
26
27  public interface IBlobDao {
28    bool Add(StringEntry entry);
29    bool DeleteByKey(string entryKey);
30    StringEntry FindByKey(string entryKey);
31  }
32
33  public interface IDataAccessLayer {
34    IScenarioDao ScenarioDao { get; }
35    IBlobDao BlobDao { get; }
36    IExperimentDao ExperimentDao { get; }   
37  }
38
39  public static class DataAccessLayerProvider {   
40    private static IDataAccessLayer layer = new Azure.AzureDataAccessLayer();
41    //private static IDataAccessLayer layer = new Mockup.MockupDataAccessLayer();
42
43    public static IDataAccessLayer GetLayer() {
44      return layer;
45    }
46  }
47}
48
Note: See TracBrowser for help on using the repository browser.