Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2197 for branches


Ignore:
Timestamp:
07/28/09 16:28:52 (15 years ago)
Author:
mkommend
Message:

adapted connection string and explicitly implemented the defined interfaces in hl.modeling.database (ticket #712)

Location:
branches/HeuristicLab.Modeling Database Backend/sources
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.CEDMA.Server/3.3/Server.cs

    r2195 r2197  
    3838namespace HeuristicLab.CEDMA.Server {
    3939  public class Server : IViewable {
    40     private static readonly string sqlServerCompactFile = AppDomain.CurrentDomain.BaseDirectory + "HeuristicLab.Modeling.database";
     40    private static readonly string sqlServerCompactFile = AppDomain.CurrentDomain.BaseDirectory + "HeuristicLab.Modeling.database.sdf";
    4141    private static readonly string sqlServerCompactConnectionString = @"Data Source=" + sqlServerCompactFile;
    4242
  • branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/InputVariable.cs

    r2194 r2197  
    3434    private EntityRef<Variable> variable;
    3535    [Association(Storage = "variable", ThisKey = "VariableId", OtherKey = "Id", IsForeignKey = true)]
    36     public IVariable Variable {
     36    public Variable Variable {
    3737      get { return variable.Entity; }
     38    }
     39
     40    IVariable IInputVariable.Variable {
     41      get { return this.Variable; }
    3842    }
    3943
     
    5357    private EntityRef<Model> model;
    5458    [Association(Storage = "model", ThisKey = "ModelId", OtherKey = "Id", IsForeignKey = true)]
    55     public IModel Model {
     59    public Model Model {
    5660      get { return model.Entity; }
     61    }
     62
     63    IModel IInputVariable.Model {
     64      get { return this.Model;}
    5765    }
    5866  }
  • branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/InputVariableResult.cs

    r2194 r2197  
    3737    private EntityRef<Variable> variable;
    3838    [Association(Storage = "variable", ThisKey = "VariableId", OtherKey = "Id", IsForeignKey = true)]
    39     public IVariable Variable {
     39    public Variable Variable {
    4040      get { return variable.Entity; }
     41    }
     42
     43    IVariable IInputVariableResult.Variable {
     44      get { return this.Variable; }
    4145    }
    4246
     
    5660    private EntityRef<Model> model;
    5761    [Association(Storage = "model", ThisKey = "ModelId", OtherKey = "Id", IsForeignKey = true)]
    58     public IModel Model {
     62    public Model Model {
    5963      get { return model.Entity; }
     64    }
     65
     66    IModel IInputVariableResult.Model {
     67      get { return this.Model; }
    6068    }
    6169
     
    7583    private EntityRef<Result> result;
    7684    [Association(Storage = "result", ThisKey = "ResultId", OtherKey = "Id", IsForeignKey = true)]
    77     public IResult Result {
     85    public Result Result {
    7886      get { return result.Entity; }
     87    }
     88
     89    IResult IInputVariableResult.Result {
     90      get { return this.Result; }
    7991    }
    8092
  • branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/Model.cs

    r2195 r2197  
    2929
    3030    private byte[] data;
    31     [Column(Storage = "model", DbType = "image", CanBeNull = false)]
     31    [Column(Storage = "data", DbType = "image", CanBeNull = false)]
    3232    public byte[] Data {
    3333      get { return this.data; }
     
    5050    private EntityRef<Algorithm> algorithm;
    5151    [Association(Storage = "algorithm", ThisKey = "AlgorithmId", OtherKey = "Id", IsForeignKey = true)]
    52     public IAlgorithm Algorithm {
     52    public Algorithm Algorithm {
    5353      get { return this.algorithm.Entity; }
    5454      private set {
     
    5858            algorithm.Entity = null;
    5959          }
    60           algorithm.Entity = (Algorithm)value;
     60          algorithm.Entity =value;
    6161          if (value != null) {
    62             algorithmId = ((Algorithm)value).Id;
     62            algorithmId = value.Id;
    6363          }
    6464        }
    6565      }
     66    }
     67
     68    IAlgorithm IModel.Algorithm {
     69      get { return this.Algorithm; }
    6670    }
    6771
     
    8185    private EntityRef<Variable> targetVariable;
    8286    [Association(Storage = "targetVariable", ThisKey = "TargetVariableId", OtherKey = "Id", IsForeignKey = true)]
    83     public IVariable TargetVariable {
     87    public Variable TargetVariable {
    8488      get { return this.targetVariable.Entity; }
    8589      private set {
     
    8993            targetVariable.Entity = null;
    9094          }
    91           targetVariable.Entity = (Variable)value;
     95          targetVariable.Entity = value;
    9296          if (value != null) {
    93             targetVariableId = ((Variable)value).Id;
     97            targetVariableId = value.Id;
    9498          }
    9599        }
    96100      }
     101    }
     102
     103    IVariable IModel.TargetVariable {
     104      get { return this.TargetVariable; }
    97105    }
    98106
  • branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/ModelResult.cs

    r2194 r2197  
    77namespace HeuristicLab.Modeling.Database.SQLServerCompact {
    88  [Table(Name = "ModelResult")]
    9   public class ModelResult {
     9  public class ModelResult : IModelResult {
    1010    public ModelResult() {
    1111      this.model = default(EntityRef<Model>);
     
    5858    }
    5959
     60    IModel IModelResult.Model {
     61      get { return this.Model; }
     62    }
     63
    6064    private int resultId;
    6165    [Column(Storage = "resultId", CanBeNull = false)]
     
    8993    }
    9094
     95    IResult IModelResult.Result {
     96      get { return this.Result; }
     97    }
     98
    9199  }
    92100}
Note: See TracChangeset for help on using the changeset viewer.