Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/Problem.cs @ 3099

Last change on this file since 3099 was 2382, checked in by mkommend, 15 years ago

refactored modeling database to enable the change of models (ticket #759)

File size: 1.8 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22using System;
23using System.Collections.Generic;
24using System.Data.Linq;
25using System.Data.Linq.Mapping;
26using System.Text;
27
28using HeuristicLab.DataAnalysis;
29using HeuristicLab.Core;
30
31namespace HeuristicLab.Modeling.Database.SQLServerCompact {
32  [Table(Name = "Problem")]
33  public class Problem {
34    public Problem() {
35    }
36
37    public Problem(Dataset dataset)
38      : this() {
39      this.Dataset = dataset;
40    }
41
42    private int id;
43    [Column(Storage = "id", IsPrimaryKey = true, IsDbGenerated = true)]
44    public int Id {
45      get { return this.id; }
46      private set { this.id = value; }
47    }
48
49    private byte[] data;
50    [Column(Storage = "data", DbType = "image", CanBeNull = false)]
51    public byte[] Data {
52      get { return this.data; }
53      private set { this.data = value; }
54    }
55
56    public Dataset Dataset {
57      get { return (Dataset)PersistenceManager.RestoreFromGZip(this.Data); }
58      private set { this.Data = PersistenceManager.SaveToGZip(value); }
59    }
60  }
61}
Note: See TracBrowser for help on using the repository browser.