[2229] | 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 |
|
---|
| 22 | using System;
|
---|
[2180] | 23 | using System.Collections.Generic;
|
---|
| 24 | using System.Data.Linq;
|
---|
| 25 | using System.Data.Linq.Mapping;
|
---|
| 26 | using System.Text;
|
---|
| 27 |
|
---|
| 28 | using HeuristicLab.DataAnalysis;
|
---|
[2198] | 29 | using HeuristicLab.Core;
|
---|
[2180] | 30 |
|
---|
[2194] | 31 | namespace HeuristicLab.Modeling.Database.SQLServerCompact {
|
---|
[2180] | 32 | [Table(Name = "Problem")]
|
---|
[2382] | 33 | public class Problem {
|
---|
[2180] | 34 | public Problem() {
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | public Problem(Dataset dataset)
|
---|
| 38 | : this() {
|
---|
[2198] | 39 | this.Dataset = dataset;
|
---|
[2180] | 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 |
|
---|
[2198] | 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 |
|
---|
[2180] | 56 | public Dataset Dataset {
|
---|
[2198] | 57 | get { return (Dataset)PersistenceManager.RestoreFromGZip(this.Data); }
|
---|
[2304] | 58 | private set { this.Data = PersistenceManager.SaveToGZip(value); }
|
---|
[2180] | 59 | }
|
---|
| 60 | }
|
---|
| 61 | }
|
---|