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

Last change on this file since 9324 was 9324, checked in by fschoepp, 6 years ago

#1888:

  • DAL: Added a Delete method which deletes by experiment id.
  • HL DataTables will now be transposed and mapped as double[ROWS][COLUMNS] (transposed)
  • JS: Moved all classes into "modules" to prevent namespace pollution (using OAAS_MODEL for model classes, OAAS_VIEW for views and OAAS_CONTROLLER for controllers)
  • JS: Moved DatatypeMapper classes into Backbone views
  • JS: Models now correctly send DELETE requests
  • Added a new job overview page (which also renders run details) using AJAX
  • Using moment.min.js to format DateTime as string
  • Controllers now inherit from BaseController which provides a RedirectToLoginIfNecessary-method
  • Added loading animations to several AJAX bound places (loading experiments / scenarios)
  • Added a section to _Layout.cshtml which allows page-specific JavaScript includes (<script> only for a certain page)
  • Fixed Build/Edit of experiment menu redirecting to the wrong page
  • The Experiment Variation Dialog disables input fields, if the property has not been activated before
File size: 1.7 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 Update(string username, Experiment experiment);
23    bool DeleteByName(string username, string experiment);
24    bool Delete(string username, string experimentId);
25    Experiment FindByName(string username, string experiment);
26    IEnumerable<Experiment> GetExperiments(string user, bool namesOnly = false);
27    Experiment GetExperimentByName(string username, string scenario);
28
29    Experiment GetExperimentById(User user, string nodeId);
30  }
31
32  public interface IBlobDao {
33    bool Add(StringEntry entry);
34    bool DeleteByKey(string entryKey);
35    StringEntry FindByKey(string entryKey);
36  }
37
38  public interface IDataAccessLayer {
39    IScenarioDao ScenarioDao { get; }
40    IBlobDao BlobDao { get; }
41    IExperimentDao ExperimentDao { get; }   
42  }
43
44  public static class DataAccessLayerProvider {   
45    private static IDataAccessLayer layer = new Azure.AzureDataAccessLayer();
46    //private static IDataAccessLayer layer = new Mockup.MockupDataAccessLayer();
47
48    public static IDataAccessLayer GetLayer() { 
49      return layer; 
50    }
51  }
52}
53
Note: See TracBrowser for help on using the repository browser.